Re: inb/outb strangeness

Matthew Vanecek (mev0003@unt.edu)
Wed, 15 Sep 1999 10:51:33 -0500


Sven Geggus wrote:
>
> Hello,
>
> I've got a Problem with outb on recent Kernels (2.2 series) in a loadable
> module I ported to 2.2.x.
> I don't remeber, that I had this Problem on 2.0.x though.
>
> When I do outb(some_value,REGISTER) this sometimes just does _not_ work.
>
> Sometimes means that it works on some registers and does not work on others.
> Using outb_p instead does not solve this Problem either.
>
> A strange thing happens when I try to access the Register in usermode! I've
> got an old libc5 binary which does the outb from the commandline.
>
> This old binary happens to set the Register correctly! When compiling the
> same code with glibc (replacing with correct .h files of course) the
> commandline outb does not work as well.
>
> I don't rember wheater or not outb_p was working in usermode using libc5, but
> it always causes segmentation faults when used in a glibc binary.
>
> Let me summarize this:
>
> In case of a special configuration register the outb command in kernelmode
> _does not work_. Writing the same Register from userland _does work_ using a
> libc5 binary. Writing the Register using a glibc binary _does not work_ as
> well.
>
> Would be nice if anybody of the hardware-hackers could give me a hint, as
> I'm really stuck with this Problem at the Moment.
>
> Regards
>
> Sven
>

Are you compiling with the correct compile flags? Refer to the outb(2)
man page. There's also supposed to be an outb(9) man page somewhere,
but it doesn't seem to exist. Anybody?

HTH,

-- 
Matthew Vanecek
Course of Study: http://www.unt.edu/bcis
Visit my Website at http://people.unt.edu/~mev0003
For answers type: perl -e 'print
$i=pack(c5,(41*2),sqrt(7056),(unpack(c,H)-2),oct(115),10);'
*****************************************************************
For 93 million miles, there is nothing between the sun and my shadow
except me. I'm always getting in the way of something...

- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.rutgers.edu Please read the FAQ at http://www.tux.org/lkml/