GDT, 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
Dozzer

GDT, IDT

Post by Dozzer »

GDT and IDT tables should be located below 0x100000 (1M) or it doesn't matter and I can locate it above 1M?
User avatar
df
Member
Member
Posts: 1076
Joined: Fri Oct 22, 2004 11:00 pm
Contact:

Re: GDT, IDT

Post by df »

you can locate them anywhere in physical memory.
-- Stu --
K.J.

Re: GDT, IDT

Post by K.J. »

How do you choose where to load them in memory? Is there something in EAX/AX that you do before you call lgdt/lidt?

K.J.
Dozzer

Re: GDT, IDT

Post by Dozzer »

i do following:
grub loads my kernel at 0x100000 (1M) and above,
the gdt and idt tables are created in code section of kernel, i.e. above 1M.
when i set idt, remap interrupt and enable them triple fault occurs (gdt was setted far far before that and may be work?).
the bochs log contains this statement (before first exception) (not exactly):
..... incorrect .. gate .. non-executable segment..

why? i try to locate gdt, idt at 0x0000 - 0x..... lets see.
Post Reply