APIC Register access

Question about which tools to use, bugs, the best way to implement a function, etc should go here. Don't forget to see if your question is answered in the wiki first! When in doubt post here.
Post Reply
stdcall
Member
Member
Posts: 78
Joined: Thu Mar 14, 2013 1:30 am

APIC Register access

Post 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.
“Meaningless! Meaningless!”
says the Teacher.
“Utterly meaningless!
Everything is meaningless.” - Ecclesiastes 1, 2

Educational Purpose Operating System - EPOS
Opcode
Member
Member
Posts: 29
Joined: Mon Apr 01, 2013 2:50 pm

Re: APIC Register access

Post 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.
Post Reply