x86_64: init local apic on boot, or legacy pic/pit as fallback
This commit is contained in:
18
arch/x86_64/acpi/apic_ctrl.S
Normal file
18
arch/x86_64/acpi/apic_ctrl.S
Normal file
@@ -0,0 +1,18 @@
|
||||
.global check_apic
|
||||
.type check_apic, @function
|
||||
check_apic:
|
||||
push %rbp
|
||||
mov %rsp, %rbp
|
||||
|
||||
push %rbx
|
||||
mov $1, %rax
|
||||
cpuid
|
||||
|
||||
andl $0x200, %edx
|
||||
shr $9, %edx
|
||||
|
||||
mov %rdx, %rax
|
||||
|
||||
pop %rbx
|
||||
pop %rbp
|
||||
ret
|
||||
Reference in New Issue
Block a user