Open andreiw opened 7 months ago
The RISC-V Sec code processes all the "memory" devices in Memory.c, so HighMemDxe code does absolutely nothing.
To test HighMemDxe, this is what I do:
--- a/OvmfPkg/RiscVVirt/Sec/Memory.c +++ b/OvmfPkg/RiscVVirt/Sec/Memory.c @@ -253,6 +253,7 @@ MemoryPeimInitialization ( INT32 Node, Prev; INT32 Len; VOID *FdtPointer; + BOOLEAN Once = TRUE; FirmwareContext = NULL; GetFirmwareContextPointer (&FirmwareContext); @@ -285,18 +286,21 @@ MemoryPeimInitialization ( CurBase = fdt64_to_cpu (ReadUnaligned64 (RegProp)); CurSize = fdt64_to_cpu (ReadUnaligned64 (RegProp + 1)); - DEBUG (( - DEBUG_INFO, - "%a: System RAM @ 0x%lx - 0x%lx\n", - __func__, - CurBase, - CurBase + CurSize - 1 - )); + if (Once) { + DEBUG (( + DEBUG_INFO, + "%a: System RAM @ 0x%lx - 0x%lx\n", + __func__, + CurBase, + CurBase + CurSize - 1 + )); - InitializeRamRegions ( - CurBase, - CurSize - ); + InitializeRamRegions ( + CurBase, + CurSize + ); + Once = FALSE; + } } else { DEBUG (( DEBUG_ERROR,
https://github.com/intel/FdtBusPkg/blob/main/Docs/ovmf-patches/0001-OvmfPkg-RiscVVirt-change-for-testing-HighMemDxe.patch
The RISC-V Sec code processes all the "memory" devices in Memory.c, so HighMemDxe code does absolutely nothing.
To test HighMemDxe, this is what I do: