x86_64: acpi: add minimal SMP core startup
This commit is contained in:
28
arch/x86_64/acpi/ap_trampoline.S
Normal file
28
arch/x86_64/acpi/ap_trampoline.S
Normal file
@@ -0,0 +1,28 @@
|
||||
|
||||
.global acpi_bsp_lapic_id
|
||||
.type acpi_bsp_lapic_id, @function
|
||||
|
||||
acpi_bsp_lapic_id:
|
||||
push %rbp
|
||||
mov %rsp, %rbp
|
||||
|
||||
push %rbx
|
||||
|
||||
mov $0x00000001, %eax
|
||||
cpuid
|
||||
shrq $0x18, %rbx
|
||||
|
||||
mov %rbx, %rax
|
||||
|
||||
pop %rbx
|
||||
pop %rbp
|
||||
ret
|
||||
|
||||
.global ap_trampoline
|
||||
.type ap_trampoline, @function
|
||||
.code16
|
||||
|
||||
ap_trampoline:
|
||||
mov $0xFF, %ax
|
||||
cli
|
||||
hlt
|
||||
Reference in New Issue
Block a user