forked from Imagelibrary/rtems
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.
This commit is contained in:
@@ -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>
|
2011-07-14 Till Straumann <strauman@slac.stanford.edu>
|
||||||
|
|
||||||
PR 1833/bsps
|
PR 1833/bsps
|
||||||
|
|||||||
@@ -214,6 +214,27 @@ SYM (zero_bss):
|
|||||||
+---------------------------------------------------------------------*/
|
+---------------------------------------------------------------------*/
|
||||||
call SYM(BSP_console_select)
|
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__
|
#ifdef __SSE__
|
||||||
/*--------------------------------------------------------------------+
|
/*--------------------------------------------------------------------+
|
||||||
| Enable SSE; we really only care about fxsave/fxrstor and leave
|
| Enable SSE; we really only care about fxsave/fxrstor and leave
|
||||||
@@ -221,6 +242,8 @@ SYM (zero_bss):
|
|||||||
| But as a courtesy we make sure we don't execute on hardware
|
| But as a courtesy we make sure we don't execute on hardware
|
||||||
| that doesn't support features possibly used by the compiler.
|
| that doesn't support features possibly used by the compiler.
|
||||||
+---------------------------------------------------------------------*/
|
+---------------------------------------------------------------------*/
|
||||||
|
PUBLIC (enable_sse)
|
||||||
|
SYM(enable_sse):
|
||||||
movl SYM (x86_capability), eax
|
movl SYM (x86_capability), eax
|
||||||
testl $0x01000000, eax
|
testl $0x01000000, eax
|
||||||
jne 1f
|
jne 1f
|
||||||
@@ -250,26 +273,8 @@ SYM (zero_bss):
|
|||||||
mov cr4, eax # OK to enable now
|
mov cr4, eax # OK to enable now
|
||||||
or $0x600, eax
|
or $0x600, eax
|
||||||
mov eax, cr4
|
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):
|
SYM(_sse_panic):
|
||||||
call SYM(printk)
|
call SYM(printk)
|
||||||
1: hlt
|
1: hlt
|
||||||
|
|||||||
Reference in New Issue
Block a user