gila/src/kernel/arch/x86_64/asm.rs
August c6e032d9c9
All checks were successful
Continuous Integration / Check (push) Successful in 42s
Continuous Integration / Clippy (push) Successful in 40s
Back to one crate. idk what I was doing earlier
2026-06-30 20:45:09 +00:00

23 lines
366 B
Rust

// Copyright (c) 2025 shibedrill
// SPDX-License-Identifier: MIT
use core::arch::asm;
use intbits::Bits;
pub fn nop() {
::x86_64::instructions::nop();
}
pub fn long_mode() -> bool {
let mut output: u32;
unsafe {
asm!(
"mov eax, 0x80000001",
"cpuid",
out("edx") output,
)
}
output.bit(29)
}