Jonas Engström
Jonas Engström

Reputation: 5065

How do I reserve low memory (pre OS)?

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?)

Upvotes: 3

Views: 613

Answers (1)

lms
lms

Reputation: 523

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.

Upvotes: 1

Related Questions