From 861073d07b0fd70c5017fa96aa67dd7df4de9443 Mon Sep 17 00:00:00 2001 From: NatrixAeria Date: Mon, 22 Mar 2021 20:36:15 +0100 Subject: Refresh rust version --- kernel/src/interrupts/apic.rs | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) (limited to 'kernel/src/interrupts/apic.rs') 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 } -- cgit v1.2.3-54-g00ecf