Paging issue with IDT

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
User avatar
iocoder
Member
Member
Posts: 208
Joined: Sun Oct 18, 2009 5:47 pm
Libera.chat IRC: iocoder
Location: Alexandria, Egypt | Ottawa, Canada
Contact:

Paging issue with IDT

Post by iocoder »

Say I have 4 entries in GDT:
-> Entry for kernel CS 0x8.
-> Entry for kernel DS 0x10.
-> Entry for TSS of current task 0x18.
-> Entry for LDT of current task 0x20.
And there is 256 entries in IDT:
-> Each "used" entry has a logical address, with a selector value of "0x8" and an offset refers to the specific ISR.
And I have enabled Paging. Each task has its own Page Directory. During task switching, CR3 is changed to the new task's page directory base address.
My Question:
After changing the content of CR3 as said, an IRQ may invoke. when this IRQ invokes, the processor reads the logical address from the corresponding entry in kernel's IDT, doesn't it?, and then the logical address is translated using the page directory to which is referred by CR3, isn't it? so i have to make an IDT for each task, don't I?
Thanks and Regards, :D.
User avatar
b.zaar
Member
Member
Posts: 294
Joined: Wed May 21, 2008 4:33 am
Location: Mars MTC +6:00
Contact:

Re: Paging issue with IDT

Post by b.zaar »

Generally you have one IDT which is mapped into every application. You usually map it somewhere in kernel memory which should also be mapped into every application. This is how a higher half kernel works
"God! Not Unix" - Richard Stallman

Website: venom Dev
OS project: venom OS
Hexadecimal Editor: hexed
Post Reply