Megacommit to move some memory code into kernel crate
This commit is contained in:
@@ -3,11 +3,11 @@ pub mod model_specific_registers {
|
||||
use spin::Lazy;
|
||||
use x86_64::registers::model_specific::Msr;
|
||||
|
||||
const CPUID_FLAG_MSR: u32 = 1 << 5;
|
||||
static EDX: Lazy<u32> = Lazy::new(|| unsafe { __cpuid(1).edx });
|
||||
const _CPUID_FLAG_MSR: u32 = 1 << 5;
|
||||
static _EDX: Lazy<u32> = Lazy::new(|| unsafe { __cpuid(1).edx });
|
||||
|
||||
pub fn cpu_has_msr() -> bool {
|
||||
*EDX & CPUID_FLAG_MSR != 0
|
||||
pub fn _cpu_has_msr() -> bool {
|
||||
*_EDX & _CPUID_FLAG_MSR != 0
|
||||
}
|
||||
|
||||
pub fn cpu_get_msr(msr: u32, value: &mut u64) {
|
||||
|
||||
Reference in New Issue
Block a user