tags:

views:

312

answers:

1

Background: I need to reserve an amount of memory below 0xA0000 prior to my operating system starts. To do this I change the 0040:0013 (or 0x413) word which is the amount of low memory available in KiB.

However, Windows and other operating systems use E820h/INT15h to query the memory layout and some BIOS:es doesn't reflect 0x413 changes to the E820h/INT15h BIOS function. Therefore I also have to hook the E820h function if needed.

Question: Is there another (more reliable) way to reserve low memory prior to the OS? Or any other way of changing the E820h/INT15h results other than hooking INT15h (by poking EBDA perhaps?)

+1  A: 

I don't think so, but if you are not doing a bootloader, you could para-virtualize the os. You could look at Xen hypervisor for it.

lms
Nice idea, unfortunately Xen is not an option for me
Jonas Gulle