Driver and what to expect them to expect?
Posted: Tue May 16, 2006 4:31 am
This time I'm not going to rant about some design trivia. Instead, this time I'd like genuine help (in form of advice) from people that actually have more than 3 drivers in their OS.
I don't care about performance or resource sharing at this point. Resource sharing problems I hope I know how to solve, and performance can be fixed AFTER it's a problem.
Instead, the real questions:
Are there many devices that (absolutely) need their drivers running with interrupts disabled all the time, assuming IO addresses and memory mapped areas aren't shared? What I mean is that you can't write a working driver without having access to processor interrupt flags, for example because talking to the driver is too time critical.
(I would expect there to be few or none)
Is concurrent execution of several unrelated drivers a problem? Should they be allowed to compete, or should I just use non-preemptive FIFO(or priority, whatever) scheduling for any drivers? In short, I know little about PC architecture after you step outside the processor.
For example: if I write a longword in 0x3F8, then let some other driver do unrelated IO, then read at 0x3FC, can I expect to get the right PCI device's configuration data, assuming that no other driver touched 0x3FC or a larger finite set of IO ports.
(Based on theory, I would assume that this should not be a problem, but I honestly don't know how things work in real life.)
If someone could give me some insight into those questions, it could help me avoid some nasty pitfalls.
edit: ARGH. I did preview it. I did read it. Ofcourse I ment "interrupts disabled all the time".
I don't care about performance or resource sharing at this point. Resource sharing problems I hope I know how to solve, and performance can be fixed AFTER it's a problem.
Instead, the real questions:
Are there many devices that (absolutely) need their drivers running with interrupts disabled all the time, assuming IO addresses and memory mapped areas aren't shared? What I mean is that you can't write a working driver without having access to processor interrupt flags, for example because talking to the driver is too time critical.
(I would expect there to be few or none)
Is concurrent execution of several unrelated drivers a problem? Should they be allowed to compete, or should I just use non-preemptive FIFO(or priority, whatever) scheduling for any drivers? In short, I know little about PC architecture after you step outside the processor.
For example: if I write a longword in 0x3F8, then let some other driver do unrelated IO, then read at 0x3FC, can I expect to get the right PCI device's configuration data, assuming that no other driver touched 0x3FC or a larger finite set of IO ports.
(Based on theory, I would assume that this should not be a problem, but I honestly don't know how things work in real life.)
If someone could give me some insight into those questions, it could help me avoid some nasty pitfalls.
edit: ARGH. I did preview it. I did read it. Ofcourse I ment "interrupts disabled all the time".