Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do I reserve low memory (pre OS)?

Tags:

boot

bios

bda

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

like image 837
Jonas Engström Avatar asked Dec 08 '25 13:12

Jonas Engström


1 Answers

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.

like image 182
lms Avatar answered Dec 12 '25 03:12

lms



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!