Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 24 Mar 1998 21:36:34 -0600
From:      Jonathan Lemon <jlemon@americantv.com>
To:        Michael Searle <searle@longacre.demon.co.uk>
Cc:        freebsd-questions@FreeBSD.ORG
Subject:   Re: use of /dev/io
Message-ID:  <19980324213633.43955@right.PCS>
In-Reply-To: <m2C127B69@longacre.demon.co.uk>; from Michael Searle on Mar 03, 1998 at 11:22:20PM %2B0000
References:  <m2C127B69@longacre.demon.co.uk>

next in thread | previous in thread | raw e-mail | index | archive | help
On Mar 03, 1998 at 11:22:20PM +0000, Michael Searle wrote:
> I'm having problems doing direct IO with /dev/io - AFAIK, you just open this
> device to change the memory permissions to allow access to IO addresses.
> But I just get a segv, although the open succeeds. (I think the IO addresses
> may have been remapped, as this port address is from DOS and man mem says
> this has been done for the ISA space.) This is my code:

The IO address space is separate from the memory address space,
and is accessed with the inb/outb instructions.  In your code, you
are attempting to read memory location 0x3da; you should use
something like inb(x03da).  (where inb is the appropriate asm insn.)
--
Jonathan

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



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