Some confusion about interrupt redirection
Posted: Tue Apr 23, 2013 11:17 am
Hello,
I'm sure it's practically a trivial question, but I'm still a bit confused.
The wiki says (right here):
Does this mean that interrupt redirection can be done in partial by the CPU? I mean, suppose you wanted your programs to have access to the BOUND exception, could I just set up the IDT to make it point to a fixed LDT entry (which, of course, should be present in all LDT's). So every time a task switch occurs, the BOUND (INT5) vector would potentially point to another piece of code, let's say set up by a user-callable kernel function. This would also mean the LDT selector could be set up to point to CPL=3 code, avoiding privilege switching.
And yet, if I recall correctly, most OSes do the redirection by hand. Why?
So ehrm, comments are welcome.
I'm sure it's practically a trivial question, but I'm still a bit confused.
The wiki says (right here):
Code: Select all
uint16_t selector; // a code segment selector in GDT or LDT
And yet, if I recall correctly, most OSes do the redirection by hand. Why?
So ehrm, comments are welcome.