Page 1 of 1

GDT, IDT

Posted: Sun Mar 10, 2002 5:29 pm
by Dozzer
GDT and IDT tables should be located below 0x100000 (1M) or it doesn't matter and I can locate it above 1M?

Re: GDT, IDT

Posted: Sun Mar 10, 2002 9:11 pm
by df
you can locate them anywhere in physical memory.

Re: GDT, IDT

Posted: Sun Mar 10, 2002 9:29 pm
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.

Re: GDT, IDT

Posted: Sun Mar 10, 2002 10:46 pm
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.