diff options
author | Zhiguang Liu <zhiguang.liu@intel.com> | 2021-04-01 16:21:27 +0800 |
---|---|---|
committer | mergify[bot] <37929162+mergify[bot]@users.noreply.github.com> | 2021-06-16 05:20:19 +0000 |
commit | 302a8f353c6ded0cdabb55671c4d7012b5e11ed7 (patch) | |
tree | d3cdcebff276caad055253784b39d64ff6131d08 /UefiPayloadPkg/UefiPayloadEntry | |
parent | 70e8c9c3bc582066c87ddf99aa1b33428ce11554 (diff) | |
download | edk2-302a8f353c6ded0cdabb55671c4d7012b5e11ed7.tar.gz edk2-302a8f353c6ded0cdabb55671c4d7012b5e11ed7.tar.bz2 edk2-302a8f353c6ded0cdabb55671c4d7012b5e11ed7.zip |
UefiPayloadPkg: Create gUniversalPayloadSmbiosTableGuid Hob
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 <maurice.ma@intel.com>
Cc: Guo Dong <guo.dong@intel.com>
Cc: Benjamin You <benjamin.you@intel.com>
Reviewed-by: Guo Dong <guo.dong@intel.com>
Tested-by: Patrick Rudolph <patrick.rudolph@9elements.com>
Signed-off-by: Zhiguang Liu <zhiguang.liu@intel.com>
Diffstat (limited to 'UefiPayloadPkg/UefiPayloadEntry')
-rw-r--r-- | UefiPayloadPkg/UefiPayloadEntry/UefiPayloadEntry.c | 12 | ||||
-rw-r--r-- | UefiPayloadPkg/UefiPayloadEntry/UefiPayloadEntry.h | 3 | ||||
-rw-r--r-- | UefiPayloadPkg/UefiPayloadEntry/UefiPayloadEntry.inf | 3 |
3 files changed, 15 insertions, 3 deletions
diff --git a/UefiPayloadPkg/UefiPayloadEntry/UefiPayloadEntry.c b/UefiPayloadPkg/UefiPayloadEntry/UefiPayloadEntry.c index 805f5448d9..80f66a3fd5 100644 --- a/UefiPayloadPkg/UefiPayloadEntry/UefiPayloadEntry.c +++ b/UefiPayloadPkg/UefiPayloadEntry/UefiPayloadEntry.c @@ -1,6 +1,6 @@ /** @file
- Copyright (c) 2014 - 2020, Intel Corporation. All rights reserved.<BR>
+ Copyright (c) 2014 - 2021, Intel Corporation. All rights reserved.<BR>
SPDX-License-Identifier: BSD-2-Clause-Patent
**/
@@ -234,6 +234,7 @@ BuildHobFromBl ( EFI_PEI_GRAPHICS_INFO_HOB *NewGfxInfo;
EFI_PEI_GRAPHICS_DEVICE_INFO_HOB GfxDeviceInfo;
EFI_PEI_GRAPHICS_DEVICE_INFO_HOB *NewGfxDeviceInfo;
+ UNIVERSAL_PAYLOAD_SMBIOS_TABLE *SmBiosTableHob;
//
// Parse memory info and build memory HOBs
@@ -276,6 +277,15 @@ BuildHobFromBl ( DEBUG ((DEBUG_INFO, "Detected Acpi Table at 0x%lx, length 0x%x\n", SysTableInfo.AcpiTableBase, SysTableInfo.AcpiTableSize));
DEBUG ((DEBUG_INFO, "Detected Smbios Table at 0x%lx, length 0x%x\n", SysTableInfo.SmbiosTableBase, SysTableInfo.SmbiosTableSize));
}
+ //
+ // Creat SmBios table Hob
+ //
+ SmBiosTableHob = BuildGuidHob (&gUniversalPayloadSmbiosTableGuid, sizeof (UNIVERSAL_PAYLOAD_SMBIOS_TABLE));
+ ASSERT (SmBiosTableHob != NULL);
+ SmBiosTableHob->Header.Revision = UNIVERSAL_PAYLOAD_SMBIOS_TABLE_REVISION;
+ SmBiosTableHob->Header.Length = sizeof (UNIVERSAL_PAYLOAD_SMBIOS_TABLE);
+ SmBiosTableHob->SmBiosEntryPoint = SysTableInfo.SmbiosTableBase;
+ DEBUG ((DEBUG_INFO, "Create smbios table gUniversalPayloadSmbiosTableGuid guid hob\n"));
//
// Create guid hob for acpi board information
diff --git a/UefiPayloadPkg/UefiPayloadEntry/UefiPayloadEntry.h b/UefiPayloadPkg/UefiPayloadEntry/UefiPayloadEntry.h index 2c84d6ed53..e7d0d15118 100644 --- a/UefiPayloadPkg/UefiPayloadEntry/UefiPayloadEntry.h +++ b/UefiPayloadPkg/UefiPayloadEntry/UefiPayloadEntry.h @@ -1,6 +1,6 @@ /** @file
*
-* Copyright (c) 2020, Intel Corporation. All rights reserved.<BR>
+* Copyright (c) 2021, Intel Corporation. All rights reserved.<BR>
*
* SPDX-License-Identifier: BSD-2-Clause-Patent
*
@@ -31,6 +31,7 @@ #include <Guid/MemoryMapInfoGuid.h>
#include <Guid/AcpiBoardInfoGuid.h>
#include <Guid/GraphicsInfoHob.h>
+#include <UniversalPayload/SmbiosTable.h>
#define LEGACY_8259_MASK_REGISTER_MASTER 0x21
diff --git a/UefiPayloadPkg/UefiPayloadEntry/UefiPayloadEntry.inf b/UefiPayloadPkg/UefiPayloadEntry/UefiPayloadEntry.inf index cc59f1903b..fc5b5ce9d4 100644 --- a/UefiPayloadPkg/UefiPayloadEntry/UefiPayloadEntry.inf +++ b/UefiPayloadPkg/UefiPayloadEntry/UefiPayloadEntry.inf @@ -1,7 +1,7 @@ ## @file
# This is the first module for UEFI payload.
#
-# Copyright (c) 2006 - 2020, Intel Corporation. All rights reserved.<BR>
+# Copyright (c) 2006 - 2021, Intel Corporation. All rights reserved.<BR>
# Copyright (c) 2017, AMD Incorporated. All rights reserved.<BR>
#
# SPDX-License-Identifier: BSD-2-Clause-Patent
@@ -64,6 +64,7 @@ gEfiGraphicsInfoHobGuid
gEfiGraphicsDeviceInfoHobGuid
gUefiAcpiBoardInfoGuid
+ gUniversalPayloadSmbiosTableGuid
[FeaturePcd.IA32]
gEfiMdeModulePkgTokenSpaceGuid.PcdDxeIplSwitchToLongMode ## CONSUMES
|