> diff --git a/Platform/Qemu/QemuOpenBoardPkg/PlatformInitPei/Memory.c 
> b/Platform/Qemu/QemuOpenBoardPkg/PlatformInitPei/Memory.c
> index 21705256191b..4f312c36016e 100644
> --- a/Platform/Qemu/QemuOpenBoardPkg/PlatformInitPei/Memory.c
> +++ b/Platform/Qemu/QemuOpenBoardPkg/PlatformInitPei/Memory.c

There is OvmfPkg/Library/PlatformInitLib which you could use instead of
reinventing the wheel ...

If there are changes needed to make PlatformInitLib work for you feel
free to propose patches (same goes for eventually moving code from
OvmfPkg/PlatformPei to the Library).

> +  // It's worth noting that QEMU also grew an option to change lowmem based 
> on the
> +  // user's preferences. Because of all of this, it's near impossible to 
> hardcode
> +  // a range, so we grab TOLUD (not in a literal way, since QEMU does not 
> implement
> +  // that register ;)) and calculate our PCI MMIO based on that. This also 
> makes it so
> +  // the DSDT built by QEMU will have correct _CRS ranges.
> +  // hw/pci-host/q35.c explicitly says our PCI hole ranges from [TOLUD, IO 
> APIC].
> +  // As far as I can tell, we seem to be allowed to add a 64-bit resource 
> range anywhere.

There is a etc/reserved-memory-end fw_cfg FwCfg file.  If present it
the 64-bit resource range should be placed above the address specified
there (qemu uses that to reserve address space if needed, happens for
example when you enable memory hotplug).

The patch should be splitted up into smaller pieces to make it easier
to review the changes.

take care,
  Gerd



-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#98445): https://edk2.groups.io/g/devel/message/98445
Mute This Topic: https://groups.io/mt/96235140/21656
Group Owner: devel+ow...@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-


Reply via email to