Is the IDT accessed via MMU address translation?

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
Armin
Posts: 10
Joined: Sun Nov 22, 2009 6:16 am

Is the IDT accessed via MMU address translation?

Post by Armin »

Hi all,

when I enable paging in my OS, I first map my kernel 1:1 (physical to virtual addresses) and then I map my kernel to the virtual base address 0xC0000000 and finally I unmap the 1:1 kernel mapping. The problem is that when I remove the 1:1 kernel mapping (I set the corresponding pages to "not present" in the page table), Interrupts are not working any more.

According to my understanding, I thought Interrupt handling is not affected by paging at all, because the IDT is accessed via physical addresses. So any kernel mapping should not play a role for interrupt handling. But in my kernel, it seems, as if a 1:1 mapped kernel is necessary in order to access the IDT.

Does anyone know how it really works resp. what could be the error here?

Thanks in advance.
gerryg400
Member
Member
Posts: 1801
Joined: Thu Mar 25, 2010 11:26 pm
Location: Melbourne, Australia

Re: Is the IDT accessed via MMU address translation?

Post by gerryg400 »

IDT is accessed by virtual address. You will need to reload the IDT, GDT etc after enabling paging if your mapping is not 1:1

The only odd thing is that lgdt and lidt access linear (non-segmented) address. But since most segments are zero-based this doesn't matter.

- gerryg400
If a trainstation is where trains stop, what is a workstation ?
Post Reply