oak
oak copied to clipboard
Build the zero page inside stage0
The key thing in the zero page is the E820 memory map of what physical memory address ranges are valid.
QEMU provides the fw_cfg
API for this: https://github.com/qemu/qemu/blob/master/docs/specs/fw_cfg.rst
Unfortunately the exact method of finding out valid memory areas via fw_cfg
is largely undocumented and thus may require some digging into both QEMU and/or SeaBIOS code to figure out how to do properly.