Re: x86 - Realmode BIOS and Code calling module

From: Jozef Vesely
Date: Mon Sep 06 2004 - 10:28:48 EST




On Thu, 12 Aug 2004, Alan Cox wrote:

> On Iau, 2004-08-12 at 10:36, Jakub Vana wrote:
> > Hello,
> >
> > I have written Linux Kernel module that allows you to call BIOS
> > interupts, Far services or your own code.
>
> Why is this better than LRMI in user mode. To do BIOS calls safely
> you need to be very careful about things like PCI locking, I/O
> emulation and the ROM scribbling in strange places. LRMI can handle this
> in user space as does x86emu in Xorg.
>

In-kernel BIOS calls are useful:
I (and many others) have experienced problems with resuming from ACPI S3
state. Some graphic cards need to have their state saved before suspend
and restored after resume, otherwise the screen stays blank. VESA BIOS
call 0x4f04, does exactly that.

Yes it can be done from userspace, but at the time devices are woken up,
userspace processes are still sleeping. And if something goes wrong with
device wakeup (not uncommon thing with ACPI :-) ), you end up with a
backtrace on a blank screen :-(. (Modern laptops do not have serial port
to hook up terminal to.)

to Jakub:
You promised to put that code somewhere on the net, could
you please send me an URL.

Thank you


Jozef Vesely
vesely@xxxxxx


-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/