diff options
author | Ray Ni <ray.ni@intel.com> | 2020-06-17 16:34:29 +0800 |
---|---|---|
committer | mergify[bot] <37929162+mergify[bot]@users.noreply.github.com> | 2020-06-24 05:46:27 +0000 |
commit | 3900a63e3a1b9ba9a4105bedead7b986188cec2c (patch) | |
tree | b2c20e438459f06f12f3d3939339cb07c82c6082 /UefiPayloadPkg/BlSupportDxe/BlSupportDxe.c | |
parent | 03013d999c85ac15e03ad39d589f7ae2bb7b026f (diff) | |
download | edk2-3900a63e3a1b9ba9a4105bedead7b986188cec2c.tar.gz edk2-3900a63e3a1b9ba9a4105bedead7b986188cec2c.tar.bz2 edk2-3900a63e3a1b9ba9a4105bedead7b986188cec2c.zip |
UefiPayloadPkg/Pci: Use the PCIE Base Addr stored in AcpiBoardInfo HOB
Today's UefiPayloadPkg always uses 0xE0000000 as the PCIE base address
and ignores the value set in AcpiBoardInfo HOB created by the boot
loader. This makes the payload binary cannot work in environment
where the PCIE base address set by boot loader doesn't equal to
0xE0000000.
The patch enhances UefiPayloadPkg so that the PCIE base address
set by boot loader in the AcpiBoardInfo HOB is used.
Signed-off-by: Ray Ni <ray.ni@intel.com>
Reviewed-by: Maurice Ma <maurice.ma@intel.com>
Reviewed-by: Guo Dong <guo.dong@intel.com>
Cc: Benjamin You <benjamin.you@intel.com>
Diffstat (limited to 'UefiPayloadPkg/BlSupportDxe/BlSupportDxe.c')
-rw-r--r-- | UefiPayloadPkg/BlSupportDxe/BlSupportDxe.c | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/UefiPayloadPkg/BlSupportDxe/BlSupportDxe.c b/UefiPayloadPkg/BlSupportDxe/BlSupportDxe.c index 28dfc8fc55..a3974dcc02 100644 --- a/UefiPayloadPkg/BlSupportDxe/BlSupportDxe.c +++ b/UefiPayloadPkg/BlSupportDxe/BlSupportDxe.c @@ -2,7 +2,7 @@ This driver will report some MMIO/IO resources to dxe core, extract smbios and acpi
tables from bootloader.
- Copyright (c) 2014 - 2019, Intel Corporation. All rights reserved.<BR>
+ Copyright (c) 2014 - 2020, Intel Corporation. All rights reserved.<BR>
SPDX-License-Identifier: BSD-2-Clause-Patent
**/
@@ -101,6 +101,7 @@ BlDxeEntryPoint ( EFI_HOB_GUID_TYPE *GuidHob;
SYSTEM_TABLE_INFO *SystemTableInfo;
EFI_PEI_GRAPHICS_INFO_HOB *GfxInfo;
+ ACPI_BOARD_INFO *AcpiBoardInfo;
Status = EFI_SUCCESS;
//
@@ -153,6 +154,16 @@ BlDxeEntryPoint ( ASSERT_EFI_ERROR (Status);
}
+ //
+ // Set PcdPciExpressBaseAddress 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);
+ }
+
return EFI_SUCCESS;
}
|