*BSD News Article 17611


Return to BSD News archive

Path: sserve!newshost.anu.edu.au!munnari.oz.au!uunet!mcsun!Germany.EU.net!news
From: bs@Germany.EU.net (Bernard Steiner)
Newsgroups: comp.os.386bsd.questions
Subject: inb(), /dev/mem and mmap(2)
Date: 28 Jun 1993 14:24:52 +0200
Organization: EUnet Deutschland GmbH, Dortmund, Germany
Lines: 26
Distribution: world
Message-ID: <20mnuk$ai4@Germany.EU.net>
NNTP-Posting-Host: qwerty.germany.eu.net


Folks,
Could someone out there enlighten me as to why mmap() fails on character
special files such as /dev/mem or /dev/zero, but works OK on regular files ?

How does one read a byte from an ISA IOport ? Opening /dev/mem, lseek()ing
to 0xa0000+offset and then read()ing a byte does not appear to work.

Has anybody implemented the /dev/ioport stuff ?
I've seen the stubs in i386/i386/mem.c, but then some macros seem to be
missing :-(

Is there any other way of doing an inb() and outb() outside the kernel ?

Am I just plain stupid, or may it be the case that some vital documentation is
missing ?

Thanks,
	Bernard
-- 
=====    ____                          =====   EUnet Deutschland GmbH
=====   /      /   /   ___    ___  _/_ =====   Emil-Figge-Str. 80
=====  /----  /   /  /   /  /___/  /   =====   D-W-4600 Dortmund 50
===== /____  /___/  /   /  /___   /    =====   Germany
=======                              =======   Vox +49 231 972 2222
======= Connecting Europe since 1982 =======   Fax +49 231 972 1111