Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 07 Nov 2002 10:51:31 -0500 (EST)
From:      John Baldwin <jhb@FreeBSD.org>
To:        Christoph Hellwig <hch@infradead.org>
Cc:        freebsd-hackers@FreeBSD.ORG, Julien Mabillard <jmab@gve.ch>
Subject:   Re: sio i/o
Message-ID:  <XFMail.20021107105131.jhb@FreeBSD.org>
In-Reply-To: <20021107150542.A28917@infradead.org>

next in thread | previous in thread | raw e-mail | index | archive | help

On 07-Nov-2002 Christoph Hellwig wrote:
> On Thu, Nov 07, 2002 at 09:33:29AM -0500, John Baldwin wrote:
>> 
>> On 07-Nov-2002 Julien Mabillard wrote:
>> > hi,
>> > can anyone tell me where inb(), outb() are defined
>> > in the sources (FreeBSD RELENG_4_7 or CURRENT)?
>> > on linux systems this is defined in <sys/io.h>
>> 
>> For FreeBSD should be using bus_space_read_1() and bus_space_write_1()
>> instead.  However, you can find inb() and outb() in
>> <machine/cpufunc.h> on i386 and compatibility macros for some other
>> arch's in <machine/bus.h>
> 
> Umm, <sys/io.h> ispurely a userland header on linux, so he's probably
> referring to the userland versions of those that are provided by the
> linux ports with PC-like hardware..

Doing I/O from userland generally isn't supported.  A header with <sys/>
is a kernel header though, not a userland one. :)  For i386-only, if
you do the right calls to obtain permission to do I/O, the functions
in machine/cpufunc.h should work however.

-- 

John Baldwin <jhb@FreeBSD.org>  <><  http://www.FreeBSD.org/~jhb/
"Power Users Use the Power to Serve!"  -  http://www.FreeBSD.org/

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-hackers" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?XFMail.20021107105131.jhb>