Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 5 May 1999 10:01:55 +0100 (BST)
From:      Doug Rabson <dfr@nlsystems.com>
To:        CyberPsychotic <fygrave@tigerteam.net>
Cc:        freebsd-hackers@freebsd.org, tech@openbsd.org
Subject:   Re: io ports reading/writing
Message-ID:  <Pine.BSF.4.05.9905051001000.411-100000@herring.nlsystems.com>
In-Reply-To: <Pine.GSO.4.05.9905051339310.632-100000@kyrnet.kg>

next in thread | previous in thread | raw e-mail | index | archive | help
On Wed, 5 May 1999, CyberPsychotic wrote:

> ~ 
> ~ I think you just open /dev/io and use inb/outb.  Be warned that this will
> ~ only work on i386 - the alpha uses a library, libio, to emulate inb/outb
> ~ in user programs.
> 
>  you say that on i386, 
> open("/dev/io",O_RDWR); foo=inb(PORT_X); bar=outb(foo,PORT_Y); would work?
>  if so, in this scheme I don't quite understand how kernel would handle the
> access to io ports. F.e. assuming that opening /dev/io, would give
> permittions to all io ports would be quite dangerous (since not all programs
> which could be permitted to modify cmos, should be permitted to ports
> controlling disk access etc).
> 
> would you mind eleborating this abit?
> 

The access control for io ports is controlled by the file-system
permissions on /dev/io. In a standard setup, only root can access this
device.


--
Doug Rabson				Mail:  dfr@nlsystems.com
Nonlinear Systems Ltd.			Phone: +44 181 442 9037




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?Pine.BSF.4.05.9905051001000.411-100000>