summaryrefslogtreecommitdiffstats
path: root/c
diff options
context:
space:
mode:
authorJennifer Averett <Jennifer.Averett@OARcorp.com>2011-07-14 15:07:21 +0000
committerJennifer Averett <Jennifer.Averett@OARcorp.com>2011-07-14 15:07:21 +0000
commit7521e439b0e7cde29ea34f4ee5285d9a0b0936d8 (patch)
tree786b97243f21a779e192bdec0cdb8792097a1c65 /c
parent2011-07-14 Till Straumann <strauman@slac.stanford.edu> (diff)
downloadrtems-7521e439b0e7cde29ea34f4ee5285d9a0b0936d8.tar.bz2
2011-07-14 Jennifer Averett <Jennifer.Averett@OARcorp.com>
* start/start.S: Moved enable_sse into a subroutine that may be called from other cores on an SMP system.
Diffstat (limited to 'c')
-rw-r--r--c/src/lib/libbsp/i386/pc386/ChangeLog5
-rw-r--r--c/src/lib/libbsp/i386/pc386/start/start.S43
2 files changed, 29 insertions, 19 deletions
diff --git a/c/src/lib/libbsp/i386/pc386/ChangeLog b/c/src/lib/libbsp/i386/pc386/ChangeLog
index e2d3e55e1f..9fe339d87d 100644
--- a/c/src/lib/libbsp/i386/pc386/ChangeLog
+++ b/c/src/lib/libbsp/i386/pc386/ChangeLog
@@ -1,3 +1,8 @@
+2011-07-14 Jennifer Averett <Jennifer.Averett@OARcorp.com>
+
+ * start/start.S: Moved enable_sse into a subroutine that may be called
+ from other cores on an SMP system.
+
2011-07-14 Till Straumann <strauman@slac.stanford.edu>
PR 1833/bsps
diff --git a/c/src/lib/libbsp/i386/pc386/start/start.S b/c/src/lib/libbsp/i386/pc386/start/start.S
index 5d11a1d1a3..8d4a5d6ca7 100644
--- a/c/src/lib/libbsp/i386/pc386/start/start.S
+++ b/c/src/lib/libbsp/i386/pc386/start/start.S
@@ -215,12 +215,35 @@ SYM (zero_bss):
call SYM(BSP_console_select)
#ifdef __SSE__
+ call SYM(enable_sse)
+#endif
+
+/*---------------------------------------------------------------------+
+| Transfer control to User's Board Support Package
+| Note: at the top we reserved space for the argument
+| so that
+| initial_esp = ( TOS - 4 ) & ~(CPU_STACK_ALIGNMENT-1)
+| this ensures that
+| 1) esp is now aligned
+| 2) there is space for the cmdline pointer which we just
+| may store at *(esp)
++---------------------------------------------------------------------*/
+
+ movl $SYM(_boot_multiboot_cmdline), (esp)
+ call SYM (boot_card)
+
+ cli # stops interrupts from being processed after hlt!
+ hlt # shutdown
+
+#ifdef __SSE__
/*--------------------------------------------------------------------+
| Enable SSE; we really only care about fxsave/fxrstor and leave
| The only feature *we* (as an OS) use is fxsave/fxrstor.
| But as a courtesy we make sure we don't execute on hardware
| that doesn't support features possibly used by the compiler.
+---------------------------------------------------------------------*/
+ PUBLIC (enable_sse)
+SYM(enable_sse):
movl SYM (x86_capability), eax
testl $0x01000000, eax
jne 1f
@@ -250,26 +273,8 @@ SYM (zero_bss):
mov cr4, eax # OK to enable now
or $0x600, eax
mov eax, cr4
-#endif
+ ret
-/*---------------------------------------------------------------------+
-| Transfer control to User's Board Support Package
-| Note: at the top we reserved space for the argument
-| so that
-| initial_esp = ( TOS - 4 ) & ~(CPU_STACK_ALIGNMENT-1)
-| this ensures that
-| 1) esp is now aligned
-| 2) there is space for the cmdline pointer which we just
-| may store at *(esp)
-+---------------------------------------------------------------------*/
-
- movl $SYM(_boot_multiboot_cmdline), (esp)
- call SYM (boot_card)
-
- cli # stops interrupts from being processed after hlt!
- hlt # shutdown
-
-#ifdef __SSE__
SYM(_sse_panic):
call SYM(printk)
1: hlt