diff options
| author | Tor Egge <tegge@FreeBSD.org> | 2000-05-25 21:33:52 +0000 |
|---|---|---|
| committer | Tor Egge <tegge@FreeBSD.org> | 2000-05-25 21:33:52 +0000 |
| commit | 5bb4998cca0a9b9211db7b8ddaff6146d89a8b5c (patch) | |
| tree | 02092a87d6e76b70e6ddd6fb17295e99642b1d73 | |
| parent | 8b2f7124cf380f59f7d98a05d2eb16ef0f90320f (diff) | |
Notes
| -rw-r--r-- | sys/amd64/amd64/mpboot.S | 20 | ||||
| -rw-r--r-- | sys/i386/i386/mpboot.s | 20 |
2 files changed, 14 insertions, 26 deletions
diff --git a/sys/amd64/amd64/mpboot.S b/sys/amd64/amd64/mpboot.S index e3e11f0e37ca..9eb2d7c3df06 100644 --- a/sys/amd64/amd64/mpboot.S +++ b/sys/amd64/amd64/mpboot.S @@ -165,20 +165,15 @@ NON_GPROF_ENTRY(wait_ap) BOOTMP1: NON_GPROF_ENTRY(bootMP) + .code16 cli CHECKPOINT(0x34, 1) /* First guarantee a 'clean slate' */ - data32 xorl %eax, %eax - data32 movl %eax, %ebx - data32 movl %eax, %ecx - data32 movl %eax, %edx - data32 movl %eax, %esi - data32 movl %eax, %edi /* set up data segments */ @@ -188,17 +183,18 @@ NON_GPROF_ENTRY(bootMP) mov %ax, %fs mov %ax, %gs mov %ax, %ss - mov $(boot_stk-_bootMP), %sp + mov $(boot_stk-_bootMP), %esp /* Now load the global descriptor table */ addr32 data32 - lgdt MP_GDTptr-_bootMP + /* XXX: sigh: lgdt MP_GDTptr-_bootMP GAS BUG! */ + .byte 0x0f, 0x01, 0x15 /* XXX hand assemble! */ + .long MP_GDTptr-_bootMP /* XXX hand assemble! */ /* Enable protected mode */ data32 movl %cr0, %eax - data32 orl $CR0_PE, %eax data32 movl %eax, %cr0 @@ -207,13 +203,11 @@ NON_GPROF_ENTRY(bootMP) * make intrasegment jump to flush the processor pipeline and * reload CS register */ - data32 pushl $0x18 - data32 pushl $(protmode-_bootMP) - data32 - lret + lretl + .code32 protmode: CHECKPOINT(0x35, 2) diff --git a/sys/i386/i386/mpboot.s b/sys/i386/i386/mpboot.s index e3e11f0e37ca..9eb2d7c3df06 100644 --- a/sys/i386/i386/mpboot.s +++ b/sys/i386/i386/mpboot.s @@ -165,20 +165,15 @@ NON_GPROF_ENTRY(wait_ap) BOOTMP1: NON_GPROF_ENTRY(bootMP) + .code16 cli CHECKPOINT(0x34, 1) /* First guarantee a 'clean slate' */ - data32 xorl %eax, %eax - data32 movl %eax, %ebx - data32 movl %eax, %ecx - data32 movl %eax, %edx - data32 movl %eax, %esi - data32 movl %eax, %edi /* set up data segments */ @@ -188,17 +183,18 @@ NON_GPROF_ENTRY(bootMP) mov %ax, %fs mov %ax, %gs mov %ax, %ss - mov $(boot_stk-_bootMP), %sp + mov $(boot_stk-_bootMP), %esp /* Now load the global descriptor table */ addr32 data32 - lgdt MP_GDTptr-_bootMP + /* XXX: sigh: lgdt MP_GDTptr-_bootMP GAS BUG! */ + .byte 0x0f, 0x01, 0x15 /* XXX hand assemble! */ + .long MP_GDTptr-_bootMP /* XXX hand assemble! */ /* Enable protected mode */ data32 movl %cr0, %eax - data32 orl $CR0_PE, %eax data32 movl %eax, %cr0 @@ -207,13 +203,11 @@ NON_GPROF_ENTRY(bootMP) * make intrasegment jump to flush the processor pipeline and * reload CS register */ - data32 pushl $0x18 - data32 pushl $(protmode-_bootMP) - data32 - lret + lretl + .code32 protmode: CHECKPOINT(0x35, 2) |
