aboutsummaryrefslogtreecommitdiff
path: root/src/cpu/x86/lapic/secondary.S
diff options
context:
space:
mode:
authorKyösti Mälkki <kyosti.malkki@gmail.com>2012-07-05 06:31:15 +0300
committerSven Schnelle <svens@stackframe.org>2012-07-05 22:49:31 +0200
commit63539bb9d7fe9ae55a364cadfcbd79ecb98a9412 (patch)
tree09fd72ad7a5ba7ac47ec84300c47f275c3e67dd1 /src/cpu/x86/lapic/secondary.S
parent9a663f3e97fff9cfc3eb9ed2c6e843a68bcabf90 (diff)
Only copy real-mode section of SIPI vector
The SIPI vector copy can use a static location below 1MB, aligned to 4kB. Jump out of the copy once in protected mode. Change-Id: I6299aa3448270663941cf2c4113efee74bcc7993 Signed-off-by: Kyösti Mälkki <kyosti.malkki@gmail.com> Reviewed-on: http://review.coreboot.org/1165 Tested-by: build bot (Jenkins) Reviewed-by: Sven Schnelle <svens@stackframe.org>
Diffstat (limited to 'src/cpu/x86/lapic/secondary.S')
-rw-r--r--src/cpu/x86/lapic/secondary.S24
1 files changed, 15 insertions, 9 deletions
diff --git a/src/cpu/x86/lapic/secondary.S b/src/cpu/x86/lapic/secondary.S
index 2ad70296ea..15bae5e5db 100644
--- a/src/cpu/x86/lapic/secondary.S
+++ b/src/cpu/x86/lapic/secondary.S
@@ -2,8 +2,7 @@
#include <cpu/x86/lapic_def.h>
.text
- .globl _secondary_start, _secondary_start_end, cpucount
- .balign 4096
+ .globl _secondary_start, _secondary_start_end, cpucount, ap_protected_start
_secondary_start:
.code16
cli
@@ -25,9 +24,21 @@ _secondary_start:
orl $0x60000001, %eax /* CD, NW, PE = 1 */
movl %eax, %cr0
- ljmpl $0x10, $1f
-1:
+ ljmpl $0x10, $__ap_protected_start
+
+gdtaddr:
+ .word gdt_limit /* the table limit */
+ .long gdt /* we know the offset */
+
+_secondary_start_end:
+
+ap_protected_start:
.code32
+ lgdt gdtaddr
+ ljmpl $0x10, $__ap_protected_start
+
+__ap_protected_start:
+
movw $0x18, %ax
movw %ax, %ds
movw %ax, %es
@@ -57,9 +68,4 @@ _secondary_start:
cpucount:
.long 1
-gdtaddr:
- .word gdt_limit /* the table limit */
- .long gdt /* we know the offset */
-
-_secondary_start_end:
.code32