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
GDT interrupt gates
RE:GDT interrupt gates
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
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