OSDev.org

The Place to Start for Operating System Developers
It is currently Thu Mar 28, 2024 7:29 am

All times are UTC - 6 hours




Post new topic Reply to topic  [ 2 posts ] 
Author Message
 Post subject: Write to Register to Receive Interrupts for APIC
PostPosted: Sun Oct 30, 2022 8:55 pm 
Offline
Member
Member

Joined: Tue Sep 13, 2022 9:29 pm
Posts: 61
Code:
write_reg(0xF0, ReadRegister(0xF0) | 0x100);


I am a little confused on what this line is doing. It seems as though it writes the value 0x100 to the register 0xF0. I am also wondering how I would perform a task such as writing to this register as well as read from it.


Top
 Profile  
 
 Post subject: Re: Write to Register to Receive Interrupts for APIC
PostPosted: Sun Oct 30, 2022 9:33 pm 
Offline
Member
Member

Joined: Mon Mar 25, 2013 7:01 pm
Posts: 5099
FunnyGuy9796 wrote:
It seems as though it writes the value 0x100 to the register 0xF0.

It sets bit 8 without modifying the other bits.

FunnyGuy9796 wrote:
I am also wondering how I would perform a task such as writing to this register as well as read from it.

If you're using xAPIC or one of the ancient APICs, you access it the same as any other MMIO, and the ACPI MADT will tell you the base address. If you're using x2APIC, you access it using RDMSR/WRMSR, and the base address is 0x800.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 2 posts ] 

All times are UTC - 6 hours


Who is online

Users browsing this forum: Bing [Bot] and 59 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group