X86_64: Interrupts and TSS
Posted: Tue Jun 03, 2025 12:12 pm
Dear Forum,
I am a bit confused about Gate types and using the IST fields of the TSS. If I understand correctly, I need it for switching from ring 3 to ring 0 in case of an IRQ (for system calls I will use syscall only).
If my IRQ gets called while in DPL3, it loads the stack from the IST0 field. But when another IRQ with higher priority triggers, it reloads IST0 and therefore overrides the stack???
Edit: I got it now: As it is already in DPL0, it doesn't load the IST0. That was my fault.
But I am still confused when to use which gate type in the IDT. Which interrupts should be reentrant? Well, exceptions can occur anytime, because only IRQs are dependent on the IF-flag, right?
Best regards
Sebi
I am a bit confused about Gate types and using the IST fields of the TSS. If I understand correctly, I need it for switching from ring 3 to ring 0 in case of an IRQ (for system calls I will use syscall only).
If my IRQ gets called while in DPL3, it loads the stack from the IST0 field. But when another IRQ with higher priority triggers, it reloads IST0 and therefore overrides the stack???
Edit: I got it now: As it is already in DPL0, it doesn't load the IST0. That was my fault.
But I am still confused when to use which gate type in the IDT. Which interrupts should be reentrant? Well, exceptions can occur anytime, because only IRQs are dependent on the IF-flag, right?
Best regards
Sebi