From: tzs@stein2.u.washington.edu (Tim Smith) Subject: Re: How about a Linux kernel that uses the BIOS for harddrive I/O Date: 19 May 1993 10:38:13 GMT
bsa@kf8nh.wariat.org (Brandon S. Allbery) writes:
>Actually, no. Linux already supports v86 mode (witness dosemu) --- all it has
>to do is keep around a v86 tss with maybe 128K "conventional" memory and the
>disk and system BIOS mapped in. It doesn't need to virtualize anything, since
>its purpose is to let the BIOS do the hardware access.
>
>But I've never looked at the disk BIOS routines. Do they ever want to access
>the keyboard or screen? If they do, then the kernel has to virtualize them...
>ugh.
BIOS routines often want to use the screen when they initialize to print
a copyright message. Sometimes they also like to print what devices
they found (e.g., a SCSI BIOS might print what devices are available).
This should be easy to deal with: just map in some memory to the address
the BIOS thinks the screen is at, and let it write away. It doen't have
to know that the memory is not really screen memory.
Some BIOSs might want to check the keyboard, although I don't think that is
too common -- most likely it would be some debugging option (e.g., if space
is pressed, don't find any disks, so the system will boot from a second
controller) that no one took out. Again, you wouldn't actually have to
fully handle a virtual keyboard. Just make the BIOS think that no key
is pressed.
One thing you will have to watch out for. The BIOS may need physical
addresses. If you were a masochist, you might think of trapping access
to the DMA controller, and catching loads of addresses, and converting
them to physical addresses. Don't even think of this. First of all, it
will be very hard. Second, it won't work for all host adaptors: bus
master host adaptors have their own built in DMA controllers, and you
won't catch access to those. What you will need to do is make sure that
the memory you run the V86 task in is mapped in such a way that when the
V86 task does seg*16+off, it sends up with the actual physical address.
I don't know how hard this is, not having a copy of Linux to examine.
(I'm just reading this group to keep up in case Linux is ever ported
to the Mac so I can try it).
--Tim Smith