]> git.proxmox.com Git - mirror_edk2.git/commitdiff
OvmfPkg/AcpiPlatformDxe/Qemu: Decrease upper limit for PCI window 32
authorJordan Justen <jordan.l.justen@intel.com>
Tue, 12 Nov 2013 18:34:36 +0000 (18:34 +0000)
committerjljusten <jljusten@6f19259b-4bc3-4df7-8a09-765794883524>
Tue, 12 Nov 2013 18:34:36 +0000 (18:34 +0000)
In a later patch we will want to mark the flash memory as a
runtime services data memory range. This will allow a new runtime
services firmware block driver to read & write flash memory when
the OS has set up virtual memory protection.

Since this memory range will appear as runtime services data, we
need to adjust the limit when scanning for PCI window 32 down to
just below the flash device. If we don't adjust the limit, then
the algorithm in PopulateFwData will fail because it will see a
EfiGcdMemoryTypeSystemMemory memory range just below 4GB.

v2:
 * This patch replaces the v1 patch:
   "OvmfPkg/AcpiPlatformDxe/Qemu: Allow high runtime memory regions"

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Jordan Justen <jordan.l.justen@intel.com>
Reviewed-by: Laszlo Ersek <lersek@redhat.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@14837 6f19259b-4bc3-4df7-8a09-765794883524

OvmfPkg/AcpiPlatformDxe/AcpiPlatformDxe.inf
OvmfPkg/AcpiPlatformDxe/Qemu.c

index acc224728e9b059618cf3a9b3b35512d055d4679..90178e0f52a4c64a86bb915235a25094d9c33c71 100644 (file)
@@ -62,6 +62,7 @@
   gEfiMdeModulePkgTokenSpaceGuid.PcdAcpiTableStorageFile\r
   gUefiCpuPkgTokenSpaceGuid.PcdCpuLocalApicBaseAddress\r
   gPcAtChipsetPkgTokenSpaceGuid.Pcd8259LegacyModeEdgeLevel\r
+  gUefiOvmfPkgTokenSpaceGuid.PcdOvmfFdBaseAddress\r
 \r
 [Depex]\r
   gEfiAcpiTableProtocolGuid\r
index 8a6ecf75b3b52b47d29450bf47b582d480d7ef9b..06bd46370e7fb88254fb44280bcf8919aa00e5bf 100644 (file)
@@ -250,7 +250,7 @@ PopulateFwData(
       Desc = &AllDesc[CurDesc];\r
       ExclTop = Desc->BaseAddress + Desc->Length;\r
 \r
-      if (ExclTop <= BASE_4GB) {\r
+      if (ExclTop <= (UINT64) PcdGet32 (PcdOvmfFdBaseAddress)) {\r
         switch (Desc->GcdMemoryType) {\r
           case EfiGcdMemoryTypeNonExistent:\r
             break;\r