Re: Bios

aem@netcom.ca
Sun, 17 May 1998 12:20:59 -0400 (EDT)


> Bios calls under Linux a big no no ?
>
> recently I tried this on 2.0.33 & 2.1.102
> mov eax,13h
> int 10h
>
> as a little test, might it not work due to Linux virtualizing the ports
> ?
> Is it always a good idea to let the kernel dictate port usage ?
>
> Marinus

The BIOS is 16-bit real mode code that expects to be the only thing
running, and to have the freedom to do anything it wants to the machine
state.

Linux is 32-bit protected mode code that tightly controls all execution,
and only expects well behaved drivers to fiddle with hardware.

They are not very compatible (unless you manage to start a VM86 process
and configure everything so the BIOS doesn't know it's in protected mode,
which in practice is not always possible). Some BIOS code can run in
protected mode (example: Plug-and-Play has a 16-bit protected mode BIOS
API), but it is still a big pain to get them working. I think VESA BIOSes
have something similar, but you can not expect it to be present 100% of
the time, especially on older machines. You definitely do not have access
to BIOS and DOS software interrupts like INT 10h though.

The only place you can do BIOS fiddling reliably is before the Linux
code switches to protected mode in setup.S

--
Andrew E. Mileski   mailto:aem@netcom.ca

- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.rutgers.edu