x86_64: init local apic on boot, or legacy pic/pit as fallback

This commit is contained in:
2023-03-19 20:36:36 +00:00
parent 7e26050bde
commit 8e9127cd6a
13 changed files with 274 additions and 72 deletions

View 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