On Wed, 7 Dec 2022 at 06:32, Gerd Hoffmann <kra...@redhat.com> wrote: > > qemu uses the etc/e820 fw_cfg file not only for memory, but > also for reservations. Handle reservations by adding resource > descriptor hobs for them. > > A typical qemu configuration has a small reservation between > lapic and flash: > > # sudo cat /proc/iomem > [ ... ] > fee00000-fee00fff : Local APIC > feffc000-feffffff : Reserved <= HERE > ffc00000-ffffffff : Reserved > [ ... ] > > Signed-off-by: Gerd Hoffmann <kra...@redhat.com>
Merged as #3828 > --- > OvmfPkg/Library/PlatformInitLib/MemDetect.c | 16 ++++++++++++++++ > 1 file changed, 16 insertions(+) > > diff --git a/OvmfPkg/Library/PlatformInitLib/MemDetect.c > b/OvmfPkg/Library/PlatformInitLib/MemDetect.c > index b8feae4309de..a7a4e028ad50 100644 > --- a/OvmfPkg/Library/PlatformInitLib/MemDetect.c > +++ b/OvmfPkg/Library/PlatformInitLib/MemDetect.c > @@ -228,6 +228,22 @@ PlatformScanOrAdd64BitE820Ram ( > )); > } > } > + } else if (E820Entry.Type == EfiAcpiAddressRangeReserved) { > + if (AddHighHob) { > + DEBUG (( > + DEBUG_INFO, > + "%a: Reserved: Base=0x%Lx Length=0x%Lx\n", > + __FUNCTION__, > + E820Entry.BaseAddr, > + E820Entry.Length > + )); > + BuildResourceDescriptorHob ( > + EFI_RESOURCE_MEMORY_RESERVED, > + 0, > + E820Entry.BaseAddr, > + E820Entry.Length > + ); > + } > } > } > > -- > 2.38.1 > > > > > > -=-=-=-=-=-=-=-=-=-=-=- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#97731): https://edk2.groups.io/g/devel/message/97731 Mute This Topic: https://groups.io/mt/95510762/21656 Group Owner: devel+ow...@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [arch...@mail-archive.com] -=-=-=-=-=-=-=-=-=-=-=-