See i386_set_ioperm(2) and/or i386_iopl(2). For (probably obvious) reasons, inb/outb are disabled for most stuff in userspace, which is why you're getting the bus errors. The two calls cited above can be used to enable i/o space access from a process running as root. - Bill