Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

IA-32e 64-bit IDT Gate Descriptor

Tags:

People also ask

What is IDT and how to locate IDT?

The Interrupt Descriptor Table (IDT) is a data structure used by the x86 architecture to implement an interrupt vector table. The IDT is used by the processor to determine the correct response to interrupts and exceptions.

Which instruction used to access Interrupt Descriptor Table?

The int instruction allows a User Mode process to issue an interrupt signal that has an arbitrary vector ranging from 0 to 255. Therefore, initialization of the IDT must be done carefully, to block illegal interrupts and exceptions simulated by User Mode processes via int instructions.

What is Intel 64 architecture?

Intel® 64 architecture delivers 64-bit computing in embedded designs when combined with supporting software. Intel® 64 architecture improves performance by allowing systems to address more than 4 GB of both virtual and physical memory.


There is a Segment Selector in Intel's 64-bit IDT Gate Descriptor. However, from my understanding across the 5 part Intel manuals, the Linear Address of the Interrupt Handler is loaded into RIP from the 64-bit offset specified in the IDT Gate Descriptor.

The only use of the segment selector is to check:

  1. if there is a change in privilege levels
  2. the Interrupt Handler is truly pointing to a code segment

My questions then is:

  1. Is RIP taken from the 64-bit offset only? Or is RIP = offset(sign extended to 64-bits) + segment selector base?
  2. Is the base address pointed to by the segment selector in the IDT Gate Descriptor ignored? Or does it have a use?

Many thanks in advance!