restoring x86 BIOS state before reboot

Bart Trojanowski
2007-04-06T17:05:52Z

Hi all,

I am looking at a two stage boot where linux is loaded to do some system
initialization before booting to Windows, which needs BIOS.

I am interested in bypassing the BIOS on the second boot.

I wanted to know if anyone has attempted to restore the BIOS memory such
that this could be attempted. If not, I would love to get some pointers
:)

My plan right now is to backup the 128k of memory under 0x10000 to some
staging memory under 0x90000, temporarily while in real mode, and then
move it up somewhere higher once the kernel is running.

Then on reboot I hope to undo the above and jump to 0x00007c00.

Does this approach have any merit?

Cheers,

-Bart