Mailing List Archive

inb/outb strangeness
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
--
|_||_||||| Sven Geggus @ Fraunhofer Institut fuer Informations- und
|_||_||||| Datenverarbeitung, Karlsruhe, GERMANY
| | Phone: +49 6091-422, Web: http://wsd.iitb.fhg.de/
| IITB | ... LinuX powered DATA aquisition and evaluation
-
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/
Re: inb/outb strangeness [ In reply to ]
On Wed, 15 Sep 1999, Sven Geggus wrote:
> 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.
are you sure it's not some egcs miscompilation or broken assembly
constraint?
-- mingo
-
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/
Re: inb/outb strangeness [ In reply to ]
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/
Re: inb/outb strangeness [ In reply to ]
In article <37DFC085.68F6F536@unt.edu> you wrote:
> Are you compiling with the correct compile flags? Refer to the outb(2)
> man page.
shure, I wouldn't post to Linux Kernel if I had not RTFM before. As I
already said, it works on libc5.
> There's also supposed to be an outb(9) man page somewhere,
> but it doesn't seem to exist. Anybody?
i don't have one as well.
Regards
Sven
--
|_||_||||| Sven Geggus @ Fraunhofer Institut fuer Informations- und
|_||_||||| Datenverarbeitung, Karlsruhe, GERMANY
| | Phone: +49 6091-422, Web: http://wsd.iitb.fhg.de/
| IITB | ... LinuX powered DATA aquisition and evaluation
-
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/
Re: inb/outb strangeness [ In reply to ]
Sven Geggus wrote:
> 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.
I'm using a standard glibc.
outb_p works fine for me as do inb_p and outw_p.
The non-_p variants should work fine too but I've haven't used them recently.
-- Jamie
-
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/