From: techs@pioneer.unm.edu (Erik Fichtner) Subject: inb/outb babble.. was Re: Problem with inb and outb.. Date: 14 Jun 1992 19:16:22 GMT
In article <1992Jun14.102604.11229@uniwa.uwa.edu.au> oreillym@tartarus.uwa.edu.au (Michael O'Reilly) writes:
>techs@pioneer.unm.edu (Erik Fichtner) writes:
>: Well, Here I am working on the dos emulator.... more things
>: What's wrong here??!
>
>User programs CAN'T do arbitrary I/O to ports. You have to go via the
>ioperm sys call to explicity allow it. In general you shouldn\'t need to
>go to the ports as linux can get very confused if you do. Allowing the
>dos emulator to do all the port I/O it wants is almost guarenteed to
>crash linux.. ;)
>
Heheh.. Yes, a friend and I realize that this will probably defeat the
purpose of Linux, but we're stubborn. I want it to run WWIV. that's
the only program I have any need of from DOS. also need Turbo C to keep
WWIV happy. these programs both requre heavy port io. anyway, this
is the end goal I'm working towards. for ports that really destroy Linux,
IE Keyboard and Video, i'll probably end up HAVING to write some device driver
for it, but for a lot of things, like a simple inb from the video display
asking what mode the display is in should be allowed.
My friends's goal is to hack the kernel to allow switching between graphics
consoles so that he can run X on one console and GeoWorks under the dos
emulator. ;-) It'll be a cool hack if it works. so will the port stuff,
i think.
anyway... i've gotten lots of mail about ioperm(). thanks to those who
sent info...
>A better way to go would be to emulate the port in question. I.e. if it
>is trying to directly access the serial port, translate this to read()
>and write() and ioctl()'s on a serial device.
>
Ugh. This is a good idea for devices you KNOW about. like the keyboard,
video, serial, parallel, and so forth. but what if the DOS emulator
wants to talk to... a Colorado Tape Drive, for instance. That's not
something that Linux even understands.... nor do I, or I'd write a kernel
patch... Since it's not being used, i see no fault in letting something
that understands it deal with it unrestricted.
>: Totally confused,
....less confused now... much less...
-- Techs [techs@pioneer.unm.edu][Space and Planatary Image Facility] "What do ya mean I ain't kind? Just not *your* kind!" - Megadeth Disclaimer - Any inaccuracies are caused by the phase of the moon.