Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 17 Apr 1997 13:05:40 -0700
From:      Julian Elischer <julian@whistle.com>
To:        Brett Glass <brett@lariat.org>
Cc:        dk+@ua.net, freebsd-hardware@FreeBSD.org
Subject:   Re: talk to I/O Devices.
Message-ID:  <33568294.2781E494@whistle.com>
References:  <3.0.1.32.19970417092103.0070f97c@lariat.org>

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

Brett Glass wrote:
> 
> At 11:54 PM 4/16/97 -0700, Dmitry Kohmanyuk wrote:
> 
> >> Fascinating. What does opening this "file" actually do? (I can't find it
> >> in the source.)
> >
> >look at /sys/i386/i386/mem.c:mmopen() and others in that file.
> 
> Just looked at it, and it appears that this file opens the I/O space
> as a random-access device. But accessing ports this way would slow
> code down so dramatically that it could be useless for many
> control applications! Also, the sample code in previous messages in
> this thread seems to indicate that one can read and write directly.
> How is this done?
> 
> --Brett


no, openning /dev/io 
doesn't do anything except set a bit on your process descriptor
that allows your process to do IO instructions directly..
otherwise inb() and outb() are priveleged instructions and will
cause an access fault.


home | help

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