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>
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user