From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mga12.intel.com (mga12.intel.com []) by mx.groups.io with SMTP id smtpd.web11.6831.1623748371467770763 for ; Tue, 15 Jun 2021 02:12:54 -0700 Authentication-Results: mx.groups.io; dkim=missing; spf=fail (domain: intel.com, ip: , mailfrom: zhiguang.liu@intel.com) IronPort-SDR: saH9eUb57PJafMar8WPeyhA0qXqRIDYrao51h5Da2CFhnIXDrl/qsMTJ/QqoezaWrLlwMH55GK fon8FduiEoLA== X-IronPort-AV: E=McAfee;i="6200,9189,10015"; a="185647659" X-IronPort-AV: E=Sophos;i="5.83,275,1616482800"; d="scan'208,223";a="185647659" Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by fmsmga106.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 15 Jun 2021 02:12:36 -0700 IronPort-SDR: wOxpvRJoxV1d/2yDFqM6RUoBTcbxmhi2iHwvHz2Qo2R/8DY5uiQDRjGDJ+jC8JFwhdLIMJGT65 1YjzeJPwTLpg== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.83,275,1616482800"; d="scan'208,223";a="487713233" Received: from fieedk002.ccr.corp.intel.com ([10.239.158.144]) by fmsmga002.fm.intel.com with ESMTP; 15 Jun 2021 02:12:35 -0700 From: "Zhiguang Liu" To: devel@edk2.groups.io Cc: Maurice Ma , Guo Dong , Benjamin You , Ray Ni Subject: [Patch V5 9/9] UefiPayloadPkg: Create gUniversalPayloadAcpiTableGuid Hob Date: Tue, 15 Jun 2021 17:12:11 +0800 Message-Id: <20210615091211.801-10-zhiguang.liu@intel.com> X-Mailer: git-send-email 2.30.0.windows.2 In-Reply-To: <20210615091211.801-1-zhiguang.liu@intel.com> References: <20210615091211.801-1-zhiguang.liu@intel.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable >>From SysTableInfo Hob, get ACPI table address, and create gUniversalPayloadAcpiTableGuid Hob to store it. Remove directly adding ACPI table to ConfigurationTable. Dxe ACPI driver will parse it and install ACPI table from Guid Hob. Cc: Maurice Ma Cc: Guo Dong Cc: Benjamin You Cc: Ray Ni Reviewed-by: Guo Dong Signed-off-by: Zhiguang Liu --- UefiPayloadPkg/BlSupportDxe/BlSupportDxe.c | 17 ----------------- UefiPayloadPkg/BlSupportDxe/BlSupportDxe.h | 5 +---- UefiPayloadPkg/BlSupportDxe/BlSupportDxe.inf | 1 - UefiPayloadPkg/UefiPayloadEntry/UefiPayloadEntry.c | 11 +++++++++++ UefiPayloadPkg/UefiPayloadEntry/UefiPayloadEntry.h | 2 +- UefiPayloadPkg/UefiPayloadEntry/UefiPayloadEntry.inf | 1 + UefiPayloadPkg/UefiPayloadPkg.fdf | 4 ++++ 7 files changed, 18 insertions(+), 23 deletions(-) diff --git a/UefiPayloadPkg/BlSupportDxe/BlSupportDxe.c b/UefiPayloadPkg/Bl= SupportDxe/BlSupportDxe.c index 56b85b8e6d..ffd3427fb3 100644 --- a/UefiPayloadPkg/BlSupportDxe/BlSupportDxe.c +++ b/UefiPayloadPkg/BlSupportDxe/BlSupportDxe.c @@ -99,7 +99,6 @@ BlDxeEntryPoint ( {=0D EFI_STATUS Status;=0D EFI_HOB_GUID_TYPE *GuidHob;=0D - SYSTEM_TABLE_INFO *SystemTableInfo;=0D EFI_PEI_GRAPHICS_INFO_HOB *GfxInfo;=0D ACPI_BOARD_INFO *AcpiBoardInfo;=0D =0D @@ -113,22 +112,6 @@ BlDxeEntryPoint ( Status =3D ReserveResourceInGcd (TRUE, EfiGcdMemoryTypeMemoryMappedIo, 0= xFED00000, SIZE_1KB, 0, ImageHandle); // HPET=0D ASSERT_EFI_ERROR (Status);=0D =0D - //=0D - // Find the system table information guid hob=0D - //=0D - GuidHob =3D GetFirstGuidHob (&gUefiSystemTableInfoGuid);=0D - ASSERT (GuidHob !=3D NULL);=0D - SystemTableInfo =3D (SYSTEM_TABLE_INFO *)GET_GUID_HOB_DATA (GuidHob);=0D -=0D - //=0D - // Install Acpi Table=0D - //=0D - if (SystemTableInfo->AcpiTableBase !=3D 0 && SystemTableInfo->AcpiTableS= ize !=3D 0) {=0D - DEBUG ((DEBUG_ERROR, "Install Acpi Table at 0x%lx, length 0x%x\n", Sys= temTableInfo->AcpiTableBase, SystemTableInfo->AcpiTableSize));=0D - Status =3D gBS->InstallConfigurationTable (&gEfiAcpiTableGuid, (VOID *= )(UINTN)SystemTableInfo->AcpiTableBase);=0D - ASSERT_EFI_ERROR (Status);=0D - }=0D -=0D //=0D // Find the frame buffer information and update PCDs=0D //=0D diff --git a/UefiPayloadPkg/BlSupportDxe/BlSupportDxe.h b/UefiPayloadPkg/Bl= SupportDxe/BlSupportDxe.h index 512105fafd..3332a30eae 100644 --- a/UefiPayloadPkg/BlSupportDxe/BlSupportDxe.h +++ b/UefiPayloadPkg/BlSupportDxe/BlSupportDxe.h @@ -1,7 +1,7 @@ /** @file=0D The header file of bootloader support DXE.=0D =0D -Copyright (c) 2014, Intel Corporation. All rights reserved.
=0D +Copyright (c) 2021, Intel Corporation. All rights reserved.
=0D SPDX-License-Identifier: BSD-2-Clause-Patent=0D =0D **/=0D @@ -19,12 +19,9 @@ SPDX-License-Identifier: BSD-2-Clause-Patent #include =0D #include =0D =0D -#include =0D #include =0D #include =0D #include =0D #include =0D =0D -#include =0D -=0D #endif=0D diff --git a/UefiPayloadPkg/BlSupportDxe/BlSupportDxe.inf b/UefiPayloadPkg/= BlSupportDxe/BlSupportDxe.inf index 30f41f8c39..1ccb250991 100644 --- a/UefiPayloadPkg/BlSupportDxe/BlSupportDxe.inf +++ b/UefiPayloadPkg/BlSupportDxe/BlSupportDxe.inf @@ -42,7 +42,6 @@ HobLib=0D =0D [Guids]=0D - gEfiAcpiTableGuid=0D gUefiSystemTableInfoGuid=0D gUefiAcpiBoardInfoGuid=0D gEfiGraphicsInfoHobGuid=0D diff --git a/UefiPayloadPkg/UefiPayloadEntry/UefiPayloadEntry.c b/UefiPaylo= adPkg/UefiPayloadEntry/UefiPayloadEntry.c index 80f66a3fd5..8c6f7e326f 100644 --- a/UefiPayloadPkg/UefiPayloadEntry/UefiPayloadEntry.c +++ b/UefiPayloadPkg/UefiPayloadEntry/UefiPayloadEntry.c @@ -235,6 +235,7 @@ BuildHobFromBl ( EFI_PEI_GRAPHICS_DEVICE_INFO_HOB GfxDeviceInfo;=0D EFI_PEI_GRAPHICS_DEVICE_INFO_HOB *NewGfxDeviceInfo;=0D UNIVERSAL_PAYLOAD_SMBIOS_TABLE *SmBiosTableHob;=0D + UNIVERSAL_PAYLOAD_ACPI_TABLE *AcpiTableHob;=0D =0D //=0D // Parse memory info and build memory HOBs=0D @@ -287,6 +288,16 @@ BuildHobFromBl ( SmBiosTableHob->SmBiosEntryPoint =3D SysTableInfo.SmbiosTableBase;=0D DEBUG ((DEBUG_INFO, "Create smbios table gUniversalPayloadSmbiosTableGui= d guid hob\n"));=0D =0D + //=0D + // Creat ACPI table Hob=0D + //=0D + AcpiTableHob =3D BuildGuidHob (&gUniversalPayloadAcpiTableGuid, sizeof (= UNIVERSAL_PAYLOAD_ACPI_TABLE));=0D + ASSERT (AcpiTableHob !=3D NULL);=0D + AcpiTableHob->Header.Revision =3D UNIVERSAL_PAYLOAD_ACPI_TABLE_REVISION;= =0D + AcpiTableHob->Header.Length =3D sizeof (UNIVERSAL_PAYLOAD_ACPI_TABLE);=0D + AcpiTableHob->Rsdp =3D SysTableInfo.AcpiTableBase;=0D + DEBUG ((DEBUG_INFO, "Create smbios table gUniversalPayloadAcpiTableGuid = guid hob\n"));=0D +=0D //=0D // Create guid hob for acpi board information=0D //=0D diff --git a/UefiPayloadPkg/UefiPayloadEntry/UefiPayloadEntry.h b/UefiPaylo= adPkg/UefiPayloadEntry/UefiPayloadEntry.h index e7d0d15118..a4c9da128e 100644 --- a/UefiPayloadPkg/UefiPayloadEntry/UefiPayloadEntry.h +++ b/UefiPayloadPkg/UefiPayloadEntry/UefiPayloadEntry.h @@ -32,7 +32,7 @@ #include =0D #include =0D #include =0D -=0D +#include =0D =0D #define LEGACY_8259_MASK_REGISTER_MASTER 0x21=0D #define LEGACY_8259_MASK_REGISTER_SLAVE 0xA1=0D diff --git a/UefiPayloadPkg/UefiPayloadEntry/UefiPayloadEntry.inf b/UefiPay= loadPkg/UefiPayloadEntry/UefiPayloadEntry.inf index fc5b5ce9d4..8d42925fcd 100644 --- a/UefiPayloadPkg/UefiPayloadEntry/UefiPayloadEntry.inf +++ b/UefiPayloadPkg/UefiPayloadEntry/UefiPayloadEntry.inf @@ -65,6 +65,7 @@ gEfiGraphicsDeviceInfoHobGuid=0D gUefiAcpiBoardInfoGuid=0D gUniversalPayloadSmbiosTableGuid=0D + gUniversalPayloadAcpiTableGuid=0D =0D [FeaturePcd.IA32]=0D gEfiMdeModulePkgTokenSpaceGuid.PcdDxeIplSwitchToLongMode ## CONSUME= S=0D diff --git a/UefiPayloadPkg/UefiPayloadPkg.fdf b/UefiPayloadPkg/UefiPayload= Pkg.fdf index 8fc509024b..ed7fbcaddb 100644 --- a/UefiPayloadPkg/UefiPayloadPkg.fdf +++ b/UefiPayloadPkg/UefiPayloadPkg.fdf @@ -175,6 +175,10 @@ INF MdeModulePkg/Bus/Usb/UsbBusDxe/UsbBusDxe.inf INF MdeModulePkg/Bus/Usb/UsbKbDxe/UsbKbDxe.inf=0D INF MdeModulePkg/Bus/Usb/UsbMassStorageDxe/UsbMassStorageDxe.inf=0D =0D +#=0D +# ACPI Support=0D +#=0D +INF MdeModulePkg/Universal/Acpi/AcpiTableDxe/AcpiTableDxe.inf=0D =0D #=0D # Shell=0D --=20 2.30.0.windows.2