diff options
author | Marcello Sylvester Bauer <marcello.bauer@9elements.com> | 2020-07-22 11:00:29 +0200 |
---|---|---|
committer | mergify[bot] <37929162+mergify[bot]@users.noreply.github.com> | 2020-09-16 06:36:18 +0000 |
commit | 8028b2907e20b21cd7d69639a36ac82a77c81dc1 (patch) | |
tree | fc04c5eb3844c2c8c6e6e4c7a9fb8748c9a2886d /UefiPayloadPkg/BlSupportDxe | |
parent | 5c065855284bd0ca65784d313e094054e23685bb (diff) | |
download | edk2-8028b2907e20b21cd7d69639a36ac82a77c81dc1.tar.gz edk2-8028b2907e20b21cd7d69639a36ac82a77c81dc1.tar.bz2 edk2-8028b2907e20b21cd7d69639a36ac82a77c81dc1.zip |
UefiPayloadPkg: Support variable size MMCONF space
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>
Diffstat (limited to 'UefiPayloadPkg/BlSupportDxe')
-rw-r--r-- | UefiPayloadPkg/BlSupportDxe/BlSupportDxe.c | 4 | ||||
-rw-r--r-- | UefiPayloadPkg/BlSupportDxe/BlSupportDxe.inf | 1 |
2 files changed, 4 insertions, 1 deletions
diff --git a/UefiPayloadPkg/BlSupportDxe/BlSupportDxe.c b/UefiPayloadPkg/BlSupportDxe/BlSupportDxe.c index a3974dcc02..a746d0581e 100644 --- a/UefiPayloadPkg/BlSupportDxe/BlSupportDxe.c +++ b/UefiPayloadPkg/BlSupportDxe/BlSupportDxe.c @@ -155,13 +155,15 @@ BlDxeEntryPoint ( }
//
- // Set PcdPciExpressBaseAddress by HOB info
+ // Set PcdPciExpressBaseAddress and PcdPciExpressBaseSize by HOB info
//
GuidHob = GetFirstGuidHob (&gUefiAcpiBoardInfoGuid);
if (GuidHob != NULL) {
AcpiBoardInfo = (ACPI_BOARD_INFO *)GET_GUID_HOB_DATA (GuidHob);
Status = PcdSet64S (PcdPciExpressBaseAddress, AcpiBoardInfo->PcieBaseAddress);
ASSERT_EFI_ERROR (Status);
+ Status = PcdSet64S (PcdPciExpressBaseSize, AcpiBoardInfo->PcieBaseSize);
+ ASSERT_EFI_ERROR (Status);
}
return EFI_SUCCESS;
diff --git a/UefiPayloadPkg/BlSupportDxe/BlSupportDxe.inf b/UefiPayloadPkg/BlSupportDxe/BlSupportDxe.inf index 1371d5eb79..cebc811355 100644 --- a/UefiPayloadPkg/BlSupportDxe/BlSupportDxe.inf +++ b/UefiPayloadPkg/BlSupportDxe/BlSupportDxe.inf @@ -54,6 +54,7 @@ gEfiMdeModulePkgTokenSpaceGuid.PcdSetupVideoHorizontalResolution
gEfiMdeModulePkgTokenSpaceGuid.PcdSetupVideoVerticalResolution
gEfiMdePkgTokenSpaceGuid.PcdPciExpressBaseAddress
+ gEfiMdePkgTokenSpaceGuid.PcdPciExpressBaseSize
[Depex]
TRUE
|