pub fn attach(&mut self) {
        // Enable
        unsafe {
            self.base = rdmsr(IA32_APIC_BASE);
            self.base.set_bit(10, true); // Enable x2APIC
            self.base.set_bit(11, true); // Enable xAPIC
            wrmsr(IA32_APIC_BASE, self.base);

            //TODO: let mut lint0 = rdmsr(IA32_X2APIC_LVT_LINT0);
            // TODO: Fix magic number
            let lint0 = 1 << 16 | (1 << 15) | (0b111 << 8) | 0x20;
            wrmsr(IA32_X2APIC_LVT_LINT0, lint0);

            let _esr = rdmsr(IA32_X2APIC_ESR);
        }
    }
/// Attach to APIC (enable x2APIC mode, initialize LINT0)
Attach to APIC (enable x2APIC mode, initialize LINT0)
Attach to APIC ( enable x2APIC mode initialize LINT0 )
pub fn attach(&mut self) {
        // Enable
        unsafe {
            self.base = rdmsr(IA32_APIC_BASE);
            self.base.set_bit(10, true); // Enable x2APIC
            self.base.set_bit(11, true); // Enable xAPIC
            wrmsr(IA32_APIC_BASE, self.base);
            //TODO: let mut lint0 = rdmsr(IA32_X2APIC_LVT_LINT0);
            // TODO: Fix magic number
            let lint0 = 1 << 16 | (1 << 15) | (0b111 << 8) | 0x20;
            wrmsr(IA32_X2APIC_LVT_LINT0, lint0);
            let _esr = rdmsr(IA32_X2APIC_ESR);
        }
    }
pub fn attach ( & mut self ) { // Enable unsafe { self . base = rdmsr ( IA32_APIC_BASE ) ; self . base . set_bit ( 10 , true ) ; // Enable x2APIC self . base . set_bit ( 11 , true ) ; // Enable xAPIC wrmsr ( IA32_APIC_BASE , self . base ) ; //TODO: let mut lint0 = rdmsr(IA32_X2APIC_LVT_LINT0); // TODO: Fix magic number let lint0 = 1 << 16 | ( 1 << 15 ) | ( 0b111 << 8 ) | 0x20 ; wrmsr ( IA32_X2APIC_LVT_LINT0 , lint0 ) ; let _esr = rdmsr ( IA32_X2APIC_ESR ) ; } }
Attach to APIC (enable x2APIC mode, initialize LINT0)
Attach to APIC ( enable x2APIC mode initialize LINT0 )
&mut self