Page 1 of 1

reinstalling the IDT /GDT

Posted: Thu Nov 20, 2008 6:01 pm
by SphinCorp
What would happen, should you install create two different IDTs/GDTs and install them at different moments? (bootloader + kernel)

Re: reinstalling the IDT /GDT

Posted: Thu Nov 20, 2008 6:11 pm
by Combuster
Have you even RTFMed that?

Re: reinstalling the IDT /GDT

Posted: Thu Nov 20, 2008 6:36 pm
by neon
Are you expecting something special to happen the second time that you install a GDT or IDT? ;)

To put in other words, nothing would happen. (Depending on how different they are, you may need to do some setup work before reinstalling them though...The same principle with installing them for the first time).

Re: reinstalling the IDT /GDT

Posted: Thu Nov 20, 2008 7:32 pm
by CodeCat
lgdt and lidt store the current GDT and IDT in a hidden register. Every time you use those instructions, the register's contents, and therefore the GDT and IDT, are replaced with a new one.

Re: reinstalling the IDT /GDT

Posted: Thu Nov 20, 2008 9:04 pm
by Love4Boobies
Having more than one IDT isn't all that uncommon anyway.