From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mga17.intel.com (mga17.intel.com [192.55.52.151]) by mx.groups.io with SMTP id smtpd.web08.1772.1634690417590398736 for ; Tue, 19 Oct 2021 17:40:17 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@intel.onmicrosoft.com header.s=selector2-intel-onmicrosoft-com header.b=N+LnfREz; spf=pass (domain: intel.com, ip: 192.55.52.151, mailfrom: guo.dong@intel.com) X-IronPort-AV: E=McAfee;i="6200,9189,10142"; a="209456124" X-IronPort-AV: E=Sophos;i="5.87,165,1631602800"; d="scan'208";a="209456124" Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by fmsmga107.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 19 Oct 2021 17:40:16 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.87,165,1631602800"; d="scan'208";a="574905013" Received: from fmsmsx605.amr.corp.intel.com ([10.18.126.85]) by fmsmga002.fm.intel.com with ESMTP; 19 Oct 2021 17:40:16 -0700 Received: from fmsmsx609.amr.corp.intel.com (10.18.126.89) by fmsmsx605.amr.corp.intel.com (10.18.126.85) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2242.12; Tue, 19 Oct 2021 17:40:16 -0700 Received: from fmsmsx611.amr.corp.intel.com (10.18.126.91) by fmsmsx609.amr.corp.intel.com (10.18.126.89) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2242.12; Tue, 19 Oct 2021 17:40:15 -0700 Received: from fmsedg601.ED.cps.intel.com (10.1.192.135) by fmsmsx611.amr.corp.intel.com (10.18.126.91) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2242.12 via Frontend Transport; Tue, 19 Oct 2021 17:40:15 -0700 Received: from NAM04-MW2-obe.outbound.protection.outlook.com (104.47.73.170) by edgegateway.intel.com (192.55.55.70) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2242.12; Tue, 19 Oct 2021 17:40:14 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=PwoJT9Cu/4UFl7sgqZc5tUykrd2CGKaWQ6Yp47dFM9SqFBGah3UNECKx0ljh7Qv7ZW+bGpaSksMWIK4lc5+eahVu67O2/Y9lODH2IvHKaLzcPQ6dTIX9SBaXwLmhFddQTiB7D7w9w53xQiv8X5z7nY2F1SBPPQ3dlbKkGqtDx1b6zaKbOtI0ESvXr7alP/o9y0EbwOc76etZdncvtIgPcrB60IYz6EmQNNN54rAokFvH7y4F2hlu5NhtHgCxUK9PmStVmKgVOdD8mj3UxFMHuATyQ5mMbmVmBNUXIMsSNVN3c1SjAdDpGtqhxmXrxwdSPFATx37gJSfp2FEM8sgsQg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=3mvr/bzao/rKJ2rAT0EL6Qtvmd2J2yxuxpOxCFnWVAg=; b=bRidpxCFUV6DSjK0NT8a5OxqjexpFi3jNM51b3Q149YXG2AC/p3Z8FSs+0ItL9Ffl0qMwXGkEYZgQtme2D1XnzSadZTXB63kmyCiTc2IIlwWzqvOe7jYezipFb0sIGo1gnLClqOxegv1KJzfAqoD2YMi4VqCrRYSKDo1OGzng4ZZ2vA6RG1MfLVbe6H+zpjbBn4O3VuXyo2tk93L87sYekcwnxzBP2Cte1jHWHjo9a947gROr9+ZmoeTkn7Xg0UM8rkVmu3/WgS6YW6MDDi7TGodHxH8qrNN82YMrhmWMVubvAcJeYianbTeyxHY1CtsOSzPeT7lOYRtWfa7Pul0cA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=intel.com; dmarc=pass action=none header.from=intel.com; dkim=pass header.d=intel.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=intel.onmicrosoft.com; s=selector2-intel-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=3mvr/bzao/rKJ2rAT0EL6Qtvmd2J2yxuxpOxCFnWVAg=; b=N+LnfREzPczuZ53MqkW1G7oDUv+WZX4N2QqT2Ii6H5UmJgQ28egdNERwqG04A75mOZp3L/z03Jkp4EVbybvhgyT3wNvcQ2YlxMTv5GN090d47mtTGDPJQZsNpDqd1EU6IMjSothM40FSg6gMivNtfkG32rOIDnZ10tUcYka5yGA= Received: from BYAPR11MB3622.namprd11.prod.outlook.com (2603:10b6:a03:fe::30) by BYAPR11MB2679.namprd11.prod.outlook.com (2603:10b6:a02:c7::17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4608.16; Wed, 20 Oct 2021 00:40:12 +0000 Received: from BYAPR11MB3622.namprd11.prod.outlook.com ([fe80::90e0:e0a7:9c0b:1f40]) by BYAPR11MB3622.namprd11.prod.outlook.com ([fe80::90e0:e0a7:9c0b:1f40%6]) with mapi id 15.20.4608.018; Wed, 20 Oct 2021 00:40:12 +0000 From: "Guo Dong" To: "Kesavan Balakrishnan, ThiyaguX" , "devel@edk2.groups.io" CC: "Ma, Maurice" , "Ni, Ray" , "You, Benjamin" , "Liu, Zhiguang" Subject: Re: [PATCH v4] UefiPayloadPkg: Remove SystemTableInfo GUID. Thread-Topic: [PATCH v4] UefiPayloadPkg: Remove SystemTableInfo GUID. Thread-Index: AQHXxMZJovEuw1JkPkubRMSD3NASZ6vbBFZQ Date: Wed, 20 Oct 2021 00:40:12 +0000 Message-ID: References: <20211019084929.1273-1-thiyagux.kesavan.balakrishnan@intel.com> In-Reply-To: <20211019084929.1273-1-thiyagux.kesavan.balakrishnan@intel.com> Accept-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: dlp-product: dlpe-windows dlp-reaction: no-action dlp-version: 11.6.200.16 authentication-results: intel.com; dkim=none (message not signed) header.d=none;intel.com; dmarc=none action=none header.from=intel.com; x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: 6bd9bc54-778a-4473-6a2f-08d993622d78 x-ms-traffictypediagnostic: BYAPR11MB2679: x-ms-exchange-transport-forked: True x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:7691; x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: /DxC/wVRpqC9UbmkcfgHGr75IbVzr8LBQ3aKBsfH7HZdeKe+BjTCkphZndoaE/OC40ZaTKFkxl5dEg46Ud7u+j0p/+yZRpD46GgqT+KW4xXXNVZsuN8tzkK/oWB3xj0HRPyRP/ifqFDSe+OIQecVgvj1DWEO9wBOph9dBH9+FL7n+Du3pcjQ5OzRzS8uGPYqaGKW06s+nOlWwktV2XrZuz9qqa3uifm1CkAtiqB9sa7+DTRdx8q30E5R3YaRUtQ2df+gJf3HvLEjl9BP1XKHsNQ/j1aGLH5WMqB0e4rt/wKN1iROTlCiqK+AOYqmTrxJSUslOzrkIvaoRqfCYxhk8wSuhl34Txlngbk1M8MMlnC1Y2sAew5XXFE1M9g2emOoZvciIyxC9lkIjYfY2yIUXJdRz2wCEB+b4JQPDLMNsg2qjQ1cxADq1pvjaF8lUB2ByANsbizrKQMbJE7LNiHnZRiJgpioMhhrw+AFHGaN2ZYsF6ub4rjBic3o2HuM8sFSxQjcbF6z5E3JCuXYBcGyJJxiGVK1RMvYesyuBOdVWVo+YkBB5bgklSOcLfRSZjVvccDwQ9cThxWFjn0TKjSJJdQO+ZM4Jd3cscIiiggbgVMDAJd7rOojqaiMFQnFFLGXLReFvHeTovNt5W4T0B70qDLm7JqqNxatMhwg1xng6EAEEtmwJpvgVrPMU0rNGo6xMZCYRE+8oOE5LMogTt25Uw== x-forefront-antispam-report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:BYAPR11MB3622.namprd11.prod.outlook.com;PTR:;CAT:NONE;SFS:(366004)(86362001)(33656002)(186003)(316002)(8936002)(76116006)(8676002)(66476007)(66556008)(64756008)(122000001)(71200400001)(52536014)(83380400001)(4326008)(5660300002)(7696005)(26005)(110136005)(54906003)(82960400001)(508600001)(53546011)(9686003)(38070700005)(19627235002)(55016002)(66946007)(66446008)(107886003)(2906002)(6506007)(38100700002)(30864003);DIR:OUT;SFP:1102; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?VQRsslqVG9M+8RMGXzoqK0KZKay1HXf+KOeFd0WZx0oOFCa1n++K4t2bf93d?= =?us-ascii?Q?RUM4s6yBfb3cX4aYRdoryHjDwJBIYeOYpUUX9yjY5c87R2nqbPnTKwLYcwqI?= =?us-ascii?Q?W+gXhXgwYasGCmXJlYcFSLmwGqMnM6/nCiAXEBcDkrxVh8vu7fhlFZ5y4TEi?= =?us-ascii?Q?BTmjHIzvBZhMdqNrT01R9XlB5RNkT1qDHu2OZ451QGG2XPdPeFND9BAamcHD?= =?us-ascii?Q?LUxeF7TjBzdboHv0iFu30ADjRe7CN+UnbYbNwN8FGs/S1DcmIMWiiyEta2LE?= =?us-ascii?Q?Hl2wnE5HUgyI6GfZENc9XTVZxD7QQ/YiomKKHmznV1t0c8N3BFoxURf+wHlp?= =?us-ascii?Q?7aonvjXwuzfKaztaPYTyEjSxock5cvNpBEHsGifwIb4JTyBIlTNvGBg8Bmv1?= =?us-ascii?Q?R08VldIKW/SOemvbYyoVb4u40LJ/fzKSYG45HeYv7oi3HwGJpYw6LoFxgian?= =?us-ascii?Q?KRB6WZ7793LKGJkXcsWLrG0ElTT5uH8RMVylj4cJfuQDYUXm/WIZHQchNMqf?= =?us-ascii?Q?+dXkJz95YtMqczeAUdl7R7dRTDIEaBv+7PtaHzGmMVYbQdd0aZT2mGpLI7MN?= =?us-ascii?Q?CrXovFrTSTl3toK/ksIx/Pf7pyehvimyW2NqWVDuYoCoMVsgvkEP4Qb7Reak?= =?us-ascii?Q?f/JzJURWOluxVXjSV4F1KJZEtgkOP8HiSvYFXG69b+DWbfQCKtbF6AeEDtXb?= =?us-ascii?Q?2orWVX3SCMngTEY9sm3n24o9Bd/DmYZ8G9d7iGe9qOj0awCH0eKbTq7DpTd9?= =?us-ascii?Q?JSuqHl2dQGOz2ttModlBdsa8C5Cko0dhngr/aaA0f5EUJjJlkuDhA79uijg/?= =?us-ascii?Q?olqwO6ZtZ8iCc/PbgJWm74xzkAePH1/8xHLQD5I3dbFrC2l0iP5Jup/pOVSu?= =?us-ascii?Q?uWvAXrzW4L7DzZk9pNmewtYTeDUCSWwGLfmaqlDeYtt3Q9Nj65PVOJeztYcE?= =?us-ascii?Q?D1e7yBhV2cx/VtUut2LvEobzcYhPXDj+dsVIOTBsRiMucnUXI8RvUGcuwLV9?= =?us-ascii?Q?TVy3UvLfkjk0EJ3eBWrtEC1op2c6QFmwLxjffRO7xGveXGYAK1QHGGXTN/Db?= =?us-ascii?Q?p2ueIfNTsYXvdwT7dB0NK3MNwuF51j0nlPD2CLGsrm3XZ/cXaTf4uRjnaVI3?= =?us-ascii?Q?W3AIjRS8JG2Cjnp2Fa9M5EV5rQkWSCzY3uB2mfIlEGiTMruhJOauwfL4EnJu?= =?us-ascii?Q?v1zoYiyNdC4PTCVOlffu0bwbi0gtfiluHvPWCg16jcZzybO9zm/v3HP759aj?= =?us-ascii?Q?QWW1wJl4wkEOeS6/b+u9Gvs17XlTn9aVOxyRKW6EqkjsaImsfUuPdTF2/2oL?= =?us-ascii?Q?O8kNrUOzyGrdYSm+8VS7KeEE?= MIME-Version: 1.0 X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: BYAPR11MB3622.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 6bd9bc54-778a-4473-6a2f-08d993622d78 X-MS-Exchange-CrossTenant-originalarrivaltime: 20 Oct 2021 00:40:12.7070 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 46c98d88-e344-4ed4-8496-4ed7712e255d X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: 7ut2ypgW+VwUjWSd0ANO/p+xoUC5LHbweARNBWnSfaebKMmjOabpY1YG1Zu4fjtjqXCFbyKMJZWUV5jp2OcuQg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: BYAPR11MB2679 Return-Path: guo.dong@intel.com X-OriginatorOrg: intel.com Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable + SmbiosHob.Raw =3D GetFirstGuidHob(&gUniversalPayloadSmbiosTableGuid); + if (SmbiosHob.Raw =3D=3D NULL) { + SmBiosTableHob =3D BuildGuidHob (&gUniversalPayloadSmbiosTableGuid, si= zeof (UNIVERSAL_PAYLOAD_SMBIOS_TABLE)); In non-universal payload, there is no gUniversalPayloadSmbiosTableGuid in U= EFI payload HOBs. SblParseLib could get it from SBL HOB list as below: ParseSmbiosTable ( OUT UNIVERSAL_PAYLOAD_SMBIOS_TABLE *SmbiosTable ) { UNIVERSAL_PAYLOAD_SMBIOS_TABLE *BlSmbiosTable; BlSmbiosTable =3D (UNIVERSAL_PAYLOAD_SMBIOS_TABLE *) GetGuidHobDataFromSb= l (&gUniversalPayloadSmbiosTableGuid); if (BlSmbiosTable =3D=3D NULL) { return RETURN_NOT_FOUND; } CopyMem (SmbiosTable, BlSmbiosTable, sizeof (UNIVERSAL_PAYLOAD_SMBIOS_TAB= LE)); return RETURN_SUCCESS; } So in the UefiPayloadEntry.c, we don't need change the HOB from the bootlo= ader, we could just build the HOB as-is as below: Status =3D ParseGfxDeviceInfo (&SmBiosTableHob); if (!EFI_ERROR (Status)) { NewSmBiosTableHob =3D BuildGuidHob (&gUniversalPayloadSmbiosTableGuid, = sizeof (SmBiosTableHob)); ASSERT (NewSmBiosTableHob !=3D NULL); CopyMem (NewSmBiosTableHob, &SmBiosTableHob, sizeof (SmBiosTableHob)); DEBUG ((DEBUG_INFO, "Created SMBIOS table hob\n")); } Same changes for ParseAcpiTableInfo(). Thanks, Guo -----Original Message----- From: Kesavan Balakrishnan, ThiyaguX =20 Sent: Tuesday, October 19, 2021 1:49 AM To: devel@edk2.groups.io Cc: Kesavan Balakrishnan, ThiyaguX ; Ma, Maurice ; Dong, Guo ; Ni, = Ray ; You, Benjamin ; Liu, Zhigua= ng Subject: [PATCH v4] UefiPayloadPkg: Remove SystemTableInfo GUID. SystemTableInfo GUID is not a Spec defined GUID. The latest CBL and SBL produces ACPI and SMBIOS table information according= to the Spec. So removing the SystemTableInfo GUID implementation. Cc: Maurice Ma Cc: Guo Dong Cc: Ray Ni Cc: Benjamin You Cc: Zhiguang Liu Signed-off-by: Guo Dong Signed-off-by: Thiyagu Kesavan Balakrishnan --- UefiPayloadPkg/BlSupportDxe/BlSupportDxe.h | 1 - UefiPayloadPkg/BlSupportDxe/BlSupportDxe.inf | 1 - UefiPayloadPkg/Include/Guid/SystemTableInfoGuid.h | 26 -----------= --------------- UefiPayloadPkg/Include/Library/BlParseLib.h | 25 +++++++++++= +++++++++----- UefiPayloadPkg/Library/CbParseLib/CbParseLib.c | 40 +++++++++++= ++++++++++++++++++++--------- UefiPayloadPkg/Library/SblParseLib/SblParseLib.c | 36 +++++++++++= +++++++++++-------------- UefiPayloadPkg/Library/SblParseLib/SblParseLib.inf | 3 ++- UefiPayloadPkg/UefiPayloadEntry/UefiPayloadEntry.c | 64 +++++++++++= ++++++++++++++++++++++++----------------------------- UefiPayloadPkg/UefiPayloadEntry/UefiPayloadEntry.h | 1 - UefiPayloadPkg/UefiPayloadEntry/UefiPayloadEntry.inf | 1 - UefiPayloadPkg/UefiPayloadEntry/UniversalPayloadEntry.inf | 1 - 11 files changed, 110 insertions(+), 89 deletions(-) diff --git a/UefiPayloadPkg/BlSupportDxe/BlSupportDxe.h b/UefiPayloadPkg/Bl= SupportDxe/BlSupportDxe.h index 3332a30eae..b16ca4cc59 100644 --- a/UefiPayloadPkg/BlSupportDxe/BlSupportDxe.h +++ b/UefiPayloadPkg/BlSupportDxe/BlSupportDxe.h @@ -20,7 +20,6 @@ SPDX-License-Identifier: BSD-2-Clause-Patent #include =20 #include -#include #include #include =20 diff --git a/UefiPayloadPkg/BlSupportDxe/BlSupportDxe.inf b/UefiPayloadPkg/= BlSupportDxe/BlSupportDxe.inf index 1ccb250991..96d85d2b1d 100644 --- a/UefiPayloadPkg/BlSupportDxe/BlSupportDxe.inf +++ b/UefiPayloadPkg/BlSupportDxe/BlSupportDxe.inf @@ -42,7 +42,6 @@ HobLib =20 [Guids] - gUefiSystemTableInfoGuid gUefiAcpiBoardInfoGuid gEfiGraphicsInfoHobGuid =20 diff --git a/UefiPayloadPkg/Include/Guid/SystemTableInfoGuid.h b/UefiPayloa= dPkg/Include/Guid/SystemTableInfoGuid.h deleted file mode 100644 index e742dd0ca5..0000000000 --- a/UefiPayloadPkg/Include/Guid/SystemTableInfoGuid.h +++ /dev/null @@ -1,26 +0,0 @@ -/** @file - This file defines the hob structure for system tables like ACPI, SMBIOS = tables. - - Copyright (c) 2014 - 2019, Intel Corporation. All rights reserved.
- SPDX-License-Identifier: BSD-2-Clause-Patent - -**/ - -#ifndef SYSTEM_TABLE_INFO_GUID_H_ -#define SYSTEM_TABLE_INFO_GUID_H_ - -/// -/// System Table Information GUID -/// -extern EFI_GUID gUefiSystemTableInfoGuid; - -typedef struct { - UINT8 Revision; - UINT8 Reserved0[3]; - UINT64 AcpiTableBase; - UINT32 AcpiTableSize; - UINT64 SmbiosTableBase; - UINT32 SmbiosTableSize; -} SYSTEM_TABLE_INFO; - -#endif diff --git a/UefiPayloadPkg/Include/Library/BlParseLib.h b/UefiPayloadPkg/I= nclude/Library/BlParseLib.h index 7198e419bd..5b5063b4e5 100644 --- a/UefiPayloadPkg/Include/Library/BlParseLib.h +++ b/UefiPayloadPkg/Include/Library/BlParseLib.h @@ -13,8 +13,9 @@ #include #include #include -#include #include +#include #include=20 + =20 #define GET_BOOTLOADER_PARAMETER() PcdGet64 (PcdBootloaderParameter) =20 @@ -55,9 +56,9 @@ ParseMemoryInfo ( ); =20 /** - Acquire acpi table and smbios table from slim bootloader + Acquire SMBIOS table from bootloader. =20 - @param SystemTableInfo Pointer to the system table info + @param SmbiosTable Pointer to the SMBIOS table info. =20 @retval RETURN_SUCCESS Successfully find out the tables. @retval RETURN_NOT_FOUND Failed to find the tables. @@ -65,10 +66,24 @@ ParseMemoryInfo ( **/ RETURN_STATUS EFIAPI -ParseSystemTable ( - OUT SYSTEM_TABLE_INFO *SystemTableInfo +ParseSmbiosTable ( + OUT UNIVERSAL_PAYLOAD_SMBIOS_TABLE *SmbiosTable ); =20 +/** + Acquire ACPI table from bootloader. + + @param AcpiTableHob Pointer to the ACPI table info. + + @retval RETURN_SUCCESS Successfully find out the tables. + @retval RETURN_NOT_FOUND Failed to find the tables. + +**/ +RETURN_STATUS +EFIAPI +ParseAcpiTableInfo ( + OUT UNIVERSAL_PAYLOAD_ACPI_TABLE *AcpiTableHob + ); =20 /** Find the serial port information diff --git a/UefiPayloadPkg/Library/CbParseLib/CbParseLib.c b/UefiPayloadPk= g/Library/CbParseLib/CbParseLib.c index 46314e5566..61c5683260 100644 --- a/UefiPayloadPkg/Library/CbParseLib/CbParseLib.c +++ b/UefiPayloadPkg/Library/CbParseLib/CbParseLib.c @@ -410,9 +410,9 @@ ParseMemoryInfo ( =20 =20 /** - Acquire acpi table and smbios table from coreboot + Acquire SMBIOS table from coreboot. =20 - @param SystemTableInfo Pointer to the system table info + @param SmbiosTable Pointer to the SMBIOS table info. =20 @retval RETURN_SUCCESS Successfully find out the tables. @retval RETURN_NOT_FOUND Failed to find the tables. @@ -420,8 +420,8 @@ ParseMemoryInfo ( **/ RETURN_STATUS EFIAPI -ParseSystemTable ( - OUT SYSTEM_TABLE_INFO *SystemTableInfo +ParseSmbiosTable ( + OUT UNIVERSAL_PAYLOAD_SMBIOS_TABLE *SmbiosTable ) { EFI_STATUS Status; @@ -432,17 +432,39 @@ ParseSystemTable ( if (EFI_ERROR (Status)) { return EFI_NOT_FOUND; } - SystemTableInfo->SmbiosTableBase =3D (UINT64) (UINTN)MemTable; - SystemTableInfo->SmbiosTableSize =3D MemTableSize; + SmbiosTable->SmBiosEntryPoint =3D (UINT64) (UINTN)MemTable; + + return RETURN_SUCCESS; +} + + +/** + Acquire ACPI table from coreboot. + + @param AcpiTableHob Pointer to the ACPI table info. + + @retval RETURN_SUCCESS Successfully find out the tables. + @retval RETURN_NOT_FOUND Failed to find the tables. + +**/ + +RETURN_STATUS +EFIAPI +ParseAcpiTableInfo ( + OUT UNIVERSAL_PAYLOAD_ACPI_TABLE *AcpiTableHob + ) +{ + EFI_STATUS Status; + VOID *MemTable; + UINT32 MemTableSize; =20 Status =3D ParseCbMemTable (SIGNATURE_32 ('I', 'P', 'C', 'A'), &MemTable= , &MemTableSize); if (EFI_ERROR (Status)) { return EFI_NOT_FOUND; } - SystemTableInfo->AcpiTableBase =3D (UINT64) (UINTN)MemTable; - SystemTableInfo->AcpiTableSize =3D MemTableSize; + AcpiTableHob->Rsdp =3D (UINT64) (UINTN)MemTable; =20 - return Status; + return RETURN_SUCCESS; } =20 =20 diff --git a/UefiPayloadPkg/Library/SblParseLib/SblParseLib.c b/UefiPayload= Pkg/Library/SblParseLib/SblParseLib.c index eeb0dfe74a..5fa459255e 100644 --- a/UefiPayloadPkg/Library/SblParseLib/SblParseLib.c +++ b/UefiPayloadPkg/Library/SblParseLib/SblParseLib.c @@ -110,33 +110,41 @@ ParseMemoryInfo ( } =20 /** - Acquire acpi table and smbios table from slim bootloader + Acquire SMBIOS table from slim bootloader. =20 - @param SystemTableInfo Pointer to the system table info + @param SmbiosTable Pointer to the SMBIOS table info. =20 - @retval RETURN_SUCCESS Successfully find out the tables. @retval RETURN_NOT_FOUND Failed to find the tables. =20 **/ RETURN_STATUS EFIAPI -ParseSystemTable ( - OUT SYSTEM_TABLE_INFO *SystemTableInfo +ParseSmbiosTable ( + OUT UNIVERSAL_PAYLOAD_SMBIOS_TABLE *SmbiosTable ) { - SYSTEM_TABLE_INFO *TableInfo; + DEBUG ((DEBUG_ERROR, "gUniversalPayloadSmbiosTableGuid should be=20 +produced by SlimBoot Loader.\n")); + return RETURN_NOT_FOUND; +} =20 - TableInfo =3D (SYSTEM_TABLE_INFO *)GetGuidHobDataFromSbl (&gUefiSystemTa= bleInfoGuid); - if (TableInfo =3D=3D NULL) { - ASSERT (FALSE); - return RETURN_NOT_FOUND; - } =20 - CopyMem (SystemTableInfo, TableInfo, sizeof (SYSTEM_TABLE_INFO)); +/** + Acquire ACPI table from slim bootloader. =20 - return RETURN_SUCCESS; -} + @param AcpiTableHob Pointer to the ACPI table info. =20 + @retval RETURN_NOT_FOUND Failed to find the tables. + +**/ +RETURN_STATUS +EFIAPI +ParseAcpiTableInfo ( + OUT UNIVERSAL_PAYLOAD_ACPI_TABLE *AcpiTableHob + ) +{ + DEBUG ((DEBUG_ERROR, "gUniversalPayloadAcpiTableGuid should be=20 +produced by SlimBoot Loader.\n")); + return RETURN_NOT_FOUND; +} =20 /** Find the serial port information diff --git a/UefiPayloadPkg/Library/SblParseLib/SblParseLib.inf b/UefiPaylo= adPkg/Library/SblParseLib/SblParseLib.inf index 535cca58a6..d0de75433d 100644 --- a/UefiPayloadPkg/Library/SblParseLib/SblParseLib.inf +++ b/UefiPayloadPkg/Library/SblParseLib/SblParseLib.inf @@ -36,7 +36,8 @@ HobLib =20 [Guids] - gUefiSystemTableInfoGuid + gUniversalPayloadAcpiTableGuid + gUniversalPayloadSmbiosTableGuid gUefiSerialPortInfoGuid gLoaderMemoryMapInfoGuid gEfiGraphicsInfoHobGuid diff --git a/UefiPayloadPkg/UefiPayloadEntry/UefiPayloadEntry.c b/UefiPaylo= adPkg/UefiPayloadEntry/UefiPayloadEntry.c index 9efe01d094..491fd2d3bb 100644 --- a/UefiPayloadPkg/UefiPayloadEntry/UefiPayloadEntry.c +++ b/UefiPayloadPkg/UefiPayloadEntry/UefiPayloadEntry.c @@ -224,8 +224,6 @@ BuildHobFromBl ( ) { EFI_STATUS Status; - SYSTEM_TABLE_INFO SysTableInfo; - SYSTEM_TABLE_INFO *NewSysTableInfo; ACPI_BOARD_INFO *AcpiBoardInfo; EFI_PEI_GRAPHICS_INFO_HOB GfxInfo; EFI_PEI_GRAPHICS_INFO_HOB *NewGfxInfo; @@ -233,6 +231,8 @@ BuildHobFromBl ( EFI_PEI_GRAPHICS_DEVICE_INFO_HOB *NewGfxDeviceInfo; UNIVERSAL_PAYLOAD_SMBIOS_TABLE *SmBiosTableHob; UNIVERSAL_PAYLOAD_ACPI_TABLE *AcpiTableHob; + EFI_PEI_HOB_POINTERS SmbiosHob; + EFI_PEI_HOB_POINTERS AcpiHob; =20 // // First find TOLUD @@ -274,42 +274,48 @@ BuildHobFromBl ( } =20 =20 - // - // Create guid hob for system tables like acpi table and smbios table - // - Status =3D ParseSystemTable(&SysTableInfo); - ASSERT_EFI_ERROR (Status); - if (!EFI_ERROR (Status)) { - NewSysTableInfo =3D BuildGuidHob (&gUefiSystemTableInfoGuid, sizeof (S= YSTEM_TABLE_INFO)); - ASSERT (NewSysTableInfo !=3D NULL); - CopyMem (NewSysTableInfo, &SysTableInfo, sizeof (SYSTEM_TABLE_INFO)); - DEBUG ((DEBUG_INFO, "Detected Acpi Table at 0x%lx, length 0x%x\n", Sys= TableInfo.AcpiTableBase, SysTableInfo.AcpiTableSize)); - DEBUG ((DEBUG_INFO, "Detected Smbios Table at 0x%lx, length 0x%x\n", S= ysTableInfo.SmbiosTableBase, SysTableInfo.SmbiosTableSize)); - } // // Creat SmBios table Hob // - SmBiosTableHob =3D BuildGuidHob (&gUniversalPayloadSmbiosTableGuid, size= of (UNIVERSAL_PAYLOAD_SMBIOS_TABLE)); - ASSERT (SmBiosTableHob !=3D NULL); - SmBiosTableHob->Header.Revision =3D UNIVERSAL_PAYLOAD_SMBIOS_TABLE_REVIS= ION; - SmBiosTableHob->Header.Length =3D sizeof (UNIVERSAL_PAYLOAD_SMBIOS_TABLE= ); - SmBiosTableHob->SmBiosEntryPoint =3D SysTableInfo.SmbiosTableBase; - DEBUG ((DEBUG_INFO, "Create smbios table gUniversalPayloadSmbiosTableGui= d guid hob\n")); - + SmbiosHob.Raw =3D GetFirstGuidHob(&gUniversalPayloadSmbiosTableGuid); + if (SmbiosHob.Raw =3D=3D NULL) { + SmBiosTableHob =3D BuildGuidHob (&gUniversalPayloadSmbiosTableGuid, si= zeof (UNIVERSAL_PAYLOAD_SMBIOS_TABLE)); + ASSERT (SmBiosTableHob !=3D NULL); + SmBiosTableHob->Header.Revision =3D UNIVERSAL_PAYLOAD_SMBIOS_TABLE_REV= ISION; + SmBiosTableHob->Header.Length =3D sizeof (UNIVERSAL_PAYLOAD_SMBIOS_TAB= LE); + DEBUG ((DEBUG_INFO, "Create smbios table gUniversalPayloadSmbiosTableG= uid guid hob\n")); + Status =3D ParseSmbiosTable(SmBiosTableHob); + if (!EFI_ERROR (Status)) { + DEBUG ((DEBUG_INFO, "Detected Smbios Table at 0x%lx\n", SmBiosTableH= ob->SmBiosEntryPoint)); + } + } + else { + SmBiosTableHob =3D (UNIVERSAL_PAYLOAD_SMBIOS_TABLE *)(*(UINTN *)(GET_G= UID_HOB_DATA (SmbiosHob.Raw))); + DEBUG ((DEBUG_INFO, "Detected Smbios Table at 0x%lx\n",=20 + SmBiosTableHob->SmBiosEntryPoint)); + } // // Creat ACPI table Hob // - AcpiTableHob =3D BuildGuidHob (&gUniversalPayloadAcpiTableGuid, sizeof (= UNIVERSAL_PAYLOAD_ACPI_TABLE)); - ASSERT (AcpiTableHob !=3D NULL); - AcpiTableHob->Header.Revision =3D UNIVERSAL_PAYLOAD_ACPI_TABLE_REVISION; - AcpiTableHob->Header.Length =3D sizeof (UNIVERSAL_PAYLOAD_ACPI_TABLE); - AcpiTableHob->Rsdp =3D SysTableInfo.AcpiTableBase; - DEBUG ((DEBUG_INFO, "Create smbios table gUniversalPayloadAcpiTableGuid = guid hob\n")); - + AcpiHob.Raw =3D GetFirstGuidHob(&gUniversalPayloadAcpiTableGuid); + if (AcpiHob.Raw =3D=3D NULL) { + AcpiTableHob =3D BuildGuidHob (&gUniversalPayloadAcpiTableGuid, sizeof= (UNIVERSAL_PAYLOAD_ACPI_TABLE)); + ASSERT (AcpiTableHob !=3D NULL); + AcpiTableHob->Header.Revision =3D UNIVERSAL_PAYLOAD_ACPI_TABLE_REVISIO= N; + AcpiTableHob->Header.Length =3D sizeof (UNIVERSAL_PAYLOAD_ACPI_TABLE); + DEBUG ((DEBUG_INFO, "Create ACPI table gUniversalPayloadAcpiTableGuid = guid hob\n")); + Status =3D ParseAcpiTableInfo(AcpiTableHob); + if (!EFI_ERROR (Status)) { + DEBUG ((DEBUG_INFO, "Detected ACPI Table at 0x%lx\n", AcpiTableHob->= Rsdp)); + } + } + else { + AcpiTableHob =3D (UNIVERSAL_PAYLOAD_ACPI_TABLE *)(*(UINTN *)(GET_GUID_= HOB_DATA (AcpiHob.Raw))); + DEBUG ((DEBUG_INFO, "Detected ACPI Table at 0x%lx\n",=20 + AcpiTableHob->Rsdp)); } // // Create guid hob for acpi board information // - AcpiBoardInfo =3D BuildHobFromAcpi (SysTableInfo.AcpiTableBase); + AcpiBoardInfo =3D BuildHobFromAcpi (AcpiTableHob->Rsdp); ASSERT (AcpiBoardInfo !=3D NULL); =20 // diff --git a/UefiPayloadPkg/UefiPayloadEntry/UefiPayloadEntry.h b/UefiPaylo= adPkg/UefiPayloadEntry/UefiPayloadEntry.h index 637ed9c20b..716430e3cb 100644 --- a/UefiPayloadPkg/UefiPayloadEntry/UefiPayloadEntry.h +++ b/UefiPayloadPkg/UefiPayloadEntry/UefiPayloadEntry.h @@ -27,7 +27,6 @@ #include #include #include -#include #include #include #include diff --git a/UefiPayloadPkg/UefiPayloadEntry/UefiPayloadEntry.inf b/UefiPay= loadPkg/UefiPayloadEntry/UefiPayloadEntry.inf index 96e4bb81f4..07a678bd46 100644 --- a/UefiPayloadPkg/UefiPayloadEntry/UefiPayloadEntry.inf +++ b/UefiPayloadPkg/UefiPayloadEntry/UefiPayloadEntry.inf @@ -59,7 +59,6 @@ [Guids] gEfiMemoryTypeInformationGuid gEfiFirmwareFileSystem2Guid - gUefiSystemTableInfoGuid gEfiGraphicsInfoHobGuid gEfiGraphicsDeviceInfoHobGuid gUefiAcpiBoardInfoGuid diff --git a/UefiPayloadPkg/UefiPayloadEntry/UniversalPayloadEntry.inf b/Ue= fiPayloadPkg/UefiPayloadEntry/UniversalPayloadEntry.inf index 928bd2e42b..a8576305ad 100644 --- a/UefiPayloadPkg/UefiPayloadEntry/UniversalPayloadEntry.inf +++ b/UefiPayloadPkg/UefiPayloadEntry/UniversalPayloadEntry.inf @@ -57,7 +57,6 @@ [Guids] gEfiMemoryTypeInformationGuid gEfiFirmwareFileSystem2Guid - gUefiSystemTableInfoGuid gEfiGraphicsInfoHobGuid gEfiGraphicsDeviceInfoHobGuid gUefiAcpiBoardInfoGuid -- 2.33.0.windows.2