Linked by Hadrien Grasland on Fri 30th Dec 2011 08:24 UTC
Hardware, Embedded Systems In the world of alternative OS development, portability across multiple architectures is a challenging goal. Sometimes, it may be intrinsically hard to come up with hardware abstractions that work well everywhere, but many times the core problem is one of missing information. Here, I aim at learning more about the way non-x86 architectures deal with CPU IO ports, and in particular how they prevent user-mode software from accessing them.
Thread beginning with comment 501719
To view parent comment, click here.
To read all comments associated with this story, please click here.
RE[2]: IO on other platforms
by Alfman on Fri 30th Dec 2011 17:39 UTC in reply to "RE: IO on other platforms"
Alfman
Member since:
2011-01-28

For the sake of completeness, another solution is just to give the drivers no port access and then just let the OS handle the resulting CPU faults and emulate the requested PIO. However it's not clear that this would perform any better than having an explicit PIO syscall.

The trouble with fault handlers is that the handler has to decode the instruction that caused the fault, which may or may not be a straitforward thing to do and it's architecture specific.


Edit: I'm probably overthinking the problem here. If platform doesn't permit fine grained control over port access, then just allow access to all ports and leave it at that. While it sucks that this goes against micro-kernel ideals, there's nothing wrong stating that it's a hardware limitation.

Edited 2011-12-30 17:44 UTC

Reply Parent Score: 2