UefiPayloadPkg: Build a HOB from bootloader ACPI table
V2: Update BuildHobFromAcpi() to return a HOB pointer. For universal UEFI payload, build a HOB from the ACPI table, so that other modules could use this info from HOB at very early DXE phase. This code are shared by universal payload and non universal payload. Cc: Ray Ni <ray.ni@intel.com> Cc: Maurice Ma <maurice.ma@intel.com> Cc: Benjamin You <benjamin.you@intel.com> Reviewed-by: Ray Ni <ray.ni@intel.com> Signed-off-by: Guo Dong <guo.dong@intel.com>
This commit is contained in:
@@ -260,6 +260,8 @@ BuildHobs (
|
||||
UNIVERSAL_PAYLOAD_EXTRA_DATA *ExtraData;
|
||||
UINT8 *GuidHob;
|
||||
EFI_HOB_FIRMWARE_VOLUME *FvHob;
|
||||
UNIVERSAL_PAYLOAD_ACPI_TABLE *AcpiTable;
|
||||
ACPI_BOARD_INFO *AcpiBoardInfo;
|
||||
|
||||
Hob.Raw = (UINT8 *) BootloaderParameter;
|
||||
MinimalNeededSize = FixedPcdGet32 (PcdSystemMemoryUefiRegionSize);
|
||||
@@ -351,6 +353,16 @@ BuildHobs (
|
||||
*DxeFv = (EFI_FIRMWARE_VOLUME_HEADER *) (UINTN) ExtraData->Entry[0].Base;
|
||||
ASSERT ((*DxeFv)->FvLength == ExtraData->Entry[0].Size);
|
||||
|
||||
//
|
||||
// Create guid hob for acpi board information
|
||||
//
|
||||
GuidHob = GetFirstGuidHob(&gUniversalPayloadAcpiTableGuid);
|
||||
if (GuidHob != NULL) {
|
||||
AcpiTable = (UNIVERSAL_PAYLOAD_ACPI_TABLE *) GET_GUID_HOB_DATA (GuidHob);
|
||||
AcpiBoardInfo = BuildHobFromAcpi ((UINT64)AcpiTable->Rsdp);
|
||||
ASSERT (AcpiBoardInfo != NULL);
|
||||
}
|
||||
|
||||
//
|
||||
// Update DXE FV information to first fv hob in the hob list, which
|
||||
// is the empty FvHob created before.
|
||||
|
Reference in New Issue
Block a user