From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mga03.intel.com (mga03.intel.com [134.134.136.65]) by mx.groups.io with SMTP id smtpd.web10.5409.1634114300302611416 for ; Wed, 13 Oct 2021 01:38:21 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@intel.onmicrosoft.com header.s=selector2-intel-onmicrosoft-com header.b=afqWxPs4; spf=pass (domain: intel.com, ip: 134.134.136.65, mailfrom: ray.ni@intel.com) X-IronPort-AV: E=McAfee;i="6200,9189,10135"; a="227339953" X-IronPort-AV: E=Sophos;i="5.85,370,1624345200"; d="scan'208";a="227339953" Received: from orsmga006.jf.intel.com ([10.7.209.51]) by orsmga103.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 13 Oct 2021 01:37:57 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.85,370,1624345200"; d="scan'208";a="441567660" Received: from fmsmsx601.amr.corp.intel.com ([10.18.126.81]) by orsmga006.jf.intel.com with ESMTP; 13 Oct 2021 01:37:57 -0700 Received: from fmsmsx607.amr.corp.intel.com (10.18.126.87) by fmsmsx601.amr.corp.intel.com (10.18.126.81) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2242.12; Wed, 13 Oct 2021 01:37:56 -0700 Received: from fmsmsx601.amr.corp.intel.com (10.18.126.81) by fmsmsx607.amr.corp.intel.com (10.18.126.87) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2242.12; Wed, 13 Oct 2021 01:37:56 -0700 Received: from fmsedg601.ED.cps.intel.com (10.1.192.135) by fmsmsx601.amr.corp.intel.com (10.18.126.81) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2242.12 via Frontend Transport; Wed, 13 Oct 2021 01:37:56 -0700 Received: from NAM04-BN8-obe.outbound.protection.outlook.com (104.47.74.41) 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; Wed, 13 Oct 2021 01:37:53 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=d+BKn7cBYNnnTHo55PZ+7kEFejBLEnZ6PDoPJNrk7Sy+uphBXE8LqRq7txLpt0039VFxhsvhbcTsa7Hydkf3m9VcvFbPQKpoFJT54EH3j0zERXmrxU5VN4krQnDGFrIrQv086MRHsb2oFTpFTdx8cOl1t52Ve53iVx5JmGETsQPE0DnTeH+JNkCT2q62qSndopx5oY56MdjzaK7urPwQfiZCpBqv3R/yyPoOZe8XSXB7hwLJ0jGtewcP0mJ5559f8DfJV2ptGuoF/fi32onGOjP8nTO1a78H7y008sqa/sdqs3GTD7SnICq/Oq8IbpeRxYMdS/EbxAvhGJ955gocEg== 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=rAsMFgJSoNk0f0TWmjTumF/+VN5fERLAY0d0JIZcGiQ=; b=iFoEB+83nQ/UwIWom9FcqVRwVeENMIGTxJAs7b3l77VzQ9UQiDjSU0HrHMCLDlVDq4G6VrzKrTkg154xtpErNCm3Z0aycbiXUSDk06Wn/u+sD5tOMalvoVUZrt3Vfr3OLb+eSZ6axpbHn9O4df03GX4bVz5QeubumlEc4aFsq4FqlJBpKJ8vmX4BkNyueqpBenmB8yLj0OSCh91BhqazAZygoCpo/I21lBo3aub3D8MhyKKtE35XZMLaDKF3Np8ERQ3Bnz2ipbzJ0RoW2uJFucmIDvyYaNcQznDTzSGHVxCA2lPaqSD6lzCLbH5pyD8H0uikyk7aZdo7kDJ/O1shGQ== 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=rAsMFgJSoNk0f0TWmjTumF/+VN5fERLAY0d0JIZcGiQ=; b=afqWxPs41ofMHVY7suD3aaWAj1pTsLUw+eMKkGq4+FDq8cCw9EQPuomgFagtmu/01kGmkXgUbCWQAHWjWDC3uvDpy6dhtIF1IFyUWfs9Kc2OtfSecYQJ2LGThJplNluMOR9yTsevpv3P+rJmI27HsrOE7F9wNjPjOe71esqV5bc= Received: from BN0PR11MB5696.namprd11.prod.outlook.com (2603:10b6:408:14b::11) by BN6PR11MB3873.namprd11.prod.outlook.com (2603:10b6:405:83::37) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4587.25; Wed, 13 Oct 2021 08:37:52 +0000 Received: from BN0PR11MB5696.namprd11.prod.outlook.com ([fe80::317e:de35:e920:7778]) by BN0PR11MB5696.namprd11.prod.outlook.com ([fe80::317e:de35:e920:7778%3]) with mapi id 15.20.4587.026; Wed, 13 Oct 2021 08:37:52 +0000 From: "Ni, Ray" To: "Kesavan Balakrishnan, ThiyaguX" , "devel@edk2.groups.io" CC: "Ma, Maurice" , "Dong, Guo" , "You, Benjamin" , "Liu, Zhiguang" Subject: Re: [PATCH v3] UefiPayloadPkg: Remove SystemTableInfo GUID. Thread-Topic: [PATCH v3] UefiPayloadPkg: Remove SystemTableInfo GUID. Thread-Index: AQHXwA0v5wVgZqUzIkqO3VN7LPGWZavQmpJQ Date: Wed, 13 Oct 2021 08:37:52 +0000 Message-ID: References: <20211013082747.1249-1-thiyagux.kesavan.balakrishnan@intel.com> In-Reply-To: <20211013082747.1249-1-thiyagux.kesavan.balakrishnan@intel.com> Accept-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: 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: 0bd5302f-37e0-4934-bf80-08d98e24bef7 x-ms-traffictypediagnostic: BN6PR11MB3873: x-ms-exchange-transport-forked: True x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:7219; x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: 27wnGnOBeUpQb8h9zsylTY5leiGLDaBzlmjdOdGzFwdMVCYlEKzrI8rf6B2bf2WPnT/UuA5NENjRpcCueNG/mpOuoP+94qu9bzuSr8FW8DXaWnIh/s7toQya6M2Q/s3CpWxh0fVNu+xkh39usLPYXFN8vOzavcBFmrpMoY4otDP9MjpOOiB7I+XCQP1i3EV7dbGGHFo+1zSbtIbfQSNSVA/ybz/3FKE43yFaywn/FP7PzQb50gOZhDtKsIHOMvLQf373QstM7CswcMnoCPjOej6BOq/gVazBHJbbIvTOj206a+rd5xBZRttQofCIPnwrHhL0YPeFKqL1tvDQersuZXqVKOygYe42BmQXbWQUyOokEISAcT24OVpNW5znRiTRpLDJOm9B/nAiFAODFdj7Ghfg50cqgB5LlQnY2t+767itbA0vLDj4XnUP/2Vg9MC1j3pwtVvH+wsTh2dJdsKw8Q0kHPJ24KN1GU3EWwoEZbIJUAaB5O0S3VfXFV+KWOKGkrUz8JeadovKdQePFpV+RHs6+/GQu8OB4J7w21yV9D/WTiKiTKrz+GJNz7OQetHVC9PsRs5fRS33mEIkQi41yzApqmknwGmB47QoKVfgvNgrvkiVS+IAm9JHaEgKJHpyusa/CdMYcPV0xt64S9EjzVf9cLCeDNnmaBgi1LiBgKvfyL3bYn1j665GVbYBKX1Ue5mWo9TYDICv1hrUGi23pg== x-forefront-antispam-report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:BN0PR11MB5696.namprd11.prod.outlook.com;PTR:;CAT:NONE;SFS:(4636009)(366004)(316002)(38100700002)(122000001)(53546011)(55016002)(26005)(54906003)(110136005)(9686003)(7696005)(71200400001)(186003)(82960400001)(52536014)(64756008)(6506007)(76116006)(66946007)(83380400001)(4326008)(8936002)(33656002)(66556008)(66476007)(5660300002)(86362001)(8676002)(2906002)(66446008)(107886003)(508600001)(30864003)(38070700005)(19627235002);DIR:OUT;SFP:1102; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?5bBURwC4ZigxL5EfiSXvamtU/Mt7gTLhcDGwg5gy08vitjrHk/otnwvhPNpL?= =?us-ascii?Q?br+WRHXZ5NIGR5CKxdKipHj3dRMSfFJC/l3RL0ccSvuv3/hrSdCjTjkXeAsz?= =?us-ascii?Q?zEJ9Nucq6SDRugOaeBTFKHEdUXT678kpKyhUYghSurW4xw+uBh9soXAIsLHu?= =?us-ascii?Q?6W7BU9ybc2rUo+3Lw1blqKSEYGn93wHkxadwVJmIpa9oVl/BD/ZWgLWJFF8p?= =?us-ascii?Q?LaV8nL8guffG3dke6yGb5SC+5LesC3FcG9qcKqHmHUJqQUk7skU2G2yF02Rt?= =?us-ascii?Q?pokJM3cYwoMGl3vfrAIcqUEKHKm7u08Ao6/iXaZFdQ9sq3yyJTQ1MAe9ofZz?= =?us-ascii?Q?Msh3zOWA9AVUepxqI0Kp9XUwkYbc+eqLUg8RVPSZPADrl8kiYGWyb/g+SQmq?= =?us-ascii?Q?fzGwJ23BiFQlkYUOHFLOVO+hB1yicquPIHsTeO4A6IoIMc/KjduEiwMMns/t?= =?us-ascii?Q?G/b+M9NkZMNi/i7vS105XBI8yeoG7AGZc1nqWL9SRt02ZTnYsL9AdAqvH42S?= =?us-ascii?Q?/sHVIQVGiqwqR+fqNYmusNhx66UJBgQ1RKwI7ZIyWLyCEldAx2FPq1qPmUTf?= =?us-ascii?Q?8EvoMSDeUCQznEODNw0GGsRXBaHBihmGPaf5Hp6wU8zzk+XD5N6W/iW+bZNf?= =?us-ascii?Q?fhQvhmclBfV3QI/l1W7gH2Sv3A0x5NNV5RMiieQ/nEWMt9LnpGJ9NGPMXhpg?= =?us-ascii?Q?UAAHTRWzZDRBFCBMIx5hyu0zVH11bh/UMfCe1g8dUfnbINSuc7DbGUDGsdB0?= =?us-ascii?Q?xwVC9S0cff/Wi94xZUnDRKYwwGVd4ZvSrcJzaFzjJbGDZjzV8ut+gwdsDxOS?= =?us-ascii?Q?veuatgcYC03Vt5IP4NJnkC2z9TUmHpx9e36eCE/sH7ARSASjzwmBkKVjPqmL?= =?us-ascii?Q?NgDD92muvFDkWC9V9Oa1WbdBZKGCEE4g+wc2+sUXso7vpgSeBa6pC2rZ0BK6?= =?us-ascii?Q?rxsl8Jhx1UiSbOCd9zznRsdUuIHErG3XQ6tTJOMO10Xg4t05CQFwn7EQU9BR?= =?us-ascii?Q?2HciyTR50aahDKbwo2Mac3gasFan+MF6V2/9SoJ0vojxl5WZgoNSabdZEA6b?= =?us-ascii?Q?36L+XUuBMsjcAQB5ec3OEBWKOP37v4exrGC7f2KOPos9bzE7oje80n2SZAzf?= =?us-ascii?Q?VC4oICYINKStN1NrnX/rb0ACHNUp/4bHUbPmrSFbZy9cQJ1cBk2uJNX9mUz0?= =?us-ascii?Q?CKkZhnrL5P+JbC+WxQnGRCG7TY26WGUet62XF1FkJspN6aGQ6ip5v0bN6l2c?= =?us-ascii?Q?QoPs1HkKB9sEyb8MbHH8caCKEouoe3GUBgzvkAcgloyPFenWBI5mDn9dYQLt?= =?us-ascii?Q?xsCP/qIBSVQyM2kHY0xseV0R?= MIME-Version: 1.0 X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: BN0PR11MB5696.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 0bd5302f-37e0-4934-bf80-08d98e24bef7 X-MS-Exchange-CrossTenant-originalarrivaltime: 13 Oct 2021 08:37:52.1628 (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: FbY2ZNTJiPRSlVUYGgUZyKzSzeDVvJKrkXdvv2u1pMUewp0MNvX79ACFCxa9Qf09lucO7GmDNsDUV9Iba+5d0w== X-MS-Exchange-Transport-CrossTenantHeadersStamped: BN6PR11MB3873 Return-Path: ray.ni@intel.com X-OriginatorOrg: intel.com Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable I noticed a difference between V2 and V3: V2: - AcpiBoardInfo =3D BuildHobFromAcpi (SysTableInfo.AcpiTableBase); + AcpiBoardInfo =3D BuildHobFromAcpi (AcpiTableHob->Rsdp.AcpiTableBase); V3: - AcpiBoardInfo =3D BuildHobFromAcpi (SysTableInfo.AcpiTableBase); + AcpiBoardInfo =3D BuildHobFromAcpi (AcpiTableHob->Rsdp); The diff is good to me. Reviewed-by: Ray Ni -----Original Message----- From: Kesavan Balakrishnan, ThiyaguX =20 Sent: Wednesday, October 13, 2021 4:28 PM To: devel@edk2.groups.io Cc: Kesavan Balakrishnan, ThiyaguX ; Ma, Maurice ; Dong, Guo ; Ni, = Ray ; You, Benjamin ; Liu, Zhigua= ng Subject: [PATCH v3] UefiPayloadPkg: Remove SystemTableInfo GUID. SystemTableInfo GUID is not a Spec defined GUID. But the latest SBL uses SystemTableInfo to get ACPI and SMBIOS table inform= ation. So moving the SystemTableInfo GUID implementation to SblParseLib. 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.inf | 1 - UefiPayloadPkg/Include/Library/BlParseLib.h | 24 +++++++++-- .../Library/CbParseLib/CbParseLib.c | 40 ++++++++++++++----- .../Library/SblParseLib/SblParseLib.c | 38 +++++++++++++++--- .../UefiPayloadEntry/UefiPayloadEntry.c | 28 +++++-------- .../UefiPayloadEntry/UefiPayloadEntry.h | 1 - .../UniversalPayloadEntry.inf | 1 - 7 files changed, 94 insertions(+), 39 deletions(-) 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/Library/BlParseLib.h b/UefiPayloadPkg/I= nclude/Library/BlParseLib.h index 1244190d4e..89e728164d 100644 --- a/UefiPayloadPkg/Include/Library/BlParseLib.h +++ b/UefiPayloadPkg/Include/Library/BlParseLib.h @@ -12,6 +12,8 @@ #include #include #include +#include #include=20 + =20 #ifndef __BOOTLOADER_PARSE_LIB__ #define __BOOTLOADER_PARSE_LIB__ @@ -55,9 +57,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 +67,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 4f90687e40..db22fdd926 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 7214fd87d2..0f83771e6e 100644 --- a/UefiPayloadPkg/Library/SblParseLib/SblParseLib.c +++ b/UefiPayloadPkg/Library/SblParseLib/SblParseLib.c @@ -110,9 +110,9 @@ 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. @@ -120,8 +120,8 @@ ParseMemoryInfo ( **/ RETURN_STATUS EFIAPI -ParseSystemTable ( - OUT SYSTEM_TABLE_INFO *SystemTableInfo +ParseSmbiosTable ( + OUT UNIVERSAL_PAYLOAD_SMBIOS_TABLE *SmbiosTable ) { SYSTEM_TABLE_INFO *TableInfo; @@ -132,12 +132,40 @@ ParseSystemTable ( return RETURN_NOT_FOUND; } =20 - CopyMem (SystemTableInfo, TableInfo, sizeof (SYSTEM_TABLE_INFO)); + SmbiosTable->SmBiosEntryPoint =3D TableInfo->SmbiosTableBase; =20 return RETURN_SUCCESS; } =20 =20 +/** + Acquire ACPI table from slim 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 + ) +{ + SYSTEM_TABLE_INFO *TableInfo; + + TableInfo =3D (SYSTEM_TABLE_INFO *)GetGuidHobDataFromSbl=20 + (&gUefiSystemTableInfoGuid); if (TableInfo =3D=3D NULL) { + ASSERT (FALSE); + return RETURN_NOT_FOUND; + } + + AcpiTableHob->Rsdp =3D TableInfo->AcpiTableBase; + + return RETURN_SUCCESS; +} + /** Find the serial port information =20 diff --git a/UefiPayloadPkg/UefiPayloadEntry/UefiPayloadEntry.c b/UefiPaylo= adPkg/UefiPayloadEntry/UefiPayloadEntry.c index f2ac3d2c69..cbd8bcc580 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; @@ -274,18 +272,6 @@ 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 // @@ -293,8 +279,11 @@ BuildHobFromBl ( 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")); + Status =3D ParseSmbiosTable(SmBiosTableHob); if (!EFI_ERROR (Status))=20 + { + DEBUG ((DEBUG_INFO, "Detected Smbios Table at 0x%lx\n",=20 + SmBiosTableHob->SmBiosEntryPoint)); + } =20 // // Creat ACPI table Hob @@ -303,13 +292,16 @@ BuildHobFromBl ( 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")); + DEBUG ((DEBUG_INFO, "Create ACPI table gUniversalPayloadAcpiTableGuid=20 + guid hob\n")); Status =3D ParseAcpiTableInfo(AcpiTableHob); if=20 + (!EFI_ERROR (Status)) { + DEBUG ((DEBUG_INFO, "Detected ACPI Table at 0x%lx\n",=20 + AcpiTableHob->Rsdp)); } =20 // // 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 de51c2fba9..bc1ae10dcc 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/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