How to use int 13 while BSD is running

John Baldwin jhb at FreeBSD.org
Thu Mar 11 10:06:01 PST 2004


On Thursday 11 March 2004 12:55 am, Jason Dictos wrote:
>  Hello again.
>
>    I did some reading on the pentium processor manual, and I think I
> finally understand what the set of vm86 functions do. They use the intel
> processors virtual 8086 processor compatability mode to issue virtual
> interrups. My question is now, what prevents such int 13 type interrups 
> using the vm86 set of apis (as found in biosdisk.c, in the BTX loader code)
> from working from working in a standard BSD running system?

Well, for one thing, the BIOS drivers for your hardware are going to want 
working interrupts, and running in a full BSD kernel isn't going to give you 
that.  Since BTX routes all interrupts via vm86 mode back to the original 
real mode interrupt handlers, it still works ok for any device that has a 
BIOS.  It might be possible to achieve this with a BSD kernel but it would be 
a pain.  One problem is that you don't know what IRQs the hardware is using.
Note that the BTX user app has a mostly flat address space that allows it to 
get to everything above 0x10000 (I think that's the number, might be 0xa000).
Trying to get multithreading plus vm86 interrupt handlers is going to require 
a good bit of work either way (either trying to let the kernel do vm86 
interrupts or trying to extend BTX to allow multiple tasks).

-- 
John Baldwin <jhb at FreeBSD.org>  <><  http://www.FreeBSD.org/~jhb/
"Power Users Use the Power to Serve"  =  http://www.FreeBSD.org


More information about the freebsd-hardware mailing list