diff options
Diffstat (limited to 'kernel/src/interrupts/apic.rs')
-rw-r--r-- | kernel/src/interrupts/apic.rs | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/kernel/src/interrupts/apic.rs b/kernel/src/interrupts/apic.rs index 93fba8b..2761fb9 100644 --- a/kernel/src/interrupts/apic.rs +++ b/kernel/src/interrupts/apic.rs @@ -11,17 +11,13 @@ const APIC_SW_ENABLE: u32 = 0x0000_0100; pub fn is_x2apic() -> bool { let info: u32; - unsafe { - asm!("cpuid" : "={ecx}" (info) : "{eax}" (1) : "memory"); - } + unsafe { asm!("cpuid", inout("eax") 1 => _, out("ecx") info) } info & (1 << 21) != 0 } pub fn is_apic() -> bool { let info: u32; - unsafe { - asm!("cpuid" : "={edx}" (info) : "{eax}" (1) : "memory"); - } + unsafe { asm!("cpuid", inout("eax") 1 => _, out("edx") info) } info & (1 << 9) != 0 } |