![]() |
| ||
| Hardware interactions on Linux Does anyone here have any tips on using inb and outb for interacting with hardware on a Linux system? iopl(2) and inb(0x61) don't seem to work very nicely... Infact, inb(0x61) gives me a segfault. PS: My reliance on this forum is starting to become embarrassing :P |
| ||
| Re: Hardware interactions on Linux >>Does anyone here have any tips on using inb and outb for interacting with hardware on a Linux system? Yes -- you can not use them because the os won't let you access the ports directly. >>Infact, inb(0x61) gives me a segfault. Yup :) |
| ||
| Re: Hardware interactions on Linux Quote:
|
| ||
| Re: Hardware interactions on Linux No version of MS-Windows since Win95 nor any version of *nix will allow you to use those inp and outp functions. So putting Vista back won't help you either. |
| ||
| Re: Hardware interactions on Linux Quote:
|
| ||
| Re: Hardware interactions on Linux I realize that this thread is old, but it is still useful to correct an erroneous assertion about inb(), outb(), etc., especially given that Google drops people in here when looking for an answer to why these functions segfault, even when all the advice featured elsewhere is followed. The truth is that these functions do in fact work, even under the most recent versions of the kernel (as of 8/11/09). However, they will not work from a user mode program unless the program is run as root (sudo...). It is also true that they will segfault if iopl(3) is not used. iopl(2) is not good enough. It is also true that the method of using ioperm() fails, apparently no matter how it is used. This may have worked in older kernels, but it now always gives a segfault. The only means of using these function seems to be calling iopl(3) first. (Ubuntu Interpid, 2.6.28-15-generic, x86_64 GNU/Linux) |
| ||
| Re: Hardware interactions on Linux Better late than never. Many thanks, this problem cost me a good grade last year :) |
| All times are GMT -4. The time now is 9:49 pm. |
Forum system based on vBulletin Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
©2003 - 2009 DaniWeb® LLC