]> git.proxmox.com Git - mirror_edk2.git/commitdiff
UefiPayloadPkg: Support variable size MMCONF space
authorMarcello Sylvester Bauer <marcello.bauer@9elements.com>
Wed, 22 Jul 2020 09:00:29 +0000 (11:00 +0200)
committermergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
Wed, 16 Sep 2020 06:36:18 +0000 (06:36 +0000)
The default size is still 256MiB, but will be overwritten by
UefiPayloadPkg with the real MMCONF size.

e.g.: On embedded AMD platforms the MMCONF window size is usually
      only 64MiB.

Fixes crash on platforms not exposing 256 buses.
Tested on:
* AMD Stoney Ridge

Signed-off-by: Patrick Rudolph <patrick.rudolph@9elements.com>
Signed-off-by: Marcello Sylvester Bauer <marcello.bauer@9elements.com>
Cc: Patrick Rudolph <patrick.rudolph@9elements.com>
Cc: Christian Walter <christian.walter@9elements.com>
Cc: Maurice Ma <maurice.ma@intel.com>
Cc: Nate DeSimone <nathaniel.l.desimone@intel.com>
Cc: Benjamin You <benjamin.you@intel.com>
Reviewed-by: Guo Dong <guo.dong@intel.com>
UefiPayloadPkg/BlSupportDxe/BlSupportDxe.c
UefiPayloadPkg/BlSupportDxe/BlSupportDxe.inf
UefiPayloadPkg/UefiPayloadPkgIa32X64.dsc

index a3974dcc02f8c0d25b80101f32f545e57544c5ad..a746d0581ee3c969d876d870126402c7923d4cb0 100644 (file)
@@ -155,13 +155,15 @@ BlDxeEntryPoint (
   }\r
 \r
   //\r
-  // Set PcdPciExpressBaseAddress by HOB info\r
+  // Set PcdPciExpressBaseAddress and PcdPciExpressBaseSize by HOB info\r
   //\r
   GuidHob = GetFirstGuidHob (&gUefiAcpiBoardInfoGuid);\r
   if (GuidHob != NULL) {\r
     AcpiBoardInfo = (ACPI_BOARD_INFO *)GET_GUID_HOB_DATA (GuidHob);\r
     Status = PcdSet64S (PcdPciExpressBaseAddress, AcpiBoardInfo->PcieBaseAddress);\r
     ASSERT_EFI_ERROR (Status);\r
+    Status = PcdSet64S (PcdPciExpressBaseSize, AcpiBoardInfo->PcieBaseSize);\r
+    ASSERT_EFI_ERROR (Status);\r
   }\r
 \r
   return EFI_SUCCESS;\r
index 1371d5eb795206efe9ed2f4cca3108d8662e3f35..cebc81135565f783f5cc62cd81e62fa0f985941e 100644 (file)
@@ -54,6 +54,7 @@
   gEfiMdeModulePkgTokenSpaceGuid.PcdSetupVideoHorizontalResolution\r
   gEfiMdeModulePkgTokenSpaceGuid.PcdSetupVideoVerticalResolution\r
   gEfiMdePkgTokenSpaceGuid.PcdPciExpressBaseAddress\r
+  gEfiMdePkgTokenSpaceGuid.PcdPciExpressBaseSize\r
 \r
 [Depex]\r
   TRUE\r
index 9bae1daa09bb073bbe62095692efaf9fe444cbd2..e18c4678e8e30812a23fb37d2c0fd0a4adb56e46 100644 (file)
   gEfiMdeModulePkgTokenSpaceGuid.PcdConOutRow|31\r
   gEfiMdeModulePkgTokenSpaceGuid.PcdConOutColumn|100\r
   gEfiMdePkgTokenSpaceGuid.PcdPciExpressBaseAddress|0\r
+  gEfiMdePkgTokenSpaceGuid.PcdPciExpressBaseSize|0\r
 \r
 ################################################################################\r
 #\r