Page 1 of 1

GDT interrupt gates

Posted: Tue Apr 27, 2004 11:00 pm
by pepito
Hello:

I incude a service hook_interrupt() into my OS, this service create an 'interrupt gate' into the GDT and fill it with the necesary information to handle some hardware interrupt. I provide this service to allow device drivers programmers to include an ISR into the device driver code.

The service works fine, but I have problem when I want to access data into the device driver code. It seems that the DS register is not loaded with the specify in the 'interrupt gate' then I can't access data into the device driver code.

Any idea?

Thank you,

pepito

RE:GDT interrupt gates

Posted: Tue Apr 27, 2004 11:00 pm
by hartyl
that's right, you have to set ds manually in the ISR.
could be difficult, for a device driver...
i don't know, maybe you say, ds = cs+8 (the next selector) and the driver-ISR may calculate the ds-value.
or you call an additional interrupt gate, which knows the values set by hook_interrupt(), set the ds-value (should be easy since it is part of your code) and then call the actual ISR.

greets, hartyl

RE:GDT interrupt gates

Posted: Wed Apr 28, 2004 11:00 pm
by pepito
Thank you!

I am working on...

pepito