Read hardware register

I need to read a hardware port status register every now and then. I suppose I can write a special driver, but it seems likely that there is already some generic way to read a hardware port from a simple user-level C program. I have found various examples using instructions like ioperm() and iopl() and also suggestions that FreeBSD supports some /dev/xxxxx driver that can be used from userland. I have still not found any FreeBSD example code that I've been able to compile. It would be nice if someone can point me in the right direction. This specific function is for a 386 compatible platform (ALIX).
 
Back
Top