Also when an interrupt / trap occurs the CPU triple faults instead of calling my handler.
Can anyone help me?
The addresses in the IDT (if it is parsed manually as a 64-bit one) are valid virtual addresses placed by a NASM macro.
<edit>
The RIP value that bochs gives on the triple fault is NOT in the interrupt handler, it's in the faulting code.
</edit>
Output of 'info idt 0 7'
Code: Select all
<bochs:4> info idt 0 7
Interrupt Descriptor Table (base=0xffff80000020e000, limit=4095):
IDT[0x00]=32-Bit Trap Gate target=0x0018:0x0020ae6f, DPL=0
IDT[0x01]=??? descriptor hi=0x00000000, lo=0xffff8000
IDT[0x02]=32-Bit Trap Gate target=0x0018:0x0020ae79, DPL=0
IDT[0x03]=??? descriptor hi=0x00000000, lo=0xffff8000
IDT[0x04]=32-Bit Trap Gate target=0x0018:0x0020ae83, DPL=0
IDT[0x05]=??? descriptor hi=0x00000000, lo=0xffff8000
IDT[0x06]=32-Bit Trap Gate target=0x0018:0x0020ae8d, DPL=0
IDT[0x07]=??? descriptor hi=0x00000000, lo=0xffff8000
Code: Select all
dd 0x00180000,0x00008F00,0x00000000,0x00000000