From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mga12.intel.com (mga12.intel.com [192.55.52.136]) by mx.groups.io with SMTP id smtpd.web11.6831.1623748371467770763 for ; Tue, 15 Jun 2021 02:12:51 -0700 Authentication-Results: mx.groups.io; dkim=missing; spf=pass (domain: intel.com, ip: 192.55.52.136, mailfrom: zhiguang.liu@intel.com) IronPort-SDR: ieMA7mlcptNpAvInRoXDKQSXXcITX4H1led4N5dnZtSqrvpETNEG562lHiXpCw9P6VaJqPmzTQ sR/qTVEzDfoQ== X-IronPort-AV: E=McAfee;i="6200,9189,10015"; a="185647632" X-IronPort-AV: E=Sophos;i="5.83,275,1616482800"; d="scan'208,223";a="185647632" 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:32 -0700 IronPort-SDR: SbRTUfir6Bg5Dd5eXDQUsNz0l5wHjTAcxoxalz1ucUU1+Dqp1PgwyE1xuHu2zv5Q9XIyj3CqMk 9K4vncP6yWQg== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.83,275,1616482800"; d="scan'208,223";a="487713203" Received: from fieedk002.ccr.corp.intel.com ([10.239.158.144]) by fmsmga002.fm.intel.com with ESMTP; 15 Jun 2021 02:12:30 -0700 From: "Zhiguang Liu" To: devel@edk2.groups.io Cc: Maurice Ma , Guo Dong , Benjamin You Subject: [Patch V5 6/9] UefiPayloadPkg: Create gUniversalPayloadSmbiosTableGuid Hob Date: Tue, 15 Jun 2021 17:12:08 +0800 Message-Id: <20210615091211.801-7-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 Smbios table address, and create gUniversalPayloadSmbiosTableGuid Hob to store it. Remove directly adding smbios table to ConfigurationTable. Dxe module SmbiosDxe will parse it and install smbios table from it. Cc: Maurice Ma Cc: Guo Dong Cc: Benjamin You Reviewed-by: Guo Dong Signed-off-by: Zhiguang Liu --- UefiPayloadPkg/BlSupportDxe/BlSupportDxe.c | 11 +---------- UefiPayloadPkg/BlSupportDxe/BlSupportDxe.inf | 3 +-- UefiPayloadPkg/UefiPayloadEntry/UefiPayloadEntry.c | 12 +++++++++++- UefiPayloadPkg/UefiPayloadEntry/UefiPayloadEntry.h | 3 ++- UefiPayloadPkg/UefiPayloadEntry/UefiPayloadEntry.inf | 3 ++- 5 files changed, 17 insertions(+), 15 deletions(-) diff --git a/UefiPayloadPkg/BlSupportDxe/BlSupportDxe.c b/UefiPayloadPkg/Bl= SupportDxe/BlSupportDxe.c index a746d0581e..56b85b8e6d 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 smbi= os and acpi=0D tables from bootloader.=0D =0D - Copyright (c) 2014 - 2020, Intel Corporation. All rights reserved.
=0D + Copyright (c) 2014 - 2021, Intel Corporation. All rights reserved.
=0D SPDX-License-Identifier: BSD-2-Clause-Patent=0D =0D **/=0D @@ -129,15 +129,6 @@ BlDxeEntryPoint ( ASSERT_EFI_ERROR (Status);=0D }=0D =0D - //=0D - // Install Smbios Table=0D - //=0D - if (SystemTableInfo->SmbiosTableBase !=3D 0 && SystemTableInfo->SmbiosTa= bleSize !=3D 0) {=0D - DEBUG ((DEBUG_ERROR, "Install Smbios Table at 0x%lx, length 0x%x\n", S= ystemTableInfo->SmbiosTableBase, SystemTableInfo->SmbiosTableSize));=0D - Status =3D gBS->InstallConfigurationTable (&gEfiSmbiosTableGuid, (VOID= *)(UINTN)SystemTableInfo->SmbiosTableBase);=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.inf b/UefiPayloadPkg/= BlSupportDxe/BlSupportDxe.inf index cebc811355..30f41f8c39 100644 --- a/UefiPayloadPkg/BlSupportDxe/BlSupportDxe.inf +++ b/UefiPayloadPkg/BlSupportDxe/BlSupportDxe.inf @@ -3,7 +3,7 @@ #=0D # Report some MMIO/IO resources to dxe core, extract smbios and acpi table= s=0D #=0D -# Copyright (c) 2014 - 2020, Intel Corporation. All rights reserved.
= =0D +# Copyright (c) 2014 - 2021, Intel Corporation. All rights reserved.
= =0D #=0D # SPDX-License-Identifier: BSD-2-Clause-Patent=0D #=0D @@ -43,7 +43,6 @@ =0D [Guids]=0D gEfiAcpiTableGuid=0D - gEfiSmbiosTableGuid=0D gUefiSystemTableInfoGuid=0D gUefiAcpiBoardInfoGuid=0D gEfiGraphicsInfoHobGuid=0D diff --git a/UefiPayloadPkg/UefiPayloadEntry/UefiPayloadEntry.c b/UefiPaylo= adPkg/UefiPayloadEntry/UefiPayloadEntry.c index 805f5448d9..80f66a3fd5 100644 --- a/UefiPayloadPkg/UefiPayloadEntry/UefiPayloadEntry.c +++ b/UefiPayloadPkg/UefiPayloadEntry/UefiPayloadEntry.c @@ -1,6 +1,6 @@ /** @file=0D =0D - Copyright (c) 2014 - 2020, Intel Corporation. All rights reserved.
=0D + Copyright (c) 2014 - 2021, Intel Corporation. All rights reserved.
=0D SPDX-License-Identifier: BSD-2-Clause-Patent=0D =0D **/=0D @@ -234,6 +234,7 @@ BuildHobFromBl ( EFI_PEI_GRAPHICS_INFO_HOB *NewGfxInfo;=0D EFI_PEI_GRAPHICS_DEVICE_INFO_HOB GfxDeviceInfo;=0D EFI_PEI_GRAPHICS_DEVICE_INFO_HOB *NewGfxDeviceInfo;=0D + UNIVERSAL_PAYLOAD_SMBIOS_TABLE *SmBiosTableHob;=0D =0D //=0D // Parse memory info and build memory HOBs=0D @@ -276,6 +277,15 @@ BuildHobFromBl ( DEBUG ((DEBUG_INFO, "Detected Acpi Table at 0x%lx, length 0x%x\n", Sys= TableInfo.AcpiTableBase, SysTableInfo.AcpiTableSize));=0D DEBUG ((DEBUG_INFO, "Detected Smbios Table at 0x%lx, length 0x%x\n", S= ysTableInfo.SmbiosTableBase, SysTableInfo.SmbiosTableSize));=0D }=0D + //=0D + // Creat SmBios table Hob=0D + //=0D + SmBiosTableHob =3D BuildGuidHob (&gUniversalPayloadSmbiosTableGuid, size= of (UNIVERSAL_PAYLOAD_SMBIOS_TABLE));=0D + ASSERT (SmBiosTableHob !=3D NULL);=0D + SmBiosTableHob->Header.Revision =3D UNIVERSAL_PAYLOAD_SMBIOS_TABLE_REVIS= ION;=0D + SmBiosTableHob->Header.Length =3D sizeof (UNIVERSAL_PAYLOAD_SMBIOS_TABLE= );=0D + SmBiosTableHob->SmBiosEntryPoint =3D SysTableInfo.SmbiosTableBase;=0D + DEBUG ((DEBUG_INFO, "Create smbios table gUniversalPayloadSmbiosTableGui= d guid hob\n"));=0D =0D //=0D // Create guid hob for acpi board information=0D diff --git a/UefiPayloadPkg/UefiPayloadEntry/UefiPayloadEntry.h b/UefiPaylo= adPkg/UefiPayloadEntry/UefiPayloadEntry.h index 2c84d6ed53..e7d0d15118 100644 --- a/UefiPayloadPkg/UefiPayloadEntry/UefiPayloadEntry.h +++ b/UefiPayloadPkg/UefiPayloadEntry/UefiPayloadEntry.h @@ -1,6 +1,6 @@ /** @file=0D *=0D -* Copyright (c) 2020, Intel Corporation. All rights reserved.
=0D +* Copyright (c) 2021, Intel Corporation. All rights reserved.
=0D *=0D * SPDX-License-Identifier: BSD-2-Clause-Patent=0D *=0D @@ -31,6 +31,7 @@ #include =0D #include =0D #include =0D +#include =0D =0D =0D #define LEGACY_8259_MASK_REGISTER_MASTER 0x21=0D diff --git a/UefiPayloadPkg/UefiPayloadEntry/UefiPayloadEntry.inf b/UefiPay= loadPkg/UefiPayloadEntry/UefiPayloadEntry.inf index cc59f1903b..fc5b5ce9d4 100644 --- a/UefiPayloadPkg/UefiPayloadEntry/UefiPayloadEntry.inf +++ b/UefiPayloadPkg/UefiPayloadEntry/UefiPayloadEntry.inf @@ -1,7 +1,7 @@ ## @file=0D # This is the first module for UEFI payload.=0D #=0D -# Copyright (c) 2006 - 2020, Intel Corporation. All rights reserved.
= =0D +# Copyright (c) 2006 - 2021, Intel Corporation. All rights reserved.
= =0D # Copyright (c) 2017, AMD Incorporated. All rights reserved.
=0D #=0D # SPDX-License-Identifier: BSD-2-Clause-Patent=0D @@ -64,6 +64,7 @@ gEfiGraphicsInfoHobGuid=0D gEfiGraphicsDeviceInfoHobGuid=0D gUefiAcpiBoardInfoGuid=0D + gUniversalPayloadSmbiosTableGuid=0D =0D [FeaturePcd.IA32]=0D gEfiMdeModulePkgTokenSpaceGuid.PcdDxeIplSwitchToLongMode ## CONSUME= S=0D --=20 2.30.0.windows.2