From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mga04.intel.com (mga04.intel.com [192.55.52.120]) by mx.groups.io with SMTP id smtpd.web09.2157.1634251479321325001 for ; Thu, 14 Oct 2021 15:44:39 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@intel.onmicrosoft.com header.s=selector2-intel-onmicrosoft-com header.b=AlqixBNw; spf=pass (domain: intel.com, ip: 192.55.52.120, mailfrom: guo.dong@intel.com) X-IronPort-AV: E=McAfee;i="6200,9189,10137"; a="226576557" X-IronPort-AV: E=Sophos;i="5.85,374,1624345200"; d="scan'208";a="226576557" Received: from orsmga007.jf.intel.com ([10.7.209.58]) by fmsmga104.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 14 Oct 2021 15:44:38 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.85,374,1624345200"; d="scan'208";a="481460954" Received: from fmsmsx601.amr.corp.intel.com ([10.18.126.81]) by orsmga007.jf.intel.com with ESMTP; 14 Oct 2021 15:44:37 -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; Thu, 14 Oct 2021 15:44:37 -0700 Received: from fmsmsx602.amr.corp.intel.com (10.18.126.82) 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; Thu, 14 Oct 2021 15:44:36 -0700 Received: from FMSEDG603.ED.cps.intel.com (10.1.192.133) by fmsmsx602.amr.corp.intel.com (10.18.126.82) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2242.12 via Frontend Transport; Thu, 14 Oct 2021 15:44:36 -0700 Received: from NAM04-BN8-obe.outbound.protection.outlook.com (104.47.74.46) by edgegateway.intel.com (192.55.55.68) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2242.12; Thu, 14 Oct 2021 15:44:36 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=QtScNmwL+c1cSP6QkX/4sdfTQxZj0HMXQ3tgKIxxAgAo6sUQe0I/9XAGiOyDE56U5FTARpJGxxbPJ0rqaJjyxiBaqkP5dMwewj0tyz5x+TY+Hag0GyGkiDwRa5lbigENdjkgLKy0s33Gc7xL9ay0U3SomhzuGlrGmq4LWRc9W9kzsRcsl6Pljhej5wWqL0l8RqT1NSeoZp8MJLCr+wpNryVI1fJOXPvV9gUW9vgM5TJQ3Z1WN1VPMjmWSZdrB6ACEgkXGu/XDj1kxt02rR+zXdHjxWrlTUPfU4b7Yy6T7jKsZ6WNXin7Ecq5wJBElO8jq4L5+FecSPSY3LOsuLKEzQ== 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=G16r+6iay2Ts9ffsWLW2yxblgrGao7ME1q63D5hbbd4=; b=ahamKqmLXfjP4JwIoZmtRbqFHMRXag9/JKM3N6OetM4Ol8RhiUlUAHv8RiiNG1KfdArMfVRmn3TueQsze2i0EQfmhPeoPOczg5Iy+IkYupMEZxzBNqZLiJFecYpzADnyu2LdUDzjbRCyBvqb5W5/MeVeFk4b1mNHGZmVVMsQyQuyUPLq2lRRTN5IoHDFsSpt9ldA9QQIxQQheHcZm+pekFLKGitNL+n7FaZ2NJm4BA9O2POd+IWuGMgbzCwgxdmzPdhJKXMJGU4oT79SEpkhCHrY+KWq7V/d4tIcYrjNjuecaxHPhggEjun8hYaE32pqiNXoCAhnrMWtmY+SRNOLrQ== 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=G16r+6iay2Ts9ffsWLW2yxblgrGao7ME1q63D5hbbd4=; b=AlqixBNwuAdGRKU2K9sLLk2bchFGnTwDL5yOpPeW5M07m/pWXQsF4xb1bRZvoVuP+P2h+b5yciAXJqcJr9XdCxVSLa1hNkXym0fMzj88kpjAP1Px97l546LiflNBZHsY4LORxZQ6Ki30IbrQJ0IVq5vDWhozXA0O+dxIGOset9E= Received: from BYAPR11MB3622.namprd11.prod.outlook.com (2603:10b6:a03:fe::30) by BY5PR11MB4274.namprd11.prod.outlook.com (2603:10b6:a03:1c1::23) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4587.25; Thu, 14 Oct 2021 22:44:34 +0000 Received: from BYAPR11MB3622.namprd11.prod.outlook.com ([fe80::2d5b:5697:1501:fcda]) by BYAPR11MB3622.namprd11.prod.outlook.com ([fe80::2d5b:5697:1501:fcda%5]) with mapi id 15.20.4587.026; Thu, 14 Oct 2021 22:44:34 +0000 From: "Guo Dong" To: "Kesavan Balakrishnan, ThiyaguX" , "devel@edk2.groups.io" CC: "Ma, Maurice" , "Ni, Ray" , "You, Benjamin" , "Liu, Zhiguang" Subject: Re: [PATCH v3] UefiPayloadPkg: Remove SystemTableInfo GUID. Thread-Topic: [PATCH v3] UefiPayloadPkg: Remove SystemTableInfo GUID. Thread-Index: AQHXwA0vQB+YK/+WOkq37ig0nfA6iqvTFozQ Date: Thu, 14 Oct 2021 22:44:34 +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: 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: 9d9c4a67-b67a-49eb-c5ae-08d98f643203 x-ms-traffictypediagnostic: BY5PR11MB4274: x-ms-exchange-transport-forked: True x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:6430; x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: gQt1e+7RoNIz4sqh8qLF6mE753M9Xpb9KU4AXHQ5Ix78Rd/vTAQH/0zWrgOQu+A4eAY72a+RGuRm0uEyxt7zFDQZTvfORo/4Vxzin0y6IFXl3tRktd0b+BvebS082zPsqZnp+z3Y5ACJ5gYQ0t2L+142oDnuhXw/NOcvi0DNeIQvSJ3Ra3IYioadYrchvgtQ+oUMKlMX/6BtCtmQDzf96DXoAwMQ+gXlCSps2TVfPCxmQsWHBLCdMXiK+EzByecXEyS4u3okmb4XylZRThZ9jHSAG9bnOiQ5NbkO+I2wyfBYC7ecnVODVmou7lAicJPFhUymZh4nnq79aVxMTxxQ1c8IdxP4redeH7Ex4d3oTj+Xop9NQla6LMXRLf6wfkfuV15XDQZxbAnXGSlJ846sOPAGH/VYK/gIhjbhwHT7XH4My59HqqzBYXCV7q4jKxwmB35PL5rzAPRMUoEWHs5qaKuTC1YOkABVGjMOojid5yfa01uo3X5vpL9UgA2ixjzSRkuyl4GE4xvA18+SZYAN2HuGx/Tj5QFKirs6jOzKZftgy2WrXcia/WvzKet//HWQ9ZCUiJnab/x2GCMByNGJCMTkMXgHpPZ/1XkA4nQF7PAXegAP59qgMvHYSja5d79vVpgyUC1SJ1D1S6cNuHjY/wJ/1Ueww1YCW86uRc/xPxvFr7iGFlvhwRBGTuZjyWCFGZZqjeuQogCVh3ZGwHPjyQ== 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)(30864003)(52536014)(8936002)(83380400001)(122000001)(8676002)(82960400001)(38070700005)(19627235002)(66446008)(2906002)(5660300002)(66556008)(38100700002)(55016002)(64756008)(53546011)(76116006)(107886003)(110136005)(186003)(33656002)(54906003)(4326008)(6506007)(66946007)(9686003)(71200400001)(508600001)(86362001)(316002)(7696005)(66476007);DIR:OUT;SFP:1102; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?WH7MSNtzB42cREabKeHZVSzEPGEQvK3F5AAYc97TO5z3AFadW+yfuGeXybpK?= =?us-ascii?Q?fEMgXHCc7BQffnTt1kEwSmUByKkSWpbPN7z4P+LEahYja7E5C1SdEUjyWEJm?= =?us-ascii?Q?VOnmnC068B9+V/UBPfrMOhLs7EWlf3e3KPhrFflsPazi03DKJ9+4ZzoHlRDL?= =?us-ascii?Q?9veIyQRYagkZ80luL/9cGdv56FQUDCAaGCIfu5gBmQLsLtld44BBzpGk7aun?= =?us-ascii?Q?Xij/d/UFLulg4lU/2XxV6UamNWaLvQM/YZv+Z7llXv5aqnt0evxOLItn0p8j?= =?us-ascii?Q?zdNzZiDgUlCcHMAZLteyhGPEMjCT1jLRhKG35h3O32pdsfRriAw/DNWlgc+h?= =?us-ascii?Q?+1x6Za0lfOZfS89aDEicbajCyFKfFZhtgASW80bK0+YsTYF+I/3hGiDpUat5?= =?us-ascii?Q?qfEwHBLBJKZUq4aEcWv0AVrxQ2oQd+IZeJmhQpn5zu9G9DNYNUprHxP9DSCy?= =?us-ascii?Q?WuN9Na0bPIcP5XBslL6z/Z2H1FKZpF6Vbw4+hF55VnJYJcj2GTxt+7kjunZR?= =?us-ascii?Q?b/M5Nx1/xg/XBSf9Jt0JNCWtBbJ3zZzqElicabJj3XwFVe3b3jgQeWUQY+r2?= =?us-ascii?Q?HLHjYMCSmMIbbS2GUR+bMQ+cfItCgfYCUPGnro0vZe61sRcFfHZ59+g66c8y?= =?us-ascii?Q?ipdMzpQxVeMmxxBgNyWeNzK01b5FljCQBu1t4nokj40m2OGjZBMSpTtrx+Ug?= =?us-ascii?Q?UADZ2uN9oJwFs1cHkLCPvhOim0FQuP+Bgf0Ay/GoyvSzm0knsVJlUXtk5kky?= =?us-ascii?Q?Qfwjym2hs4xETkospt24teJczLD4GIn/HLWWd7wkZq6Qjxbdtl3fctPu9kVe?= =?us-ascii?Q?tbjAQ0Ptj2TVZt55kjFhSmf90blSwyt8ZgGQD3sQUvkn3STd+jtwurwK5z+F?= =?us-ascii?Q?J9xDtZMkV4CNAHJJeRnBlb+tMHqJm6mqxlK3056oXFnLW3Hg6hRucqlkz2Dy?= =?us-ascii?Q?rerQNGDVTNx1Sav9ckpnQ6XxIff2v0+C0m3cx43IBVYFBayLUDTasOmVDoYB?= =?us-ascii?Q?aZnO9Uo53lYI4EmD3Z67Mnwm1O2iuVg4KHWFIhNaBZZ5iU1zZqO/Q6veoXa+?= =?us-ascii?Q?hCpox4/P+STEua7H3u8h4KGSMnE8mlFbnLIQAZcFg6oeAIhmNMxXujQQM5bV?= =?us-ascii?Q?sftfGuEpsNXn4IB+xn2rrmHjK5gw9y+W8JjrlDRvjbuiudWEwnKc4qreiNyI?= =?us-ascii?Q?315xZnvll9iMlIg1bQHZgEsvzA28AEXrLZlsnRYd7BktVk2XVEbCo5Gz5JMI?= =?us-ascii?Q?YUu96JF9OcKMPIYzp8aJzTCdY3e30e0D29OXY89CL2913g8KNy0a8GI4iZWq?= =?us-ascii?Q?nZbFZmxqS8rZarBmlEX0H+s7H3NEVE5/Cgkks2FIf412KnsOegAtjMNVpOsd?= =?us-ascii?Q?1lYCf/WinovbXJIYKC226e6n3vD4?= 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: 9d9c4a67-b67a-49eb-c5ae-08d98f643203 X-MS-Exchange-CrossTenant-originalarrivaltime: 14 Oct 2021 22:44:34.6256 (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: QIMdtQjkl8zNT3QlCxf6dv646IJ/Z8EleI1FcQnXZsKOp94a6vASkK0BbhV7V94CLgYZOpQlaJ2e3KBXDwcdDw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: BY5PR11MB4274 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 gUefiSystemTableInfoGuid is an internal implementation used between payload= entry module and EDKII modules.=20 It is fine to remove it to avoid confusion that someone might think it is t= he interface between bootloader and payload. Since open sourced SBL already produce the HOBs gUniversalPayloadAcpiTableG= uid and gUniversalPayloadSmbiosTableGuid aligned with universal payload spe= c, How about totally remove gUefiSystemTableInfoGuid from dec file and SblPars= eLib? Thanks, Guo -----Original Message----- From: Kesavan Balakrishnan, ThiyaguX =20 Sent: Wednesday, October 13, 2021 1:28 AM 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