summaryrefslogtreecommitdiff
path: root/kernel/src/interrupts/apic.rs
diff options
context:
space:
mode:
authorNatrixAeria <upezu@student.kit.edu>2021-03-22 20:36:15 +0100
committerNatrixAeria <upezu@student.kit.edu>2021-03-22 20:36:15 +0100
commit861073d07b0fd70c5017fa96aa67dd7df4de9443 (patch)
tree726dd42c9d9fe4e01d59f24d7f55f1e3cf142532 /kernel/src/interrupts/apic.rs
parent2701fe07b4c8c9b6a36112c98fbfc900acbd6cf3 (diff)
Refresh rust version
Diffstat (limited to 'kernel/src/interrupts/apic.rs')
-rw-r--r--kernel/src/interrupts/apic.rs8
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
}