GDT interrupt gates

Question about which tools to use, bugs, the best way to implement a function, etc should go here. Don't forget to see if your question is answered in the wiki first! When in doubt post here.
Post Reply
pepito

GDT interrupt gates

Post 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
hartyl

RE:GDT interrupt gates

Post 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
pepito

RE:GDT interrupt gates

Post by pepito »

Thank you!

I am working on...

pepito
Post Reply