Page 1 of 1

APIC Register access

Posted: Thu Apr 04, 2013 12:13 pm
by stdcall
Hi, Newbie question here...
On the APIC wiki page,
The following functions are referenced: (WriteRegister(), ReadRegister())

Code: Select all

/* Set the Spourious Interrupt Vector Register bit 8 to start receiving interrupts */
    WriteRegister(0xF0, ReadRegister(0xF0) | 0x100);
How do I Implement them, do I access the registers with outb, or is it mapped in memory ?

Thanks.
Ramon.

Re: APIC Register access

Posted: Thu Apr 04, 2013 12:55 pm
by Opcode
The APIC is typically located @ 0xFEE00000. (You can get away with this, but the proper way is to check for the correct location). Thus what you wrote is the equivalent to:

[0xFEE000F0] |= 0x100;

UPDATE: Fixed memory address. Had IOAPIC's base address instead of LAPIC's.