From nobody Mon Feb 9 09:02:22 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) client-ip=66.175.222.108; envelope-from=bounce+27952+76505+1787277+3901457@groups.io; helo=mail02.groups.io; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce+27952+76505+1787277+3901457@groups.io; dmarc=fail(p=none dis=none) header.from=intel.com ARC-Seal: i=1; a=rsa-sha256; t=1623748345; cv=none; d=zohomail.com; s=zohoarc; b=BtSei/2UrtU0k9J6AgGaEetQXtPwkJw2oUL4AnTbGZLkdLPpKwRiPO5arqSycHlNx7WdJUqkJaj6wpNFdapd+zWIXmowGZeMeid/h+AWejJbGAkKeSb7VTaPsZYFEanJZd0+V6DaafMpB3+NXSjYT29vJpecOLMukQjBCW0hzyA= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1623748345; h=Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Reply-To:References:Sender:Subject:To; bh=ugsJ5i6szkXZRPy5zwkvBFpmz9c2uBFu7vyedvxUJAA=; b=bu5YD3li1hyYwP8QwOrEwui316+XUR7YtuHfy51PYmNTmUfJ6F+2Ku9ZtM/GSNsloc4vyhfTaLcmiq8Nb9kbGcY2+PEfh5/X0AZjRtfkAX75jmco1ZbzuOrOVnOmueQ7mxb++dszQQKF7NuXOwYisZI4EAYlVXusssMeWKWufaI= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce+27952+76505+1787277+3901457@groups.io; dmarc=fail header.from= (p=none dis=none) Received: from mail02.groups.io (mail02.groups.io [66.175.222.108]) by mx.zohomail.com with SMTPS id 1623748345854880.3413563837223; Tue, 15 Jun 2021 02:12:25 -0700 (PDT) Return-Path: X-Received: by 127.0.0.2 with SMTP id jDX4YY1788612xs0RYd4ygJH; Tue, 15 Jun 2021 02:12:25 -0700 X-Received: from mga12.intel.com (mga12.intel.com [192.55.52.136]) by mx.groups.io with SMTP id smtpd.web12.6815.1623748344349621736 for ; Tue, 15 Jun 2021 02:12:24 -0700 IronPort-SDR: 3me/4r4zDIj6St8Rh5R5p9NFzTkAvWclJxQJ24ij0gpE/T83Sn9gGgwRFfwSQFqIU1wuMqqP9b G/SthL0/7DOg== X-IronPort-AV: E=McAfee;i="6200,9189,10015"; a="185647602" X-IronPort-AV: E=Sophos;i="5.83,275,1616482800"; d="scan'208";a="185647602" X-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:24 -0700 IronPort-SDR: acGaJ+hOKZy+lQFiknRl4mL8K4yeqc7b2jE6osxxxiqkymNkP6+ccJKY4VzU8kFu9mTtRY4S+S Sj+VznM0sZWw== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.83,275,1616482800"; d="scan'208";a="487713146" X-Received: from fieedk002.ccr.corp.intel.com ([10.239.158.144]) by fmsmga002.fm.intel.com with ESMTP; 15 Jun 2021 02:12:22 -0700 From: "Zhiguang Liu" To: devel@edk2.groups.io Cc: Michael D Kinney , Liming Gao , Jian J Wang , Hao A Wu Subject: [edk2-devel] [Patch V5 1/9] MdeModulePkg: Add Universal Payload general definition header file Date: Tue, 15 Jun 2021 17:12:03 +0800 Message-Id: <20210615091211.801-2-zhiguang.liu@intel.com> In-Reply-To: <20210615091211.801-1-zhiguang.liu@intel.com> References: <20210615091211.801-1-zhiguang.liu@intel.com> MIME-Version: 1.0 Precedence: Bulk List-Unsubscribe: List-Subscribe: List-Help: Sender: devel@edk2.groups.io List-Id: Mailing-List: list devel@edk2.groups.io; contact devel+owner@edk2.groups.io Reply-To: devel@edk2.groups.io,zhiguang.liu@intel.com X-Gm-Message-State: cQ0bN33pi4xW0Jv3sMkZbw86x1787277AA= Content-Transfer-Encoding: quoted-printable DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=groups.io; q=dns/txt; s=20140610; t=1623748345; bh=kSlyVwRAB6UWBOSQlI5e3hp8wPqo9Js2m234OqdTYc8=; h=Cc:Date:From:Reply-To:Subject:To; b=MqfLp76lH/Nv481kEf8730SLXs0TRlw1drcemAN8SJVPnu6qyzhWKn6EfPEa6kpBRpg W7TY6EJ1xyVcGxn3RUBuZujnB/moST7fJdiPLKFB3BDINt2bxDxFFdbuOlhc1kPite8Q8 wy4jHqlFtEj+pl6FP/KhaSIN9mSp9bqwCOM= X-ZohoMail-DKIM: pass (identity @groups.io) Content-Type: text/plain; charset="utf-8" Add Universal Payload general definition header file according to Universal Payload's documentation as below: https://universalpayload.github.io/documentation/ Cc: Michael D Kinney Cc: Liming Gao Cc: Jian J Wang Cc: Hao A Wu Reviewed-by: Hao A Wu Signed-off-by: Zhiguang Liu --- MdeModulePkg/Include/UniversalPayload/UniversalPayload.h | 35 ++++++++++++= +++++++++++++++++++++++ 1 file changed, 35 insertions(+) diff --git a/MdeModulePkg/Include/UniversalPayload/UniversalPayload.h b/Mde= ModulePkg/Include/UniversalPayload/UniversalPayload.h new file mode 100644 index 0000000000..e661306a9b --- /dev/null +++ b/MdeModulePkg/Include/UniversalPayload/UniversalPayload.h @@ -0,0 +1,35 @@ +/** @file + Universal Payload general definitions. + +Copyright (c) 2021, Intel Corporation. All rights reserved.
+SPDX-License-Identifier: BSD-2-Clause-Patent + + @par Revision Reference: + - Universal Payload Specification 0.75 (https://universalpayload.githu= b.io/documentation/) +**/ + +#ifndef UNIVERSAL_PAYLOAD_H_ +#define UNIVERSAL_PAYLOAD_H_ + +#pragma pack(1) + +typedef struct { + UINT8 Revision; + UINT8 Reserved; + UINT16 Length; +} UNIVERSAL_PAYLOAD_GENERIC_HEADER; + +#pragma pack() + +/** + Returns the size of a structure of known type, up through and including = a specified field. + + @param TYPE The name of the data structure that contains the field= specified by Field. + @param Field The name of the field in the data structure. + + @return size, in bytes. + +**/ +#define UNIVERSAL_PAYLOAD_SIZEOF_THROUGH_FIELD(TYPE, Field) (OFFSET_OF(TYP= E, Field) + sizeof (((TYPE *) 0)->Field)) + +#endif // UNIVERSAL_PAYLOAD_H_ --=20 2.30.0.windows.2 -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#76505): https://edk2.groups.io/g/devel/message/76505 Mute This Topic: https://groups.io/mt/83551776/1787277 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org] -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- From nobody Mon Feb 9 09:02:22 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) client-ip=66.175.222.108; envelope-from=bounce+27952+76506+1787277+3901457@groups.io; helo=mail02.groups.io; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce+27952+76506+1787277+3901457@groups.io; dmarc=fail(p=none dis=none) header.from=intel.com ARC-Seal: i=1; a=rsa-sha256; t=1623748352; cv=none; d=zohomail.com; s=zohoarc; b=JwXEMdYroNka1HYHe7EvqkV9Amdpt6OgVrCnxhvxVsJO7Vo1ctmW0AjefdWtjP/8DNVDTu5vPHtiyUCV3ukkl+o1ehS2CLpQHIa1C9f9TlT75iDUG/VKltagOyUqvt+swVhq16gD6ZjmCB70dr8PkR96R6AbIxWmg7oXkQ6ybB8= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1623748352; h=Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Reply-To:References:Sender:Subject:To; bh=AAesOcf80+Osdg3wwuntO1ci/UETBz/1shVsWKGYj7I=; b=EbKsxpB2mptFJUJkMr9AKFTIfoMw89nq7YcJn7nzNO3Rh6/lfIwa4YTSzm6RcexY5n7feQF/XtHeTL4C2YObstCZYRlEKCGomN+j/T7+ZUlR0A5CHn5bdnR/X61U0Y81vj2R3uQFSE27NwlWkmKxO7V1gMQNKNPg1CFQVc8ONd0= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce+27952+76506+1787277+3901457@groups.io; dmarc=fail header.from= (p=none dis=none) Received: from mail02.groups.io (mail02.groups.io [66.175.222.108]) by mx.zohomail.com with SMTPS id 1623748352241477.5831135486478; Tue, 15 Jun 2021 02:12:32 -0700 (PDT) Return-Path: X-Received: by 127.0.0.2 with SMTP id QBb2YY1788612xdDLmjeTrvH; Tue, 15 Jun 2021 02:12:31 -0700 X-Received: from mga12.intel.com (mga12.intel.com [192.55.52.136]) by mx.groups.io with SMTP id smtpd.web11.6828.1623748346075457462 for ; Tue, 15 Jun 2021 02:12:26 -0700 IronPort-SDR: 3mnoXfkF9rEGFfwt/6iKGDSf/qtdjkvEURWKmz+kv3q1nIRUOid/e0gMfrcdYQw2YmJuSButg5 XbrX7hzGIOSA== X-IronPort-AV: E=McAfee;i="6200,9189,10015"; a="185647612" X-IronPort-AV: E=Sophos;i="5.83,275,1616482800"; d="scan'208";a="185647612" X-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:25 -0700 IronPort-SDR: WT/1LgioYNXlQqKqCWOw55P69loQk4EFCco3zIK5m9LhE8H4TVs2PT+sule6k6B+sEji0Rwzgp uOC0ILSwLiQg== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.83,275,1616482800"; d="scan'208";a="487713154" X-Received: from fieedk002.ccr.corp.intel.com ([10.239.158.144]) by fmsmga002.fm.intel.com with ESMTP; 15 Jun 2021 02:12:24 -0700 From: "Zhiguang Liu" To: devel@edk2.groups.io Cc: Michael D Kinney , Liming Gao , Jian J Wang , Hao A Wu Subject: [edk2-devel] [Patch V5 2/9] MdeModulePkg: Add new structure for the PCI Root Bridge Info Hob Date: Tue, 15 Jun 2021 17:12:04 +0800 Message-Id: <20210615091211.801-3-zhiguang.liu@intel.com> In-Reply-To: <20210615091211.801-1-zhiguang.liu@intel.com> References: <20210615091211.801-1-zhiguang.liu@intel.com> MIME-Version: 1.0 Precedence: Bulk List-Unsubscribe: List-Subscribe: List-Help: Sender: devel@edk2.groups.io List-Id: Mailing-List: list devel@edk2.groups.io; contact devel+owner@edk2.groups.io Reply-To: devel@edk2.groups.io,zhiguang.liu@intel.com X-Gm-Message-State: UGPongJPE4l8w0Kzl2pcvuOVx1787277AA= Content-Transfer-Encoding: quoted-printable DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=groups.io; q=dns/txt; s=20140610; t=1623748351; bh=JCq6420Ys+nNDfGMCMrlmq2E2RSTWOabD6kP/yW1y44=; h=Cc:Date:From:Reply-To:Subject:To; b=iRCHfGDivOxdxmQB+4vdP1A+zc3uyW8WX8OOtHBSOOYQjR7ETx0fVFzjcc2dqo31PSf bJZS4jTLTCGz5XytXph3UQKRfkp+kb9TDMWEolXpWQFMhoI69ihi7FDWrQamwOSXkQg/F Ov89bPuPwxhcXtlTyo2UNVwItIb3IPdjc1w= X-ZohoMail-DKIM: pass (identity @groups.io) Content-Type: text/plain; charset="utf-8" V5: Add ExceptionList in MdeModulePkg\MdeModulePkg.ci.yaml, to avoid open CI issue, because UID and HID are terms which are already used in current source code. Cc: Michael D Kinney Cc: Liming Gao Cc: Jian J Wang Cc: Hao A Wu Reviewed-by: Hao A Wu Signed-off-by: Zhiguang Liu --- MdeModulePkg/Include/UniversalPayload/PciRootBridges.h | 91 ++++++++++++++= +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++= ++ MdeModulePkg/MdeModulePkg.ci.yaml | 2 ++ MdeModulePkg/MdeModulePkg.dec | 6 ++++++ 3 files changed, 99 insertions(+) diff --git a/MdeModulePkg/Include/UniversalPayload/PciRootBridges.h b/MdeMo= dulePkg/Include/UniversalPayload/PciRootBridges.h new file mode 100644 index 0000000000..3a7aae82d4 --- /dev/null +++ b/MdeModulePkg/Include/UniversalPayload/PciRootBridges.h @@ -0,0 +1,91 @@ +/** @file + This file defines the structure for the PCI Root Bridges. + + Copyright (c) 2021, Intel Corporation. All rights reserved.
+ SPDX-License-Identifier: BSD-2-Clause-Patent + + @par Revision Reference: + - Universal Payload Specification 0.75 (https://universalpayload.githu= b.io/documentation/) +**/ + +#ifndef UNIVERSAL_PAYLOAD_PCI_ROOT_BRIDGES_H_ +#define UNIVERSAL_PAYLOAD_PCI_ROOT_BRIDGES_H_ + +#include + +#pragma pack(1) + +// +// (Base > Limit) indicates an aperture is not available. +// +typedef struct { + // + // Base and Limit are the device address instead of host address when + // Translation is not zero + // + UINT64 Base; + UINT64 Limit; + // + // According to UEFI 2.7, Device Address =3D Host Address + Translation, + // so Translation =3D Device Address - Host Address. + // On platforms where Translation is not zero, the subtraction is probab= ly to + // be performed with UINT64 wrap-around semantics, for we may translate = an + // above-4G host address into a below-4G device address for legacy PCIe = device + // compatibility. + // + // NOTE: The alignment of Translation is required to be larger than any = BAR + // alignment in the same root bridge, so that the same alignment can be + // applied to both device address and host address, which simplifies the + // situation and makes the current resource allocation code in generic P= CI + // host bridge driver still work. + // + UINT64 Translation; +} UNIVERSAL_PAYLOAD_PCI_ROOT_BRIDGE_APERTURE; + +/// +/// Payload PCI Root Bridge Information HOB +/// +typedef struct { + UINT32 Segment; ///< S= egment number. + UINT64 Supports; ///< S= upported attributes. + ///< R= efer to EFI_PCI_ATTRIBUTE_xxx used by GetAttributes() + ///< a= nd SetAttributes() in EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL. + UINT64 Attributes; ///< I= nitial attributes. + ///< R= efer to EFI_PCI_ATTRIBUTE_xxx used by GetAttributes() + ///< a= nd SetAttributes() in EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL. + BOOLEAN DmaAbove4G; ///< D= MA above 4GB memory. + ///< S= et to TRUE when root bridge supports DMA above 4GB memory. + BOOLEAN NoExtendedConfigSpace; ///< W= hen FALSE, the root bridge supports + ///< E= xtended (4096-byte) Configuration Space. + ///< W= hen TRUE, the root bridge supports + ///< 2= 56-byte Configuration Space only. + UINT64 AllocationAttributes; ///< A= llocation attributes. + ///< R= efer to EFI_PCI_HOST_BRIDGE_COMBINE_MEM_PMEM and + ///< E= FI_PCI_HOST_BRIDGE_MEM64_DECODE used by GetAllocAttributes() + ///< i= n EFI_PCI_HOST_BRIDGE_RESOURCE_ALLOCATION_PROTOCOL. + UNIVERSAL_PAYLOAD_PCI_ROOT_BRIDGE_APERTURE Bus; ///< B= us aperture which can be used by the root bridge. + UNIVERSAL_PAYLOAD_PCI_ROOT_BRIDGE_APERTURE Io; ///< I= O aperture which can be used by the root bridge. + UNIVERSAL_PAYLOAD_PCI_ROOT_BRIDGE_APERTURE Mem; ///< M= MIO aperture below 4GB which can be used by the root bridge. + UNIVERSAL_PAYLOAD_PCI_ROOT_BRIDGE_APERTURE MemAbove4G; ///< M= MIO aperture above 4GB which can be used by the root bridge. + UNIVERSAL_PAYLOAD_PCI_ROOT_BRIDGE_APERTURE PMem; ///< P= refetchable MMIO aperture below 4GB which can be used by the root bridge. + UNIVERSAL_PAYLOAD_PCI_ROOT_BRIDGE_APERTURE PMemAbove4G; ///< P= refetchable MMIO aperture above 4GB which can be used by the root bridge. + UINT32 HID; ///< P= nP hardware ID of the root bridge. This value must match the corresponding + ///< _= HID in the ACPI name space. + UINT32 UID; ///< U= nique ID that is required by ACPI if two devices have the same _HID. + ///< T= his value must also match the corresponding _UID/_HID pair in the ACPI name= space. +} UNIVERSAL_PAYLOAD_PCI_ROOT_BRIDGE; + +typedef struct { + UNIVERSAL_PAYLOAD_GENERIC_HEADER Header; + BOOLEAN ResourceAssigned; + UINT8 Count; + UNIVERSAL_PAYLOAD_PCI_ROOT_BRIDGE RootBridge[0]; +} UNIVERSAL_PAYLOAD_PCI_ROOT_BRIDGES; + +#pragma pack() + +#define UNIVERSAL_PAYLOAD_PCI_ROOT_BRIDGES_REVISION 1 + +extern GUID gUniversalPayloadPciRootBridgeInfoGuid; + +#endif // UNIVERSAL_PAYLOAD_PCI_ROOT_BRIDGES_H_ diff --git a/MdeModulePkg/MdeModulePkg.ci.yaml b/MdeModulePkg/MdeModulePkg.= ci.yaml index 45783f12c1..4c71468bd3 100644 --- a/MdeModulePkg/MdeModulePkg.ci.yaml +++ b/MdeModulePkg/MdeModulePkg.ci.yaml @@ -16,6 +16,8 @@ ## "", "" ## ] "ExceptionList": [ + "8005", "UNIVERSAL_PAYLOAD_PCI_ROOT_BRIDGE.UID", + "8005", "UNIVERSAL_PAYLOAD_PCI_ROOT_BRIDGE.HID", ], ## Both file path and directory path are accepted. "IgnoreFiles": [ diff --git a/MdeModulePkg/MdeModulePkg.dec b/MdeModulePkg/MdeModulePkg.dec index 8d38383915..5cee4e159a 100644 --- a/MdeModulePkg/MdeModulePkg.dec +++ b/MdeModulePkg/MdeModulePkg.dec @@ -404,6 +404,12 @@ ## Include/Guid/MigratedFvInfo.h gEdkiiMigratedFvInfoGuid =3D { 0xc1ab12f7, 0x74aa, 0x408d, { 0xa2, 0xf4,= 0xc6, 0xce, 0xfd, 0x17, 0x98, 0x71 } } =20 + # + # GUID defined in UniversalPayload + # + ## Include/UniversalPayload/PciRootBridges.h + gUniversalPayloadPciRootBridgeInfoGuid =3D { 0xec4ebacb, 0x2638, 0x416e,= { 0xbe, 0x80, 0xe5, 0xfa, 0x4b, 0x51, 0x19, 0x01 }} + [Ppis] ## Include/Ppi/AtaController.h gPeiAtaControllerPpiGuid =3D { 0xa45e60d1, 0xc719, 0x44aa, { 0xb0,= 0x7a, 0xaa, 0x77, 0x7f, 0x85, 0x90, 0x6d }} --=20 2.30.0.windows.2 -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#76506): https://edk2.groups.io/g/devel/message/76506 Mute This Topic: https://groups.io/mt/83551777/1787277 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org] -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- From nobody Mon Feb 9 09:02:22 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) client-ip=66.175.222.108; envelope-from=bounce+27952+76507+1787277+3901457@groups.io; helo=mail02.groups.io; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce+27952+76507+1787277+3901457@groups.io; dmarc=fail(p=none dis=none) header.from=intel.com ARC-Seal: i=1; a=rsa-sha256; t=1623748353; cv=none; d=zohomail.com; s=zohoarc; b=ZrQ86++TP2cBXQRFIjc2wgKr74y91g5jcCezhn7+zjQVkuRJpD9kKihkUTSlqL0VKIg5OrOL3FD47dIeA5KDxolbm563SLQ6Ty2sBesmD+3YBvgTFrvNIaVIK1TgR8RYwNPX2tCeB7MMVSIvxvTYQ++ralO/DSKMtiBG8K0s/cY= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1623748353; h=Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Reply-To:References:Sender:Subject:To; bh=0LeNThwzZ99Gw3Q6jMkfIHtm6aZT7OKLyo4We55GGUM=; b=Ti+pN+zPLqQ20d6AiZSyZIBASW4mbBIybsoLZ32VsYyoeg1/9r53QKU/NQm2bDSS4rJxGruJTx+o2nP5EZ9/trMk9gDnctEebZP1bMVSK1saabKqoGpBxITkL7jgpp0WefCBDkKot9WUHbvVp/yFy+ZoB2oPxL+XDzMoVn4fXmk= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce+27952+76507+1787277+3901457@groups.io; dmarc=fail header.from= (p=none dis=none) Received: from mail02.groups.io (mail02.groups.io [66.175.222.108]) by mx.zohomail.com with SMTPS id 1623748353350871.6706838877606; Tue, 15 Jun 2021 02:12:33 -0700 (PDT) Return-Path: X-Received: by 127.0.0.2 with SMTP id XivxYY1788612xHfO2aHtX6O; Tue, 15 Jun 2021 02:12:32 -0700 X-Received: from mga12.intel.com (mga12.intel.com []) by mx.groups.io with SMTP id smtpd.web11.6828.1623748346075457462 for ; Tue, 15 Jun 2021 02:12:27 -0700 IronPort-SDR: Poii05tApGEr4m/H7wWdGPsAe0b8ZzLYNJNWbkA4OqNl2Ylk4yK9shaCCA47Fct6l08UgRu5kx Sp8YD5iZdlcQ== X-IronPort-AV: E=McAfee;i="6200,9189,10015"; a="185647619" X-IronPort-AV: E=Sophos;i="5.83,275,1616482800"; d="scan'208";a="185647619" X-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:27 -0700 IronPort-SDR: /TYSUpmCBjwOKQbza6rvmdjkwVFl8m6Of7uNK3+BakoUqAvoD680rdWV0fCfCMX/pNuxu9l/BA dq+hH8FyjLFg== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.83,275,1616482800"; d="scan'208";a="487713163" X-Received: from fieedk002.ccr.corp.intel.com ([10.239.158.144]) by fmsmga002.fm.intel.com with ESMTP; 15 Jun 2021 02:12:25 -0700 From: "Zhiguang Liu" To: devel@edk2.groups.io Cc: Maurice Ma , Guo Dong , Benjamin You Subject: [edk2-devel] [Patch V5 3/9] UefiPayloadPkg: UefiPayload retrieve PCI root bridge from Guid Hob Date: Tue, 15 Jun 2021 17:12:05 +0800 Message-Id: <20210615091211.801-4-zhiguang.liu@intel.com> In-Reply-To: <20210615091211.801-1-zhiguang.liu@intel.com> References: <20210615091211.801-1-zhiguang.liu@intel.com> MIME-Version: 1.0 Precedence: Bulk List-Unsubscribe: List-Subscribe: List-Help: Sender: devel@edk2.groups.io List-Id: Mailing-List: list devel@edk2.groups.io; contact devel+owner@edk2.groups.io Reply-To: devel@edk2.groups.io,zhiguang.liu@intel.com X-Gm-Message-State: L0X43QZ9IxlkuvrasZWDwNoex1787277AA= Content-Transfer-Encoding: quoted-printable DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=groups.io; q=dns/txt; s=20140610; t=1623748352; bh=qHxUrijfoBsyRiGGFMLd3kcEQyaDIcbRaEAHx35CPCg=; h=Cc:Date:From:Reply-To:Subject:To; b=t/5g0ofLV1J/KI0CBDziAempmZxC9grVS/QcEOX2qAOQfp1uE3O5twLbfiu53xwcaX9 +Zl89rJ0toKoGPe8vc9/tt2ffLaeciaoDSrZhYe7h4S5AxqzCgOM6lvG91vXvEl0gVlpf pVU9EHP4mEz0d27Ci0p68HJbDnOJmpBnFG0= X-ZohoMail-DKIM: pass (identity @groups.io) Content-Type: text/plain; charset="utf-8" UefiPayload parse gUniversalPayloadPciRootBridgeInfoGuid Guid Hob to retrieve PCI root bridges information. gUniversalPayloadPciRootBridgeInfoGuid Guid Hob should be created by Bootloader. Cc: Maurice Ma Cc: Guo Dong Cc: Benjamin You Reviewed-by: Guo Dong Signed-off-by: Zhiguang Liu --- UefiPayloadPkg/Library/PciHostBridgeLib/PciHostBridge.h | 40 ++++++= ++++++++++++++++++++++++++++++++-- UefiPayloadPkg/Library/PciHostBridgeLib/PciHostBridgeLib.c | 47 ++++++= ++++++++++++++++++++++++++++++++++++++--- UefiPayloadPkg/Library/PciHostBridgeLib/PciHostBridgeLib.inf | 8 ++++++= +- UefiPayloadPkg/Library/PciHostBridgeLib/PciHostBridgeSupport.c | 73 ++++++= ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++- UefiPayloadPkg/UefiPayloadPkg.dsc | 2 +- 5 files changed, 162 insertions(+), 8 deletions(-) diff --git a/UefiPayloadPkg/Library/PciHostBridgeLib/PciHostBridge.h b/Uefi= PayloadPkg/Library/PciHostBridgeLib/PciHostBridge.h index c2961b3bee..3eee1fbeac 100644 --- a/UefiPayloadPkg/Library/PciHostBridgeLib/PciHostBridge.h +++ b/UefiPayloadPkg/Library/PciHostBridgeLib/PciHostBridge.h @@ -2,7 +2,7 @@ Header file of PciHostBridgeLib. =20 Copyright (C) 2016, Red Hat, Inc. - Copyright (c) 2016, Intel Corporation. All rights reserved.
+ Copyright (c) 2016 - 2021, Intel Corporation. All rights reserved.
=20 SPDX-License-Identifier: BSD-2-Clause-Patent =20 @@ -11,14 +11,38 @@ #ifndef _PCI_HOST_BRIDGE_H #define _PCI_HOST_BRIDGE_H =20 +#include + typedef struct { ACPI_HID_DEVICE_PATH AcpiDevicePath; EFI_DEVICE_PATH_PROTOCOL EndDevicePath; } CB_PCI_ROOT_BRIDGE_DEVICE_PATH; =20 +/** + Scan for all root bridges in platform. + + @param[out] NumberOfRootBridges Number of root bridges detected + + @retval Pointer to the allocated PCI_ROOT_BRIDGE structure array. +**/ PCI_ROOT_BRIDGE * ScanForRootBridges ( - UINTN *NumberOfRootBridges + OUT UINTN *NumberOfRootBridges +); + +/** + Scan for all root bridges from Universal Payload PciRootBridgeInfoHob + + @param[in] PciRootBridgeInfo Pointer of Universal Payload PCI Root B= ridge Info Hob + @param[out] NumberOfRootBridges Number of root bridges detected + + @retval Pointer to the allocated PCI_ROOT_BRIDGE structure array. + +**/ +PCI_ROOT_BRIDGE * +RetrieveRootBridgeInfoFromHob ( + IN UNIVERSAL_PAYLOAD_PCI_ROOT_BRIDGES *PciRootBridgeInfo, + OUT UINTN *NumberOfRootBridges ); =20 /** @@ -77,4 +101,16 @@ InitRootBridge ( OUT PCI_ROOT_BRIDGE *RootBus ); =20 +/** + Initialize DevicePath for a PCI_ROOT_BRIDGE. + @param[in] HID HID for device path + @param[in] UID UID for device path + + @retval A pointer to the new created device patch. +**/ +EFI_DEVICE_PATH_PROTOCOL * +CreateRootBridgeDevicePath ( + IN UINT32 HID, + IN UINT32 UID +); #endif diff --git a/UefiPayloadPkg/Library/PciHostBridgeLib/PciHostBridgeLib.c b/U= efiPayloadPkg/Library/PciHostBridgeLib/PciHostBridgeLib.c index 512c3127cc..a0d7cdc306 100644 --- a/UefiPayloadPkg/Library/PciHostBridgeLib/PciHostBridgeLib.c +++ b/UefiPayloadPkg/Library/PciHostBridgeLib/PciHostBridgeLib.c @@ -2,7 +2,7 @@ Library instance of PciHostBridgeLib library class for coreboot. =20 Copyright (C) 2016, Red Hat, Inc. - Copyright (c) 2016, Intel Corporation. All rights reserved.
+ Copyright (c) 2016 - 2021, Intel Corporation. All rights reserved.
=20 SPDX-License-Identifier: BSD-2-Clause-Patent =20 @@ -19,6 +19,7 @@ #include #include #include +#include =20 #include "PciHostBridge.h" =20 @@ -48,7 +49,6 @@ CB_PCI_ROOT_BRIDGE_DEVICE_PATH mRootBridgeDevicePathTempl= ate =3D { } }; =20 - /** Initialize a PCI_ROOT_BRIDGE structure. =20 @@ -145,6 +145,27 @@ InitRootBridge ( return EFI_SUCCESS; } =20 +/** + Initialize DevicePath for a PCI_ROOT_BRIDGE. + @param[in] HID HID for device path + @param[in] UID UID for device path + + @retval A pointer to the new created device patch. +**/ +EFI_DEVICE_PATH_PROTOCOL * +CreateRootBridgeDevicePath ( + IN UINT32 HID, + IN UINT32 UID +) +{ + CB_PCI_ROOT_BRIDGE_DEVICE_PATH *DevicePath; + DevicePath =3D AllocateCopyPool (sizeof (mRootBridgeDevicePathTemplate), + &mRootBridgeDevicePathTemplate); + ASSERT (DevicePath !=3D NULL); + DevicePath->AcpiDevicePath.HID =3D HID; + DevicePath->AcpiDevicePath.UID =3D UID; + return (EFI_DEVICE_PATH_PROTOCOL *)DevicePath; +} =20 /** Return all the root bridge instances in an array. @@ -161,10 +182,30 @@ PciHostBridgeGetRootBridges ( UINTN *Count ) { + UNIVERSAL_PAYLOAD_PCI_ROOT_BRIDGES *PciRootBridgeInfo; + EFI_HOB_GUID_TYPE *GuidHob; + UNIVERSAL_PAYLOAD_GENERIC_HEADER *GenericHeader; + // + // Find Universal Payload PCI Root Bridge Info hob + // + GuidHob =3D GetFirstGuidHob (&gUniversalPayloadPciRootBridgeInfoGuid); + if (GuidHob !=3D NULL) { + GenericHeader =3D (UNIVERSAL_PAYLOAD_GENERIC_HEADER *) GET_GUID_HOB_DA= TA (GuidHob); + if ((sizeof(UNIVERSAL_PAYLOAD_GENERIC_HEADER) <=3D GET_GUID_HOB_DATA_S= IZE (GuidHob)) && (GenericHeader->Length <=3D GET_GUID_HOB_DATA_SIZE (GuidH= ob))) { + if ((GenericHeader->Revision =3D=3D UNIVERSAL_PAYLOAD_PCI_ROOT_BRIDG= ES_REVISION) && (GenericHeader->Length >=3D sizeof (UNIVERSAL_PAYLOAD_PCI_R= OOT_BRIDGES))) { + // + // UNIVERSAL_PAYLOAD_PCI_ROOT_BRIDGES structure is used when Revis= ion equals to UNIVERSAL_PAYLOAD_PCI_ROOT_BRIDGES_REVISION + // + PciRootBridgeInfo =3D (UNIVERSAL_PAYLOAD_PCI_ROOT_BRIDGES *) GET_G= UID_HOB_DATA (GuidHob); + if (PciRootBridgeInfo->Count <=3D (GET_GUID_HOB_DATA_SIZE (GuidHob= ) - sizeof(UNIVERSAL_PAYLOAD_PCI_ROOT_BRIDGES)) / sizeof(UNIVERSAL_PAYLOAD_= PCI_ROOT_BRIDGE)) { + return RetrieveRootBridgeInfoFromHob (PciRootBridgeInfo, Count); + } + } + } + } return ScanForRootBridges (Count); } =20 - /** Free the root bridge instances array returned from PciHostBridgeGetRootBridges(). diff --git a/UefiPayloadPkg/Library/PciHostBridgeLib/PciHostBridgeLib.inf b= /UefiPayloadPkg/Library/PciHostBridgeLib/PciHostBridgeLib.inf index 7896df2416..6069dcc0ef 100644 --- a/UefiPayloadPkg/Library/PciHostBridgeLib/PciHostBridgeLib.inf +++ b/UefiPayloadPkg/Library/PciHostBridgeLib/PciHostBridgeLib.inf @@ -2,7 +2,7 @@ # Library instance of PciHostBridgeLib library class for coreboot. # # Copyright (C) 2016, Red Hat, Inc. -# Copyright (c) 2016 - 2018, Intel Corporation. All rights reserved.
+# Copyright (c) 2016 - 2021, Intel Corporation. All rights reserved.
# # SPDX-License-Identifier: BSD-2-Clause-Patent # @@ -39,3 +39,9 @@ DevicePathLib MemoryAllocationLib PciLib + +[Guids] + gUniversalPayloadPciRootBridgeInfoGuid + +[Pcd] + gEfiMdeModulePkgTokenSpaceGuid.PcdPciDisableBusEnumeration diff --git a/UefiPayloadPkg/Library/PciHostBridgeLib/PciHostBridgeSupport.c= b/UefiPayloadPkg/Library/PciHostBridgeLib/PciHostBridgeSupport.c index fffbf04cad..b0268f0506 100644 --- a/UefiPayloadPkg/Library/PciHostBridgeLib/PciHostBridgeSupport.c +++ b/UefiPayloadPkg/Library/PciHostBridgeLib/PciHostBridgeSupport.c @@ -1,7 +1,7 @@ /** @file Scan the entire PCI bus for root bridges to support coreboot UEFI payloa= d. =20 - Copyright (c) 2016, Intel Corporation. All rights reserved.
+ Copyright (c) 2016 - 2021, Intel Corporation. All rights reserved.
=20 SPDX-License-Identifier: BSD-2-Clause-Patent =20 @@ -582,3 +582,74 @@ ScanForRootBridges ( =20 return RootBridges; } + +/** + Scan for all root bridges from Universal Payload PciRootBridgeInfoHob + + @param[in] PciRootBridgeInfo Pointer of Universal Payload PCI Root B= ridge Info Hob + @param[out] NumberOfRootBridges Number of root bridges detected + + @retval Pointer to the allocated PCI_ROOT_BRIDGE structure array. + +**/ +PCI_ROOT_BRIDGE * +RetrieveRootBridgeInfoFromHob ( + IN UNIVERSAL_PAYLOAD_PCI_ROOT_BRIDGES *PciRootBridgeInfo, + OUT UINTN *NumberOfRootBridges +) +{ + PCI_ROOT_BRIDGE *PciRootBridges; + UINTN Size; + UINT8 Index; + + ASSERT (PciRootBridgeInfo !=3D NULL); + ASSERT (NumberOfRootBridges !=3D NULL); + if (PciRootBridgeInfo =3D=3D NULL) { + return NULL; + } + if (PciRootBridgeInfo->Count =3D=3D 0) { + return NULL; + } + Size =3D PciRootBridgeInfo->Count * sizeof (PCI_ROOT_BRIDGE); + PciRootBridges =3D (PCI_ROOT_BRIDGE *) AllocatePool (Size); + ASSERT (PciRootBridges !=3D NULL); + if (PciRootBridges =3D=3D NULL) { + return NULL; + } + ZeroMem (PciRootBridges, PciRootBridgeInfo->Count * sizeof (PCI_ROOT_BRI= DGE)); + + // + // Create all root bridges with PciRootBridgeInfoHob + // + for (Index =3D 0; Index < PciRootBridgeInfo->Count; Index++) { + PciRootBridges[Index].Segment =3D PciRootBridgeInfo->Roo= tBridge[Index].Segment; + PciRootBridges[Index].Supports =3D PciRootBridgeInfo->Roo= tBridge[Index].Supports; + PciRootBridges[Index].Attributes =3D PciRootBridgeInfo->Roo= tBridge[Index].Attributes; + PciRootBridges[Index].DmaAbove4G =3D PciRootBridgeInfo->Roo= tBridge[Index].DmaAbove4G; + PciRootBridges[Index].NoExtendedConfigSpace =3D PciRootBridgeInfo->Roo= tBridge[Index].NoExtendedConfigSpace; + PciRootBridges[Index].ResourceAssigned =3D PciRootBridgeInfo->Res= ourceAssigned; + PciRootBridges[Index].AllocationAttributes =3D PciRootBridgeInfo->Roo= tBridge[Index].AllocationAttributes; + PciRootBridges[Index].DevicePath =3D CreateRootBridgeDevice= Path(PciRootBridgeInfo->RootBridge[Index].HID, PciRootBridgeInfo->RootBridg= e[Index].UID); + CopyMem(&PciRootBridges[Index].Bus, &PciRootBridgeInfo->RootBr= idge[Index].Bus, sizeof(UNIVERSAL_PAYLOAD_PCI_ROOT_BRIDGE_APERTURE)= ); + CopyMem(&PciRootBridges[Index].Io, &PciRootBridgeInfo->RootBr= idge[Index].Io, sizeof(UNIVERSAL_PAYLOAD_PCI_ROOT_BRIDGE_APERTURE)= ); + CopyMem(&PciRootBridges[Index].Mem, &PciRootBridgeInfo->RootBr= idge[Index].Mem, sizeof(UNIVERSAL_PAYLOAD_PCI_ROOT_BRIDGE_APERTURE)= ); + CopyMem(&PciRootBridges[Index].MemAbove4G, &PciRootBridgeInfo->RootBr= idge[Index].MemAbove4G, sizeof(UNIVERSAL_PAYLOAD_PCI_ROOT_BRIDGE_APERTURE)= ); + CopyMem(&PciRootBridges[Index].PMem, &PciRootBridgeInfo->RootBr= idge[Index].PMem, sizeof(UNIVERSAL_PAYLOAD_PCI_ROOT_BRIDGE_APERTURE)= ); + CopyMem(&PciRootBridges[Index].PMemAbove4G, &PciRootBridgeInfo->RootBr= idge[Index].PMemAbove4G, sizeof(UNIVERSAL_PAYLOAD_PCI_ROOT_BRIDGE_APERTURE)= ); + } + + *NumberOfRootBridges =3D PciRootBridgeInfo->Count; + + // + // Now, this library only supports RootBridge that ResourceAssigned is T= rue + // + if (PciRootBridgeInfo->ResourceAssigned) { + PcdSetBoolS (PcdPciDisableBusEnumeration, TRUE); + } else { + DEBUG ((DEBUG_ERROR, "There is root bridge whose ResourceAssigned is F= ALSE\n")); + PcdSetBoolS (PcdPciDisableBusEnumeration, FALSE); + return NULL; + } + + return PciRootBridges; +} diff --git a/UefiPayloadPkg/UefiPayloadPkg.dsc b/UefiPayloadPkg/UefiPayload= Pkg.dsc index 37ad5a0ae7..e9211adf86 100644 --- a/UefiPayloadPkg/UefiPayloadPkg.dsc +++ b/UefiPayloadPkg/UefiPayloadPkg.dsc @@ -323,7 +323,6 @@ gEfiMdeModulePkgTokenSpaceGuid.PcdSerialFifoControl|$(SERIAL_FIFO_CONTRO= L) gEfiMdeModulePkgTokenSpaceGuid.PcdSerialExtendedTxFifoSize|$(SERIAL_EXTE= NDED_TX_FIFO_SIZE) =20 - gEfiMdeModulePkgTokenSpaceGuid.PcdPciDisableBusEnumeration|TRUE gEfiMdePkgTokenSpaceGuid.PcdUartDefaultBaudRate|$(UART_DEFAULT_BAUD_RATE) gEfiMdePkgTokenSpaceGuid.PcdUartDefaultDataBits|$(UART_DEFAULT_DATA_BITS) gEfiMdePkgTokenSpaceGuid.PcdUartDefaultParity|$(UART_DEFAULT_PARITY) @@ -363,6 +362,7 @@ gEfiMdeModulePkgTokenSpaceGuid.PcdConOutColumn|100 gEfiMdePkgTokenSpaceGuid.PcdPciExpressBaseAddress|0 gEfiMdePkgTokenSpaceGuid.PcdPciExpressBaseSize|0 + gEfiMdeModulePkgTokenSpaceGuid.PcdPciDisableBusEnumeration|TRUE =20 ##########################################################################= ###### # --=20 2.30.0.windows.2 -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#76507): https://edk2.groups.io/g/devel/message/76507 Mute This Topic: https://groups.io/mt/83551778/1787277 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org] -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- From nobody Mon Feb 9 09:02:22 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) client-ip=66.175.222.108; envelope-from=bounce+27952+76508+1787277+3901457@groups.io; helo=mail02.groups.io; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce+27952+76508+1787277+3901457@groups.io; dmarc=fail(p=none dis=none) header.from=intel.com ARC-Seal: i=1; a=rsa-sha256; t=1623748354; cv=none; d=zohomail.com; s=zohoarc; b=LPWQPAJHYIDsbGjR80Fd4bqDjelQssGY+dXwu/+FIlbh2Crzsise9LZAQnLg60aKFcQjYnotx2mChi+IsX9SrK84L2bK/w+TIPFNScy9TAig6d/5NxUfs2K9NiZj9csGNvBHZtEIIKUennNcLPW6h4DGjGppNTaMDZc0FhI/GvQ= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1623748354; h=Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Reply-To:References:Sender:Subject:To; bh=rXqH3iC/QkiBeyBdwhv2LHeocqd95xXedndmORGg7co=; b=kb1U+eDigXg3ghYxe9x8zDiNVqL3y170tX7LdBnvMZGmEhwWYdtqwXnDFREodvCOnY7iOYZq1Xt7eT5WRIQg8FV0H90b80iKTulHLA1p4AEkQVHRy5PMhsREJoizenHHT1Vv9laaalgxYzb2uOnbVncV3gNKhIBx7siVYWFgHCk= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce+27952+76508+1787277+3901457@groups.io; dmarc=fail header.from= (p=none dis=none) Received: from mail02.groups.io (mail02.groups.io [66.175.222.108]) by mx.zohomail.com with SMTPS id 1623748354358287.11584683431465; Tue, 15 Jun 2021 02:12:34 -0700 (PDT) Return-Path: X-Received: by 127.0.0.2 with SMTP id NyPsYY1788612x0tC58FicxA; Tue, 15 Jun 2021 02:12:34 -0700 X-Received: from mga12.intel.com (mga12.intel.com []) by mx.groups.io with SMTP id smtpd.web11.6828.1623748346075457462 for ; Tue, 15 Jun 2021 02:12:28 -0700 IronPort-SDR: Nu019DDhQWJxfKn0t5I/ybMU8ZcN7nTsHeAHb6lTNweQizCwEqG13HIWfeiVhbdtqXzjoEdO5n cygRa2FVvDxg== X-IronPort-AV: E=McAfee;i="6200,9189,10015"; a="185647621" X-IronPort-AV: E=Sophos;i="5.83,275,1616482800"; d="scan'208";a="185647621" X-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:28 -0700 IronPort-SDR: yoA+DMlCgOc7mKruDEMIhUlG3IV/wKVda5XWE+5a1DdBshkSEIW8dEJHU35eDW0aZliRiEcZzZ epgC9BAW7c5w== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.83,275,1616482800"; d="scan'208";a="487713175" X-Received: from fieedk002.ccr.corp.intel.com ([10.239.158.144]) by fmsmga002.fm.intel.com with ESMTP; 15 Jun 2021 02:12:27 -0700 From: "Zhiguang Liu" To: devel@edk2.groups.io Cc: Michael D Kinney , Liming Gao , Jian J Wang , Hao A Wu Subject: [edk2-devel] [Patch V5 4/9] MdeModulePkg: Add new structure for the Universal Payload SMBios Table Hob Date: Tue, 15 Jun 2021 17:12:06 +0800 Message-Id: <20210615091211.801-5-zhiguang.liu@intel.com> In-Reply-To: <20210615091211.801-1-zhiguang.liu@intel.com> References: <20210615091211.801-1-zhiguang.liu@intel.com> MIME-Version: 1.0 Precedence: Bulk List-Unsubscribe: List-Subscribe: List-Help: Sender: devel@edk2.groups.io List-Id: Mailing-List: list devel@edk2.groups.io; contact devel+owner@edk2.groups.io Reply-To: devel@edk2.groups.io,zhiguang.liu@intel.com X-Gm-Message-State: kEAQARZm9vCkE1NgynzwOTyAx1787277AA= Content-Transfer-Encoding: quoted-printable DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=groups.io; q=dns/txt; s=20140610; t=1623748354; bh=+ff3WVbGSYAHLKa/ZV07aIwvOAXyXVSStnKhr52tPIY=; h=Cc:Date:From:Reply-To:Subject:To; b=lhPANTMHOqFQdbh9NxIu6N+lYSgn4gcmsH/n+hkYPblvjNq1FDz6bk7cNjmQG9DGfQu 0yAIp4732FUtSBZXDTCzlsr//Nd6nfJm3TbZ58nIBJtXwGE5B4/4QlSOmE1VUluvZMb2x LjPgO/JHQKsmcOJKdEGCNv2SD4ZwaJ8Vftg= X-ZohoMail-DKIM: pass (identity @groups.io) Content-Type: text/plain; charset="utf-8" Cc: Michael D Kinney Cc: Liming Gao Cc: Jian J Wang Cc: Hao A Wu Reviewed-by: Hao A Wu Signed-off-by: Zhiguang Liu --- MdeModulePkg/Include/UniversalPayload/SmbiosTable.h | 30 +++++++++++++++++= +++++++++++++ MdeModulePkg/MdeModulePkg.dec | 6 ++++++ 2 files changed, 36 insertions(+) diff --git a/MdeModulePkg/Include/UniversalPayload/SmbiosTable.h b/MdeModul= ePkg/Include/UniversalPayload/SmbiosTable.h new file mode 100644 index 0000000000..94c4aaf7ee --- /dev/null +++ b/MdeModulePkg/Include/UniversalPayload/SmbiosTable.h @@ -0,0 +1,30 @@ +/** @file + Define the structure for the Universal Payload SmBios. + +Copyright (c) 2021, Intel Corporation. All rights reserved.
+SPDX-License-Identifier: BSD-2-Clause-Patent + + @par Revision Reference: + - Universal Payload Specification 0.75 (https://universalpayload.githu= b.io/documentation/) +**/ + +#ifndef UNIVERSAL_PAYLOAD_SMBIOS_TABLE_H_ +#define UNIVERSAL_PAYLOAD_SMBIOS_TABLE_H_ + +#include +#include + +#pragma pack (1) + +typedef struct { + UNIVERSAL_PAYLOAD_GENERIC_HEADER Header; + EFI_PHYSICAL_ADDRESS SmBiosEntryPoint; +} UNIVERSAL_PAYLOAD_SMBIOS_TABLE; + +#pragma pack() + +#define UNIVERSAL_PAYLOAD_SMBIOS_TABLE_REVISION 1 + +extern GUID gUniversalPayloadSmbios3TableGuid; +extern GUID gUniversalPayloadSmbiosTableGuid; +#endif // UNIVERSAL_PAYLOAD_SMBIOS_TABLE_H_ diff --git a/MdeModulePkg/MdeModulePkg.dec b/MdeModulePkg/MdeModulePkg.dec index 5cee4e159a..377e868e7c 100644 --- a/MdeModulePkg/MdeModulePkg.dec +++ b/MdeModulePkg/MdeModulePkg.dec @@ -410,6 +410,12 @@ ## Include/UniversalPayload/PciRootBridges.h gUniversalPayloadPciRootBridgeInfoGuid =3D { 0xec4ebacb, 0x2638, 0x416e,= { 0xbe, 0x80, 0xe5, 0xfa, 0x4b, 0x51, 0x19, 0x01 }} =20 + ## Include/UniversalPayload/SmbiosTable.h + gUniversalPayloadSmbios3TableGuid =3D { 0x92b7896c, 0x3362, 0x46ce, { 0x= 99, 0xb3, 0x4f, 0x5e, 0x3c, 0x34, 0xeb, 0x42 } } + + ## Include/UniversalPayload/SmbiosTable.h + gUniversalPayloadSmbiosTableGuid =3D { 0x590a0d26, 0x06e5, 0x4d20, { 0x8= a, 0x82, 0x59, 0xea, 0x1b, 0x34, 0x98, 0x2d } } + [Ppis] ## Include/Ppi/AtaController.h gPeiAtaControllerPpiGuid =3D { 0xa45e60d1, 0xc719, 0x44aa, { 0xb0,= 0x7a, 0xaa, 0x77, 0x7f, 0x85, 0x90, 0x6d }} --=20 2.30.0.windows.2 -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#76508): https://edk2.groups.io/g/devel/message/76508 Mute This Topic: https://groups.io/mt/83551779/1787277 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org] -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- From nobody Mon Feb 9 09:02:22 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) client-ip=66.175.222.108; envelope-from=bounce+27952+76509+1787277+3901457@groups.io; helo=mail02.groups.io; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce+27952+76509+1787277+3901457@groups.io; dmarc=fail(p=none dis=none) header.from=intel.com ARC-Seal: i=1; a=rsa-sha256; t=1623748351; cv=none; d=zohomail.com; s=zohoarc; b=JrGAu+pc6Z9I1lW5nH6NaGo3BRhwOY0DMTgAJLYo9xjger1P3scr/EaY9oMlk3MQ+sQfxkROGOl3Z8xiI2Nx8MfnMk/5IpMJa98nOeMfCEBO3Z6HG1/R6k23ZOEQxUgIw07Cg7nYWfwilVN9mtxUOSGFSMWbZdI0ylPRtsAorww= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1623748351; h=Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Reply-To:References:Sender:Subject:To; bh=W2UEgGntP0m2kZNHT3d4hUTj9loXetTAlDO7YIlkQC0=; b=kjxWbtqgYtRXwYsff7831h1tej0+vzkt0XDBT1k4agjMifhQfs2ifnMsAWxMUHDXdy7HKH5kbCCej9fgpngGaUxXBiFTPrsDkkcERgtLXZ+ZPKtyOlyGa33UH489RbD29sanGLCrT/piwwNStYOrRyHIEVIBLPtHiAS6vKYcksc= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce+27952+76509+1787277+3901457@groups.io; dmarc=fail header.from= (p=none dis=none) Received: from mail02.groups.io (mail02.groups.io [66.175.222.108]) by mx.zohomail.com with SMTPS id 16237483518681003.8666307968938; Tue, 15 Jun 2021 02:12:31 -0700 (PDT) Return-Path: X-Received: by 127.0.0.2 with SMTP id qAMdYY1788612xEzTb7l81Wf; Tue, 15 Jun 2021 02:12:31 -0700 X-Received: from mga12.intel.com (mga12.intel.com []) by mx.groups.io with SMTP id smtpd.web11.6828.1623748346075457462 for ; Tue, 15 Jun 2021 02:12:30 -0700 IronPort-SDR: ALI27Fc07p4iDxBQdBy971Zsb/NAVf27dUPl124D+nk88iaY9+DiVFEG6dxrpqQwmhSmqVGBxk 9bQu3jVcU1Mw== X-IronPort-AV: E=McAfee;i="6200,9189,10015"; a="185647629" X-IronPort-AV: E=Sophos;i="5.83,275,1616482800"; d="scan'208";a="185647629" X-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:30 -0700 IronPort-SDR: YRpc43ZNYozxQxatrW3H8NMdlL6uONVCA56uY6hzVpk5f3rBM368AxVuWHpdWZhLGGCeapIs6v KMbir/v9o3nw== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.83,275,1616482800"; d="scan'208";a="487713194" X-Received: from fieedk002.ccr.corp.intel.com ([10.239.158.144]) by fmsmga002.fm.intel.com with ESMTP; 15 Jun 2021 02:12:28 -0700 From: "Zhiguang Liu" To: devel@edk2.groups.io Cc: Jian J Wang , Hao A Wu , Dandan Bi , Star Zeng , Zhichao Gao , Patrick Rudolph Subject: [edk2-devel] [Patch V5 5/9] MdeModulePkg/Universal/SmbiosDxe: Scan for existing tables Date: Tue, 15 Jun 2021 17:12:07 +0800 Message-Id: <20210615091211.801-6-zhiguang.liu@intel.com> In-Reply-To: <20210615091211.801-1-zhiguang.liu@intel.com> References: <20210615091211.801-1-zhiguang.liu@intel.com> MIME-Version: 1.0 Precedence: Bulk List-Unsubscribe: List-Subscribe: List-Help: Sender: devel@edk2.groups.io List-Id: Mailing-List: list devel@edk2.groups.io; contact devel+owner@edk2.groups.io Reply-To: devel@edk2.groups.io,zhiguang.liu@intel.com X-Gm-Message-State: M2Uq36HY1km68Km9IJMLkDj9x1787277AA= Content-Transfer-Encoding: quoted-printable DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=groups.io; q=dns/txt; s=20140610; t=1623748351; bh=F1btZncbcfaSYr+AHqWXOhvY9uOteLuijA3o7HM4RSY=; h=Cc:Date:From:Reply-To:Subject:To; b=kefGmf8PT0m5HFr4JYFAH5rf+1Z/iSG7BkrOucRYW5rUEqWclwAtFqRxFMRZZN02Ssq BThrAjUQK7Jrl3vFDAlLsIehA5TWErIMkp8OxPE/mcTOrCkL48oSMnRc7Xc1TShYNr9GO k/e7OkNz8+XaexrqSL/AsKbLyTbc/PdsA/0= X-ZohoMail-DKIM: pass (identity @groups.io) Content-Type: text/plain; charset="utf-8" The default EfiSmbiosProtocol operates on an empty SMBIOS table. The SMBIOS tables are provided by the bootloader on UefiPayloadPkg. Scan for existing tables in SmbiosDxe and load them if they seem valid. This fixes the settings menu not showing any hardware information, instead only "0 MB RAM" was displayed. Tests showed that the OS can still see the SMBIOS tables. SmbiosDxe will get the SMBIOS from a guid Hob. Also will keep the SmbiosHandle if it is available. Cc: Jian J Wang Cc: Hao A Wu Cc: Dandan Bi Cc: Star Zeng Cc: Zhichao Gao Reviewed-by: Hao A Wu Signed-off-by: Patrick Rudolph Signed-off-by: Zhiguang Liu --- MdeModulePkg/Universal/SmbiosDxe/SmbiosDxe.c | 293 +++++++++++++++++++++= +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++= +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++= +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++= ++++++++++++++++++++++++++++++++++++++++++++++- MdeModulePkg/Universal/SmbiosDxe/SmbiosDxe.h | 65 +++++++++++++++++++++= +++++++++++++++++++++++++++++++++++++++++++- MdeModulePkg/Universal/SmbiosDxe/SmbiosDxe.inf | 5 ++++- 3 files changed, 360 insertions(+), 3 deletions(-) diff --git a/MdeModulePkg/Universal/SmbiosDxe/SmbiosDxe.c b/MdeModulePkg/Un= iversal/SmbiosDxe/SmbiosDxe.c index 3cdb0b1ed7..400b0fa578 100644 --- a/MdeModulePkg/Universal/SmbiosDxe/SmbiosDxe.c +++ b/MdeModulePkg/Universal/SmbiosDxe/SmbiosDxe.c @@ -2,7 +2,7 @@ This code produces the Smbios protocol. It also responsible for construc= ting SMBIOS table into system table. =20 -Copyright (c) 2009 - 2018, Intel Corporation. All rights reserved.
+Copyright (c) 2009 - 2021, Intel Corporation. All rights reserved.
SPDX-License-Identifier: BSD-2-Clause-Patent =20 **/ @@ -148,6 +148,12 @@ SMBIOS_TABLE_3_0_ENTRY_POINT Smbios30EntryPointStructu= reData =3D { // 0 }; + +IS_SMBIOS_TABLE_VALID_ENTRY mIsSmbiosTableValid[] =3D { + {&gUniversalPayloadSmbios3TableGuid, IsValidSmbios30Table }, + {&gUniversalPayloadSmbiosTableGuid, IsValidSmbios20Table } +}; + /** =20 Get the full size of SMBIOS structure including optional strings that fo= llow the formatted structure. @@ -1408,6 +1414,290 @@ SmbiosTableConstruction ( } } =20 +/** + Validates a SMBIOS 2.0 table entry point. + + @param TableEntry The SmBios table entry to validate. + @param TableAddress On exit, point to the smbios table addres. + @param TableMaximumSize On exit, point to the maximum size of the table. + + @retval TRUE SMBIOS table entry point is valid. + @retval FALSE SMBIOS table entry point is malformed. + +**/ +STATIC +BOOLEAN +IsValidSmbios20Table ( + IN VOID *TableEntry, + OUT VOID **TableAddress, + OUT UINTN *TableMaximumSize + ) +{ + UINT8 Checksum; + SMBIOS_TABLE_ENTRY_POINT *SmbiosTable; + SmbiosTable =3D (SMBIOS_TABLE_ENTRY_POINT *) TableEntry; + + if (CompareMem (SmbiosTable->AnchorString, "_SM_", 4) !=3D 0) { + return FALSE; + } + + if (CompareMem (SmbiosTable->IntermediateAnchorString, "_DMI_", 5) !=3D = 0) { + return FALSE; + } + + // + // The actual value of the EntryPointLength should be 1Fh. + // However, it was incorrectly stated in version 2.1 of smbios specifica= tion. + // Therefore, 0x1F and 0x1E are both accepted. + // + if (SmbiosTable->EntryPointLength !=3D 0x1E && SmbiosTable->EntryPointLe= ngth !=3D sizeof (SMBIOS_TABLE_ENTRY_POINT)) { + return FALSE; + } + + // + // MajorVersion should not be less than 2. + // + if (SmbiosTable->MajorVersion < 2) { + return FALSE; + } + + // + // The whole struct check sum should be zero + // + Checksum =3D CalculateSum8 ( + (UINT8 *) SmbiosTable, + SmbiosTable->EntryPointLength + ); + if (Checksum !=3D 0) { + return FALSE; + } + + // + // The Intermediate Entry Point Structure check sum should be zero. + // + Checksum =3D CalculateSum8 ( + (UINT8 *) SmbiosTable + OFFSET_OF (SMBIOS_TABLE_ENTRY_POINT= , IntermediateAnchorString), + SmbiosTable->EntryPointLength - OFFSET_OF (SMBIOS_TABLE_ENT= RY_POINT, IntermediateAnchorString) + ); + if (Checksum !=3D 0) { + return FALSE; + } + + *TableAddress =3D (VOID *) (UINTN) SmbiosTable->TableAddress; + *TableMaximumSize =3D SmbiosTable->TableLength; + return TRUE; +} + +/** + Validates a SMBIOS 3.0 table entry point. + + @param TableEntry The SmBios table entry to validate. + @param TableAddress On exit, point to the smbios table addres. + @param TableMaximumSize On exit, point to the maximum size of the table. + + @retval TRUE SMBIOS table entry point is valid. + @retval FALSE SMBIOS table entry point is malformed. + +**/ +STATIC +BOOLEAN +IsValidSmbios30Table ( + IN VOID *TableEntry, + OUT VOID **TableAddress, + OUT UINTN *TableMaximumSize + ) +{ + UINT8 Checksum; + SMBIOS_TABLE_3_0_ENTRY_POINT *SmbiosTable; + SmbiosTable =3D (SMBIOS_TABLE_3_0_ENTRY_POINT *) TableEntry; + + if (CompareMem (SmbiosTable->AnchorString, "_SM3_", 5) !=3D 0) { + return FALSE; + } + if (SmbiosTable->EntryPointLength < sizeof (SMBIOS_TABLE_3_0_ENTRY_POINT= )) { + return FALSE; + } + if (SmbiosTable->MajorVersion < 3) { + return FALSE; + } + + // + // The whole struct check sum should be zero + // + Checksum =3D CalculateSum8 ( + (UINT8 *) SmbiosTable, + SmbiosTable->EntryPointLength + ); + if (Checksum !=3D 0) { + return FALSE; + } + + *TableAddress =3D (VOID *) (UINTN) SmbiosTable->TableAddress; + *TableMaximumSize =3D SmbiosTable->TableMaximumSize; + return TRUE; +} + +/** + Parse an existing SMBIOS table and insert it using SmbiosAdd. + + @param ImageHandle The EFI_HANDLE to this driver. + @param Smbios The SMBIOS table to parse. + @param Length The length of the SMBIOS table. + + @retval EFI_SUCCESS SMBIOS table was parsed and installed. + @retval EFI_OUT_OF_RESOURCES Record was not added due to lack of system= resources. + @retval EFI_INVALID_PARAMETER Smbios is not a correct smbios table + +**/ +STATIC +EFI_STATUS +ParseAndAddExistingSmbiosTable ( + IN EFI_HANDLE ImageHandle, + IN SMBIOS_STRUCTURE_POINTER Smbios, + IN UINTN Length + ) +{ + EFI_STATUS Status; + CHAR8 *String; + EFI_SMBIOS_HANDLE SmbiosHandle; + SMBIOS_STRUCTURE_POINTER SmbiosEnd; + + SmbiosEnd.Raw =3D Smbios.Raw + Length; + + if (Smbios.Raw >=3D SmbiosEnd.Raw || Smbios.Raw =3D=3D NULL) { + return EFI_INVALID_PARAMETER; + } + + do { + // + // Make sure not to access memory beyond SmbiosEnd + // + if (Smbios.Raw + sizeof (SMBIOS_STRUCTURE) > SmbiosEnd.Raw || + Smbios.Raw + sizeof (SMBIOS_STRUCTURE) < Smbios.Raw) { + return EFI_INVALID_PARAMETER; + } + // + // Check for end marker + // + if (Smbios.Hdr->Type =3D=3D SMBIOS_TYPE_END_OF_TABLE) { + break; + } + // + // Make sure not to access memory beyond SmbiosEnd + // Each structure shall be terminated by a double-null (0000h). + // + if (Smbios.Raw + Smbios.Hdr->Length + 2 * sizeof (UINT8) > SmbiosEnd.R= aw || + Smbios.Raw + Smbios.Hdr->Length + 2 * sizeof (UINT8) < Smbios.Raw) { + return EFI_INVALID_PARAMETER; + } + // + // Install the table + // + SmbiosHandle =3D Smbios.Hdr->Handle; + Status =3D SmbiosAdd ( + &mPrivateData.Smbios, + ImageHandle, + &SmbiosHandle, + Smbios.Hdr + ); + + ASSERT_EFI_ERROR (Status); + if (EFI_ERROR (Status)) { + return Status; + } + // + // Go to the next SMBIOS structure. Each SMBIOS structure may include = 2 parts: + // 1. Formatted section; 2. Unformatted string section. So, 2 steps ar= e needed + // to skip one SMBIOS structure. + // + + // + // Step 1: Skip over formatted section. + // + String =3D (CHAR8 *) (Smbios.Raw + Smbios.Hdr->Length); + + // + // Step 2: Skip over unformatted string section. + // + do { + // + // Each string is terminated with a NULL(00h) BYTE and the sets of s= trings + // is terminated with an additional NULL(00h) BYTE. + // + for ( ; *String !=3D 0; String++) { + if ((UINTN) String >=3D (UINTN) SmbiosEnd.Raw - sizeof (UINT8)) { + return EFI_INVALID_PARAMETER; + } + } + + if (*(UINT8 *) ++String =3D=3D 0) { + // + // Pointer to the next SMBIOS structure. + // + Smbios.Raw =3D (UINT8 *) ++String; + break; + } + } while (TRUE); + } while (Smbios.Raw < SmbiosEnd.Raw); + + return EFI_SUCCESS; +} + +/** + Retrieve SMBIOS from Hob. + @param ImageHandle Module's image handle + + @retval EFI_SUCCESS Smbios from Hob is installed. + @return EFI_NOT_FOUND Not found Smbios from Hob. + @retval Other No Smbios from Hob is installed. + +**/ +EFI_STATUS +RetrieveSmbiosFromHob ( + IN EFI_HANDLE ImageHandle + ) +{ + EFI_STATUS Status; + UINTN Index; + SMBIOS_STRUCTURE_POINTER Smbios; + EFI_HOB_GUID_TYPE *GuidHob; + UNIVERSAL_PAYLOAD_SMBIOS_TABLE *SmBiosTableAdress; + UNIVERSAL_PAYLOAD_GENERIC_HEADER *GenericHeader; + VOID *TableAddress; + UINTN TableMaximumSize; + + Status =3D EFI_NOT_FOUND; + + for (Index =3D 0; Index < ARRAY_SIZE (mIsSmbiosTableValid); Index++) { + GuidHob =3D GetFirstGuidHob (mIsSmbiosTableValid[Index].Guid); + if (GuidHob =3D=3D NULL) { + continue; + } + GenericHeader =3D (UNIVERSAL_PAYLOAD_GENERIC_HEADER *) GET_GUID_HOB_DA= TA (GuidHob); + if ((sizeof (UNIVERSAL_PAYLOAD_GENERIC_HEADER) <=3D GET_GUID_HOB_DATA_= SIZE (GuidHob)) && (GenericHeader->Length <=3D GET_GUID_HOB_DATA_SIZE (Guid= Hob))) { + if (GenericHeader->Revision =3D=3D UNIVERSAL_PAYLOAD_SMBIOS_TABLE_RE= VISION) { + // + // UNIVERSAL_PAYLOAD_SMBIOS_TABLE structure is used when Revision = equals to UNIVERSAL_PAYLOAD_SMBIOS_TABLE_REVISION + // + SmBiosTableAdress =3D (UNIVERSAL_PAYLOAD_SMBIOS_TABLE *) GET_GUID_= HOB_DATA (GuidHob); + if (GenericHeader->Length >=3D UNIVERSAL_PAYLOAD_SIZEOF_THROUGH_FI= ELD (UNIVERSAL_PAYLOAD_SMBIOS_TABLE, SmBiosEntryPoint)) { + if (mIsSmbiosTableValid[Index].IsValid ((VOID *) (UINTN )SmBiosT= ableAdress->SmBiosEntryPoint, &TableAddress, &TableMaximumSize)) { + Smbios.Raw =3D TableAddress; + Status =3D ParseAndAddExistingSmbiosTable (ImageHandle, Smbios= , TableMaximumSize); + if (EFI_ERROR (Status)) { + DEBUG ((DEBUG_ERROR, "RetrieveSmbiosFromHob: Failed to parse= preinstalled tables from Guid Hob\n")); + Status =3D EFI_UNSUPPORTED; + } else { + return EFI_SUCCESS; + } + } + } + } + } + } + return Status; +} + /** =20 Driver to produce Smbios protocol and pre-allocate 1 page for the final = SMBIOS table. @@ -1451,5 +1741,6 @@ SmbiosDriverEntryPoint ( &mPrivateData.Smbios ); =20 + RetrieveSmbiosFromHob (ImageHandle); return Status; } diff --git a/MdeModulePkg/Universal/SmbiosDxe/SmbiosDxe.h b/MdeModulePkg/Un= iversal/SmbiosDxe/SmbiosDxe.h index f97c85ae40..a131bdabec 100644 --- a/MdeModulePkg/Universal/SmbiosDxe/SmbiosDxe.h +++ b/MdeModulePkg/Universal/SmbiosDxe/SmbiosDxe.h @@ -1,7 +1,7 @@ /** @file This code supports the implementation of the Smbios protocol =20 -Copyright (c) 2009 - 2018, Intel Corporation. All rights reserved.
+Copyright (c) 2009 - 2021, Intel Corporation. All rights reserved.
SPDX-License-Identifier: BSD-2-Clause-Patent =20 **/ @@ -24,6 +24,8 @@ SPDX-License-Identifier: BSD-2-Clause-Patent #include #include #include +#include +#include =20 #define SMBIOS_INSTANCE_SIGNATURE SIGNATURE_32 ('S', 'B', 'i', 's') typedef struct { @@ -121,4 +123,65 @@ SmbiosTableConstruction ( BOOLEAN Smbios64BitTable ); =20 +/** + Validates a SMBIOS 3.0 table entry point. + + @param TableEntry The SmBios table entry to validate. + @param TableAddress On exit, point to the smbios table addres. + @param TableMaximumSize On exit, point to the maximum size of the table. + + @retval TRUE SMBIOS table entry point is valid. + @retval FALSE SMBIOS table entry point is malformed. + +**/ +STATIC +BOOLEAN +IsValidSmbios30Table ( + IN VOID *TableEntry, + OUT VOID **TableAddress, + OUT UINTN *TableMaximumSize + ); + +/** + Validates a SMBIOS 2.0 table entry point. + + @param TableEntry The SmBios table entry to validate. + @param TableAddress On exit, point to the smbios table addres. + @param TableMaximumSize On exit, point to the maximum size of the table. + + @retval TRUE SMBIOS table entry point is valid. + @retval FALSE SMBIOS table entry point is malformed. + +**/ +STATIC +BOOLEAN +IsValidSmbios20Table ( + IN VOID *TableEntry, + OUT VOID **TableAddress, + OUT UINTN *TableMaximumSize + ); + +/** + Validates a SMBIOS table entry point. + + @param TableEntry The SmBios table entry to validate. + @param TableAddress On exit, point to the smbios table addres. + @param TableMaximumSize On exit, point to the maximum size of the table. + + @retval TRUE SMBIOS table entry point is valid. + @retval FALSE SMBIOS table entry point is malformed. + +**/ +typedef +BOOLEAN +(* IS_SMBIOS_TABLE_VALID) ( + IN VOID *TableEntry, + OUT VOID **TableAddress, + OUT UINTN *TableMaximumSize + ); +typedef struct { + EFI_GUID *Guid; + IS_SMBIOS_TABLE_VALID IsValid; +} IS_SMBIOS_TABLE_VALID_ENTRY; + #endif diff --git a/MdeModulePkg/Universal/SmbiosDxe/SmbiosDxe.inf b/MdeModulePkg/= Universal/SmbiosDxe/SmbiosDxe.inf index f6c036e1dc..c03915a692 100644 --- a/MdeModulePkg/Universal/SmbiosDxe/SmbiosDxe.inf +++ b/MdeModulePkg/Universal/SmbiosDxe/SmbiosDxe.inf @@ -1,7 +1,7 @@ ## @file # This driver initializes and installs the SMBIOS protocol, constructs SMB= IOS table into system configuration table. # -# Copyright (c) 2009 - 2018, Intel Corporation. All rights reserved.
+# Copyright (c) 2009 - 2021, Intel Corporation. All rights reserved.
# # SPDX-License-Identifier: BSD-2-Clause-Patent # @@ -41,6 +41,7 @@ UefiDriverEntryPoint DebugLib PcdLib + HobLib =20 [Protocols] gEfiSmbiosProtocolGuid ## PRODUCES @@ -48,6 +49,8 @@ [Guids] gEfiSmbiosTableGuid ## SOMETIMES_PRODUCES = ## SystemTable gEfiSmbios3TableGuid ## SOMETIMES_PRODUCES = ## SystemTable + gUniversalPayloadSmbios3TableGuid ## CONSUMES = ## HOB + gUniversalPayloadSmbiosTableGuid ## SOMETIMES_CONSUMES = ## HOB =20 [Pcd] gEfiMdeModulePkgTokenSpaceGuid.PcdSmbiosVersion ## CONSUMES --=20 2.30.0.windows.2 -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#76509): https://edk2.groups.io/g/devel/message/76509 Mute This Topic: https://groups.io/mt/83551781/1787277 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org] -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- From nobody Mon Feb 9 09:02:22 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) client-ip=66.175.222.108; envelope-from=bounce+27952+76510+1787277+3901457@groups.io; helo=mail02.groups.io; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce+27952+76510+1787277+3901457@groups.io; dmarc=fail(p=none dis=none) header.from=intel.com ARC-Seal: i=1; a=rsa-sha256; t=1623748372; cv=none; d=zohomail.com; s=zohoarc; b=JCEBuVs5FJXzFucX1KXXBxZAWhvLXawAs1CoyJF42L4jYQykdQ7lhpJZv5daCjG4srH7w7RrwSLwMOtlde+OImcbMSiHm6xdQN83wjohvcb+EK6YM26W/fZfxO2ywZGy+FdmR88Pyn65lxOAK5xQlUp1RZnU+tyzbWvFSzM18Ts= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1623748372; h=Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Reply-To:References:Sender:Subject:To; bh=Svq+r1fKiqMlEjHnubWPwpnZFObkKEbg31O9kxxCsXo=; b=avDYXMg3r0bdmumaAC2WTri8WDAwIWe5AFI8Qdip1UNSZEql8tkiFYHRkfWXaN3BVxn3lkpp1I+Ij1v3PC88buMNcLbN1XpBOVuK9tUUJc+comVZgjuLK8nZVlKdGPmVgZhI1LwUe2Gn3bpJAb/JpE9JubEAzJ1YAk2hZRj2DAk= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce+27952+76510+1787277+3901457@groups.io; dmarc=fail header.from= (p=none dis=none) Received: from mail02.groups.io (mail02.groups.io [66.175.222.108]) by mx.zohomail.com with SMTPS id 1623748372477960.0916984298741; Tue, 15 Jun 2021 02:12:52 -0700 (PDT) Return-Path: X-Received: by 127.0.0.2 with SMTP id fLXhYY1788612xK1fsUDrQE2; Tue, 15 Jun 2021 02:12:52 -0700 X-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 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" X-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" X-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: [edk2-devel] [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> In-Reply-To: <20210615091211.801-1-zhiguang.liu@intel.com> References: <20210615091211.801-1-zhiguang.liu@intel.com> MIME-Version: 1.0 Precedence: Bulk List-Unsubscribe: List-Subscribe: List-Help: Sender: devel@edk2.groups.io List-Id: Mailing-List: list devel@edk2.groups.io; contact devel+owner@edk2.groups.io Reply-To: devel@edk2.groups.io,zhiguang.liu@intel.com X-Gm-Message-State: ucWoXb2JP3tcK6z6TGaCAhLjx1787277AA= Content-Transfer-Encoding: quoted-printable DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=groups.io; q=dns/txt; s=20140610; t=1623748372; bh=h+ESCRgy4u5u/Tx7yMveIErZR5iHm8mHeRHQ8k5yQaU=; h=Cc:Date:From:Reply-To:Subject:To; b=KR4oFAtULJS3LmOvq2wG+HMZmW+ErNRZMiONJ3gFdD0Y+CdQ60hCX9Piywd7ksxEA7+ bj2vYoV4Znn69kHIjdAqrA2fqTU3VDQbOkfdbriGjbZzCtsd5e6R50NEKqMkKz/d2kjU+ ERomnFNkJKRJE7Yrh/y9nuAMq247p9thDtk= X-ZohoMail-DKIM: pass (identity @groups.io) Content-Type: text/plain; charset="utf-8" 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 tables from bootloader. =20 - Copyright (c) 2014 - 2020, Intel Corporation. All rights reserved.
+ Copyright (c) 2014 - 2021, Intel Corporation. All rights reserved.
SPDX-License-Identifier: BSD-2-Clause-Patent =20 **/ @@ -129,15 +129,6 @@ BlDxeEntryPoint ( ASSERT_EFI_ERROR (Status); } =20 - // - // Install Smbios Table - // - if (SystemTableInfo->SmbiosTableBase !=3D 0 && SystemTableInfo->SmbiosTa= bleSize !=3D 0) { - DEBUG ((DEBUG_ERROR, "Install Smbios Table at 0x%lx, length 0x%x\n", S= ystemTableInfo->SmbiosTableBase, SystemTableInfo->SmbiosTableSize)); - Status =3D gBS->InstallConfigurationTable (&gEfiSmbiosTableGuid, (VOID= *)(UINTN)SystemTableInfo->SmbiosTableBase); - ASSERT_EFI_ERROR (Status); - } - // // Find the frame buffer information and update PCDs // 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 @@ # # Report some MMIO/IO resources to dxe core, extract smbios and acpi tables # -# Copyright (c) 2014 - 2020, Intel Corporation. All rights reserved.
+# Copyright (c) 2014 - 2021, Intel Corporation. All rights reserved.
# # SPDX-License-Identifier: BSD-2-Clause-Patent # @@ -43,7 +43,6 @@ =20 [Guids] gEfiAcpiTableGuid - gEfiSmbiosTableGuid gUefiSystemTableInfoGuid gUefiAcpiBoardInfoGuid gEfiGraphicsInfoHobGuid 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 =20 - Copyright (c) 2014 - 2020, Intel Corporation. All rights reserved.
+ Copyright (c) 2014 - 2021, Intel Corporation. All rights reserved.
SPDX-License-Identifier: BSD-2-Clause-Patent =20 **/ @@ -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; =20 // // 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", 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")); =20 // // Create guid hob for acpi board information 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 * -* Copyright (c) 2020, Intel Corporation. All rights reserved.
+* Copyright (c) 2021, Intel Corporation. All rights reserved.
* * SPDX-License-Identifier: BSD-2-Clause-Patent * @@ -31,6 +31,7 @@ #include #include #include +#include =20 =20 #define LEGACY_8259_MASK_REGISTER_MASTER 0x21 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 # This is the first module for UEFI payload. # -# Copyright (c) 2006 - 2020, Intel Corporation. All rights reserved.
+# Copyright (c) 2006 - 2021, Intel Corporation. All rights reserved.
# Copyright (c) 2017, AMD Incorporated. All rights reserved.
# # SPDX-License-Identifier: BSD-2-Clause-Patent @@ -64,6 +64,7 @@ gEfiGraphicsInfoHobGuid gEfiGraphicsDeviceInfoHobGuid gUefiAcpiBoardInfoGuid + gUniversalPayloadSmbiosTableGuid =20 [FeaturePcd.IA32] gEfiMdeModulePkgTokenSpaceGuid.PcdDxeIplSwitchToLongMode ## CONSUMES --=20 2.30.0.windows.2 -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#76510): https://edk2.groups.io/g/devel/message/76510 Mute This Topic: https://groups.io/mt/83551799/1787277 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org] -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- From nobody Mon Feb 9 09:02:22 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) client-ip=66.175.222.108; envelope-from=bounce+27952+76511+1787277+3901457@groups.io; helo=mail02.groups.io; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce+27952+76511+1787277+3901457@groups.io; dmarc=fail(p=none dis=none) header.from=intel.com ARC-Seal: i=1; a=rsa-sha256; t=1623748373; cv=none; d=zohomail.com; s=zohoarc; b=nxn/YHIo7qyvevpJWzzQ3brKVrwkQDnbDUWAgHMPREwkaeUUoL28RGbX0tNUSopzEKiMPaGYaC6XNGPRTc073kZ84KVq1x/7gKd+8GJVgnDEk9m2EeSv4jMA+tQ2t8CzOYbcakGhOQti4dDETDOZDu1dHycyqXGYStRqVbSA9hE= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1623748373; h=Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Reply-To:References:Sender:Subject:To; bh=w/MD5M43EO3SgxxljMQfc51jgBfDTCcYq+svifEnHqI=; b=B9oKEqxdPXgRQDBySPSAmcz0NoFm7AOElORKYEAAV/FJVgE6x3374exzDFB9we3lPUpvNyNfZEs1F8Be2yJUFaf/2YzrJ/TeJ5OEtdNSqRgr2XX49zWw93wzcEEN1QIW6MeR1eiaa7jJqBixv38nLiC8C9ABjIGCgrMUgLTy2ag= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce+27952+76511+1787277+3901457@groups.io; dmarc=fail header.from= (p=none dis=none) Received: from mail02.groups.io (mail02.groups.io [66.175.222.108]) by mx.zohomail.com with SMTPS id 1623748373753639.9377240840263; Tue, 15 Jun 2021 02:12:53 -0700 (PDT) Return-Path: X-Received: by 127.0.0.2 with SMTP id ZN0BYY1788612xoL6uQtYxzr; Tue, 15 Jun 2021 02:12:53 -0700 X-Received: from mga12.intel.com (mga12.intel.com []) by mx.groups.io with SMTP id smtpd.web11.6831.1623748371467770763 for ; Tue, 15 Jun 2021 02:12:52 -0700 IronPort-SDR: /CdAMxm0hfWWP6+FnutrP21lkrniviasYuGrPXrMrP7BseP7sF9HARJYEybJLNlBkTwHXlWPDo P4TjMBqz/cDA== X-IronPort-AV: E=McAfee;i="6200,9189,10015"; a="185647639" X-IronPort-AV: E=Sophos;i="5.83,275,1616482800"; d="scan'208";a="185647639" X-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:33 -0700 IronPort-SDR: IG3bJg0lWdc2XAst2X08TFnIsiTRfQhOzPzPjFXojBxUJ9vYfdlruX9ZOEfvaSnoiyZwDZChcT OxK5d6aYi/tA== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.83,275,1616482800"; d="scan'208";a="487713216" X-Received: from fieedk002.ccr.corp.intel.com ([10.239.158.144]) by fmsmga002.fm.intel.com with ESMTP; 15 Jun 2021 02:12:32 -0700 From: "Zhiguang Liu" To: devel@edk2.groups.io Cc: Michael D Kinney , Liming Gao , Jian J Wang , Hao A Wu Subject: [edk2-devel] [Patch V5 7/9] MdeModulePkg: Add new structure for the Universal Payload ACPI Table Hob Date: Tue, 15 Jun 2021 17:12:09 +0800 Message-Id: <20210615091211.801-8-zhiguang.liu@intel.com> In-Reply-To: <20210615091211.801-1-zhiguang.liu@intel.com> References: <20210615091211.801-1-zhiguang.liu@intel.com> MIME-Version: 1.0 Precedence: Bulk List-Unsubscribe: List-Subscribe: List-Help: Sender: devel@edk2.groups.io List-Id: Mailing-List: list devel@edk2.groups.io; contact devel+owner@edk2.groups.io Reply-To: devel@edk2.groups.io,zhiguang.liu@intel.com X-Gm-Message-State: 8TsW17LPlprEIUeUAAIBGSjzx1787277AA= Content-Transfer-Encoding: quoted-printable DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=groups.io; q=dns/txt; s=20140610; t=1623748373; bh=JRZlNbdSWId7U6xecHPO3sgGgiqIn6mEuycJyJalhIg=; h=Cc:Date:From:Reply-To:Subject:To; b=gaLXGSYRoNL24qKyDxiBo2WZ9WrNQKYaavcusPztIIPFSU0GF4aqxfYSUhEIfCk6DS2 +g4oz54bXZ8OsHl7Wjj+NVtu440J1e1SfBS2UOaDGj8OZVyhOH0D1v+uE0nwdHvfx5ovm AoAz0hCvWclVdzYbZe1cfZONK4Vx0C7eGYA= X-ZohoMail-DKIM: pass (identity @groups.io) Content-Type: text/plain; charset="utf-8" Cc: Michael D Kinney Cc: Liming Gao Cc: Jian J Wang Cc: Hao A Wu Reviewed-by: Hao A Wu Signed-off-by: Zhiguang Liu --- MdeModulePkg/Include/UniversalPayload/AcpiTable.h | 30 +++++++++++++++++++= +++++++++++ MdeModulePkg/MdeModulePkg.dec | 3 +++ 2 files changed, 33 insertions(+) diff --git a/MdeModulePkg/Include/UniversalPayload/AcpiTable.h b/MdeModuleP= kg/Include/UniversalPayload/AcpiTable.h new file mode 100644 index 0000000000..33ef72637e --- /dev/null +++ b/MdeModulePkg/Include/UniversalPayload/AcpiTable.h @@ -0,0 +1,30 @@ +/** @file + Define the structure for the Universal Payload APCI table. + +Copyright (c) 2021, Intel Corporation. All rights reserved.
+SPDX-License-Identifier: BSD-2-Clause-Patent + + @par Revision Reference: + - Universal Payload Specification 0.75 (https://universalpayload.githu= b.io/documentation/) +**/ + +#ifndef UNIVERSAL_PAYLOAD_ACPI_TABLE_H_ +#define UNIVERSAL_PAYLOAD_ACPI_TABLE_H_ + +#include +#include + +#pragma pack(1) + +typedef struct { + UNIVERSAL_PAYLOAD_GENERIC_HEADER Header; + EFI_PHYSICAL_ADDRESS Rsdp; +} UNIVERSAL_PAYLOAD_ACPI_TABLE; + +#pragma pack() + +#define UNIVERSAL_PAYLOAD_ACPI_TABLE_REVISION 1 + +extern GUID gUniversalPayloadAcpiTableGuid; + +#endif // UNIVERSAL_PAYLOAD_ACPI_TABLE_H_ diff --git a/MdeModulePkg/MdeModulePkg.dec b/MdeModulePkg/MdeModulePkg.dec index 377e868e7c..8c0885955b 100644 --- a/MdeModulePkg/MdeModulePkg.dec +++ b/MdeModulePkg/MdeModulePkg.dec @@ -416,6 +416,9 @@ ## Include/UniversalPayload/SmbiosTable.h gUniversalPayloadSmbiosTableGuid =3D { 0x590a0d26, 0x06e5, 0x4d20, { 0x8= a, 0x82, 0x59, 0xea, 0x1b, 0x34, 0x98, 0x2d } } =20 + ## Include/UniversalPayload/AcpiTable.h + gUniversalPayloadAcpiTableGuid =3D { 0x9f9a9506, 0x5597, 0x4515, { 0xba,= 0xb6, 0x8b, 0xcd, 0xe7, 0x84, 0xba, 0x87 } } + [Ppis] ## Include/Ppi/AtaController.h gPeiAtaControllerPpiGuid =3D { 0xa45e60d1, 0xc719, 0x44aa, { 0xb0,= 0x7a, 0xaa, 0x77, 0x7f, 0x85, 0x90, 0x6d }} --=20 2.30.0.windows.2 -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#76511): https://edk2.groups.io/g/devel/message/76511 Mute This Topic: https://groups.io/mt/83551800/1787277 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org] -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- From nobody Mon Feb 9 09:02:22 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) client-ip=66.175.222.108; envelope-from=bounce+27952+76512+1787277+3901457@groups.io; helo=mail02.groups.io; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce+27952+76512+1787277+3901457@groups.io; dmarc=fail(p=none dis=none) header.from=intel.com ARC-Seal: i=1; a=rsa-sha256; t=1623748379; cv=none; d=zohomail.com; s=zohoarc; b=BinDdaVKFxjEvfI3vgUcw81ylRDJSEil3Zf2U03G9NpMkwc5vsuKDRObytJbCCehO9Y3rEqG37N3LD0S/yuCcYW4++7yiCdJKRirM2YJlz/792Pd9XfYU3G3HCwWc/jMdUNZ9a+rz0amcW+W7H1x4xCAG2GvGT8UV+7EIIV79Fc= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1623748379; h=Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Reply-To:References:Sender:Subject:To; bh=3r1xj9EvQd+m9sSTbR3f34EjlCTW/bKcbeTfDvDxKBQ=; b=BuHodE3TB9MXFYJ78Nic7dNVcAhwhFbHpz+nefOw8RsGe3JaedrSSZfic7HClLXSd0m8XrYh1C/1MtdtP1jOEEYSJXJkcD3TxZj1R98ieHzUCpDv38D7jiEssqaXu/0NAmEPWfLMDJJQNHgw1xo3kn88nZfnqEVFSgSAnwNhbBg= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce+27952+76512+1787277+3901457@groups.io; dmarc=fail header.from= (p=none dis=none) Received: from mail02.groups.io (mail02.groups.io [66.175.222.108]) by mx.zohomail.com with SMTPS id 1623748379046440.1621192864874; Tue, 15 Jun 2021 02:12:59 -0700 (PDT) Return-Path: X-Received: by 127.0.0.2 with SMTP id zOmSYY1788612x5204SJ3QMo; Tue, 15 Jun 2021 02:12:58 -0700 X-Received: from mga12.intel.com (mga12.intel.com []) by mx.groups.io with SMTP id smtpd.web11.6831.1623748371467770763 for ; Tue, 15 Jun 2021 02:12:53 -0700 IronPort-SDR: 8792uOYISETiDkZlBG069XFQoLg5N/tWNNaSKk4nKSrKnWQ3gYrAAeLdSE5pJsDAvEzL35rhUH FOvnsvDbbocA== X-IronPort-AV: E=McAfee;i="6200,9189,10015"; a="185647649" X-IronPort-AV: E=Sophos;i="5.83,275,1616482800"; d="scan'208";a="185647649" X-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:35 -0700 IronPort-SDR: /C+5FA7eF7xVLVNRgxtoUiqq+2DWyn/V+XCAo5GPmWLBBf7A6J697R6BCqW8v/JQ5la7FF5hqr AqgLmIFzLEew== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.83,275,1616482800"; d="scan'208";a="487713226" X-Received: from fieedk002.ccr.corp.intel.com ([10.239.158.144]) by fmsmga002.fm.intel.com with ESMTP; 15 Jun 2021 02:12:33 -0700 From: "Zhiguang Liu" To: devel@edk2.groups.io Cc: Jian J Wang , Hao A Wu , Dandan Bi , Liming Gao , Ray Ni Subject: [edk2-devel] [Patch V5 8/9] MdeModulePkg/ACPI: Install ACPI table from HOB. Date: Tue, 15 Jun 2021 17:12:10 +0800 Message-Id: <20210615091211.801-9-zhiguang.liu@intel.com> In-Reply-To: <20210615091211.801-1-zhiguang.liu@intel.com> References: <20210615091211.801-1-zhiguang.liu@intel.com> MIME-Version: 1.0 Precedence: Bulk List-Unsubscribe: List-Subscribe: List-Help: Sender: devel@edk2.groups.io List-Id: Mailing-List: list devel@edk2.groups.io; contact devel+owner@edk2.groups.io Reply-To: devel@edk2.groups.io,zhiguang.liu@intel.com X-Gm-Message-State: jJ5alSd6SnFDXW874ySEzY78x1787277AA= Content-Transfer-Encoding: quoted-printable DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=groups.io; q=dns/txt; s=20140610; t=1623748378; bh=1LvKAY8A2IEAIJQN/3TwNA1W4+pM8Lr+fJ0ebU8SGEE=; h=Cc:Date:From:Reply-To:Subject:To; b=KZ9N7nCzdmjg5AbnV9ywxtqfuOv38zIa5vWK3R66mlm6NbCR3B0DSbywkJl1uY0HTOG 1HrpnB7LbjzcbjsczehbcDcihwoUO6HZOAGppUj1sqlS+7MFsMuGTSzimtG/6DtFlBLMJ NeEhDMUiOY7TLOeVLPeJu/kM3aMp5YZ1tPI= X-ZohoMail-DKIM: pass (identity @groups.io) Content-Type: text/plain; charset="utf-8" If HOB contains APCI table information, entry point of AcpiTableDxe.inf should parse the APCI table from HOB, and install these tables. We assume the whole ACPI table (starting with EFI_ACPI_2_0_ROOT_SYSTEM_DESCRIPTION_POINTER) is contained by a single gEfiAcpiTableGuid HOB. If error happens when installing ACPI table, stop installing and removing all the tables that are already added. Cc: Jian J Wang Cc: Hao A Wu Cc: Dandan Bi Cc: Liming Gao Cc: Ray Ni Reviewed-by: Hao A Wu Signed-off-by: Zhiguang Liu --- MdeModulePkg/Universal/Acpi/AcpiTableDxe/AcpiSdt.c | 92 +++++++= ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++-----------------= ---------- MdeModulePkg/Universal/Acpi/AcpiTableDxe/AcpiTable.h | 38 +++++++= ++++++++++++++++++++++++++++++- MdeModulePkg/Universal/Acpi/AcpiTableDxe/AcpiTableDxe.inf | 8 +++++--- MdeModulePkg/Universal/Acpi/AcpiTableDxe/AcpiTableProtocol.c | 171 +++++++= +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++= +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++= +++++++------- 4 files changed, 271 insertions(+), 38 deletions(-) diff --git a/MdeModulePkg/Universal/Acpi/AcpiTableDxe/AcpiSdt.c b/MdeModule= Pkg/Universal/Acpi/AcpiTableDxe/AcpiSdt.c index 14ced68e64..d98573d613 100644 --- a/MdeModulePkg/Universal/Acpi/AcpiTableDxe/AcpiSdt.c +++ b/MdeModulePkg/Universal/Acpi/AcpiTableDxe/AcpiSdt.c @@ -1,7 +1,7 @@ /** @file ACPI Sdt Protocol Driver =20 - Copyright (c) 2010 - 2018, Intel Corporation. All rights reserved.
+ Copyright (c) 2010 - 2021, Intel Corporation. All rights reserved.
SPDX-License-Identifier: BSD-2-Clause-Patent =20 **/ @@ -191,8 +191,7 @@ SdtNotifyAcpiList ( /** Returns a requested ACPI table. =20 - The GetAcpiTable() function returns a pointer to a buffer containing the= ACPI table associated - with the Index that was input. The following structures are not consider= ed elements in the list of + The following structures are not considered elements in the list of ACPI tables: - Root System Description Pointer (RSD_PTR) - Root System Description Table (RSDT) @@ -201,42 +200,32 @@ SdtNotifyAcpiList ( member. For tables installed via the EFI_ACPI_TABLE_PROTOCOL.InstallAcpi= Table() interface, the function returns the value of EFI_ACPI_STD_PROTOCOL.AcpiVersion. =20 - @param[in] Index The zero-based index of the table to retrieve. - @param[out] Table Pointer for returning the table buffer. - @param[out] Version On return, updated with the ACPI versions to w= hich this table belongs. Type - EFI_ACPI_TABLE_VERSION is defined in "Related = Definitions" in the - EFI_ACPI_SDT_PROTOCOL. - @param[out] TableKey On return, points to the table key for the spe= cified ACPI system definition table. - This is identical to the table key used in the= EFI_ACPI_TABLE_PROTOCOL. - The TableKey can be passed to EFI_ACPI_TABLE_P= ROTOCOL.UninstallAcpiTable() - to uninstall the table. - @retval EFI_SUCCESS The function completed successfully. - @retval EFI_NOT_FOUND The requested index is too large and a table w= as not found. + @param[in] AcpiTableInstance ACPI table Instance. + @param[in] Index The zero-based index of the table to re= trieve. + @param[out] Table Pointer for returning the table buffer. + @param[out] Version On return, updated with the ACPI versio= ns to which this table belongs. Type + EFI_ACPI_TABLE_VERSION is defined in "R= elated Definitions" in the + EFI_ACPI_SDT_PROTOCOL. + @param[out] TableKey On return, points to the table key for = the specified ACPI system definition table. + This is identical to the table key used= in the EFI_ACPI_TABLE_PROTOCOL. + The TableKey can be passed to EFI_ACPI_= TABLE_PROTOCOL.UninstallAcpiTable() + to uninstall the table. + @retval EFI_SUCCESS The function completed successfully. + @retval EFI_NOT_FOUND The requested index is too large and a = table was not found. **/ EFI_STATUS -EFIAPI -GetAcpiTable2 ( +SdtGetAcpiTable ( + IN EFI_ACPI_TABLE_INSTANCE *AcpiTableInstance, IN UINTN Index, OUT EFI_ACPI_SDT_HEADER **Table, OUT EFI_ACPI_TABLE_VERSION *Version, OUT UINTN *TableKey ) { - EFI_ACPI_TABLE_INSTANCE *AcpiTableInstance; UINTN TableIndex; LIST_ENTRY *CurrentLink; LIST_ENTRY *StartLink; EFI_ACPI_TABLE_LIST *CurrentTable; - - ASSERT (Table !=3D NULL); - ASSERT (Version !=3D NULL); - ASSERT (TableKey !=3D NULL); - - // - // Get the instance of the ACPI Table - // - AcpiTableInstance =3D SdtGetAcpiTableInstance (); - // // Find the table // @@ -270,6 +259,55 @@ GetAcpiTable2 ( return EFI_SUCCESS; } =20 +/** + Returns a requested ACPI table. + + The GetAcpiTable() function returns a pointer to a buffer containing the= ACPI table associated + with the Index that was input. The following structures are not consider= ed elements in the list of + ACPI tables: + - Root System Description Pointer (RSD_PTR) + - Root System Description Table (RSDT) + - Extended System Description Table (XSDT) + Version is updated with a bit map containing all the versions of ACPI of= which the table is a + member. For tables installed via the EFI_ACPI_TABLE_PROTOCOL.InstallAcpi= Table() interface, + the function returns the value of EFI_ACPI_STD_PROTOCOL.AcpiVersion. + + @param[in] Index The zero-based index of the table to retrieve. + @param[out] Table Pointer for returning the table buffer. + @param[out] Version On return, updated with the ACPI versions to w= hich this table belongs. Type + EFI_ACPI_TABLE_VERSION is defined in "Related = Definitions" in the + EFI_ACPI_SDT_PROTOCOL. + @param[out] TableKey On return, points to the table key for the spe= cified ACPI system definition table. + This is identical to the table key used in the= EFI_ACPI_TABLE_PROTOCOL. + The TableKey can be passed to EFI_ACPI_TABLE_P= ROTOCOL.UninstallAcpiTable() + to uninstall the table. + @retval EFI_SUCCESS The function completed successfully. + @retval EFI_NOT_FOUND The requested index is too large and a table w= as not found. +**/ +EFI_STATUS +EFIAPI +GetAcpiTable2 ( + IN UINTN Index, + OUT EFI_ACPI_SDT_HEADER **Table, + OUT EFI_ACPI_TABLE_VERSION *Version, + OUT UINTN *TableKey + ) +{ + EFI_ACPI_TABLE_INSTANCE *AcpiTableInstance; + + ASSERT (Table !=3D NULL); + ASSERT (Version !=3D NULL); + ASSERT (TableKey !=3D NULL); + + // + // Get the instance of the ACPI Table + // + AcpiTableInstance =3D SdtGetAcpiTableInstance (); + + return SdtGetAcpiTable (AcpiTableInstance, Index, Table, Version, TableK= ey); +} + + /** Register a callback when an ACPI table is installed. =20 diff --git a/MdeModulePkg/Universal/Acpi/AcpiTableDxe/AcpiTable.h b/MdeModu= lePkg/Universal/Acpi/AcpiTableDxe/AcpiTable.h index 9d7cf7ccfc..0af2d11a1a 100644 --- a/MdeModulePkg/Universal/Acpi/AcpiTableDxe/AcpiTable.h +++ b/MdeModulePkg/Universal/Acpi/AcpiTableDxe/AcpiTable.h @@ -1,7 +1,7 @@ /** @file ACPI Table Protocol Driver =20 - Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.
+ Copyright (c) 2006 - 2021, Intel Corporation. All rights reserved.
SPDX-License-Identifier: BSD-2-Clause-Patent =20 **/ @@ -24,6 +24,8 @@ #include #include #include +#include +#include =20 // // Statements that include other files @@ -228,6 +230,40 @@ SdtAcpiTableAcpiSdtConstructor ( IN EFI_ACPI_TABLE_INSTANCE *AcpiTableInstance ); =20 +/** + Returns a requested ACPI table. + + The following structures are not considered elements in the list of + ACPI tables: + - Root System Description Pointer (RSD_PTR) + - Root System Description Table (RSDT) + - Extended System Description Table (XSDT) + Version is updated with a bit map containing all the versions of ACPI of= which the table is a + member. For tables installed via the EFI_ACPI_TABLE_PROTOCOL.InstallAcpi= Table() interface, + the function returns the value of EFI_ACPI_STD_PROTOCOL.AcpiVersion. + + @param[in] AcpiTableInstance ACPI table Instance. + @param[in] Index The zero-based index of the table to re= trieve. + @param[out] Table Pointer for returning the table buffer. + @param[out] Version On return, updated with the ACPI versio= ns to which this table belongs. Type + EFI_ACPI_TABLE_VERSION is defined in "R= elated Definitions" in the + EFI_ACPI_SDT_PROTOCOL. + @param[out] TableKey On return, points to the table key for = the specified ACPI system definition table. + This is identical to the table key used= in the EFI_ACPI_TABLE_PROTOCOL. + The TableKey can be passed to EFI_ACPI_= TABLE_PROTOCOL.UninstallAcpiTable() + to uninstall the table. + @retval EFI_SUCCESS The function completed successfully. + @retval EFI_NOT_FOUND The requested index is too large and a = table was not found. +**/ +EFI_STATUS +SdtGetAcpiTable ( + IN EFI_ACPI_TABLE_INSTANCE *AcpiTableInstance, + IN UINTN Index, + OUT EFI_ACPI_SDT_HEADER **Table, + OUT EFI_ACPI_TABLE_VERSION *Version, + OUT UINTN *TableKey + ); + // // export PrivateData symbol, because we need that in AcpiSdtProtol implem= entation // diff --git a/MdeModulePkg/Universal/Acpi/AcpiTableDxe/AcpiTableDxe.inf b/Md= eModulePkg/Universal/Acpi/AcpiTableDxe/AcpiTableDxe.inf index d341df439e..86dea43e27 100644 --- a/MdeModulePkg/Universal/Acpi/AcpiTableDxe/AcpiTableDxe.inf +++ b/MdeModulePkg/Universal/Acpi/AcpiTableDxe/AcpiTableDxe.inf @@ -4,7 +4,7 @@ # This driver initializes ACPI tables (Rsdp, Rsdt and Xsdt) and produces = UEFI/PI # services to install/uninstall/manage ACPI tables. # -# Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.
+# Copyright (c) 2006 - 2021, Intel Corporation. All rights reserved.
# Copyright (c) 2016, Linaro Ltd. All rights reserved.
# SPDX-License-Identifier: BSD-2-Clause-Patent # @@ -51,10 +51,12 @@ DebugLib BaseLib PcdLib + HobLib =20 [Guids] - gEfiAcpi10TableGuid ## PRODUCES ## SystemTable - gEfiAcpiTableGuid ## PRODUCES ## SystemTable + gEfiAcpi10TableGuid ## PRODUCES ## S= ystemTable + gEfiAcpiTableGuid ## PRODUCES ## S= ystemTable + gUniversalPayloadAcpiTableGuid ## SOMETIMES_CONSUMES ## H= OB =20 [FeaturePcd] gEfiMdeModulePkgTokenSpaceGuid.PcdInstallAcpiSdtProtocol ## CONSUMES diff --git a/MdeModulePkg/Universal/Acpi/AcpiTableDxe/AcpiTableProtocol.c b= /MdeModulePkg/Universal/Acpi/AcpiTableDxe/AcpiTableProtocol.c index 5a2afdff27..34d4a1cec0 100644 --- a/MdeModulePkg/Universal/Acpi/AcpiTableDxe/AcpiTableProtocol.c +++ b/MdeModulePkg/Universal/Acpi/AcpiTableDxe/AcpiTableProtocol.c @@ -1,7 +1,7 @@ /** @file ACPI Table Protocol Implementation =20 - Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.
+ Copyright (c) 2006 - 2021, Intel Corporation. All rights reserved.
Copyright (c) 2016, Linaro Ltd. All rights reserved.
SPDX-License-Identifier: BSD-2-Clause-Patent =20 @@ -30,6 +30,7 @@ STATIC EFI_ALLOCATE_TYPE mAcpiTableAllocType; @param Table Table to add. @param Checksum Does the table require checksumming. @param Version The version of the list to add the tab= le to. + @param IsFromHob True, if add Apci Table from Hob List. @param Handle Pointer for returning the handle. =20 @return EFI_SUCCESS The function completed successfully. @@ -44,6 +45,7 @@ AddTableToList ( IN VOID *Table, IN BOOLEAN Checksum, IN EFI_ACPI_TABLE_VERSION Version, + IN BOOLEAN IsFromHob, OUT UINTN *Handle ); =20 @@ -238,6 +240,7 @@ InstallAcpiTable ( AcpiTableBufferConst, TRUE, Version, + FALSE, TableKey ); if (!EFI_ERROR (Status)) { @@ -472,6 +475,7 @@ FreeTableMemory ( @param Table Table to add. @param Checksum Does the table require checksumming. @param Version The version of the list to add the tab= le to. + @param IsFromHob True, if add Apci Table from Hob List. @param Handle Pointer for returning the handle. =20 @return EFI_SUCCESS The function completed successfully. @@ -487,6 +491,7 @@ AddTableToList ( IN VOID *Table, IN BOOLEAN Checksum, IN EFI_ACPI_TABLE_VERSION Version, + IN BOOLEAN IsFromHob, OUT UINTN *Handle ) { @@ -553,12 +558,17 @@ AddTableToList ( // SMM communication ACPI table. // ASSERT ((EFI_PAGE_SIZE % 64) =3D=3D 0); - Status =3D gBS->AllocatePages ( - AllocateMaxAddress, - EfiACPIMemoryNVS, - EFI_SIZE_TO_PAGES (CurrentTableList->TableSize), - &AllocPhysAddress - ); + if (IsFromHob){ + AllocPhysAddress =3D (UINTN)Table; + Status =3D EFI_SUCCESS; + } else { + Status =3D gBS->AllocatePages ( + AllocateMaxAddress, + EfiACPIMemoryNVS, + EFI_SIZE_TO_PAGES (CurrentTableList->TableSize), + &AllocPhysAddress + ); + } } else if (mAcpiTableAllocType =3D=3D AllocateAnyPages) { // // If there is no allocation limit, there is also no need to use page @@ -1689,6 +1699,151 @@ ChecksumCommonTables ( return EFI_SUCCESS; } =20 +/** + This function will find gUniversalPayloadAcpiTableGuid Guid Hob, and ins= tall Acpi table from it. + + @param AcpiTableInstance Protocol instance private data. + + @return EFI_SUCCESS The function completed successfully. + @return EFI_NOT_FOUND The function doesn't find the gEfiAcpiTableGu= id Guid Hob. + @return EFI_ABORTED The function could not complete successfully. + +**/ +EFI_STATUS +InstallAcpiTableFromHob ( + EFI_ACPI_TABLE_INSTANCE *AcpiTableInstance + ) +{ + EFI_HOB_GUID_TYPE *GuidHob; + EFI_ACPI_TABLE_VERSION Version; + EFI_ACPI_3_0_ROOT_SYSTEM_DESCRIPTION_POINTER *Rsdp; + EFI_ACPI_DESCRIPTION_HEADER *Rsdt; + EFI_ACPI_DESCRIPTION_HEADER *ChildTable; + UINT64 ChildTableAddress; + UINTN Count; + UINTN Index; + UINTN TableKey; + EFI_STATUS Status; + UINTN EntrySize; + UNIVERSAL_PAYLOAD_ACPI_TABLE *AcpiTableAdress; + VOID *TableToInstall; + EFI_ACPI_SDT_HEADER *Table; + UNIVERSAL_PAYLOAD_GENERIC_HEADER *GenericHeader; + + TableKey =3D 0; + Version =3D PcdGet32 (PcdAcpiExposedTableVersions); + Status =3D EFI_SUCCESS; + // + // HOB only contains the ACPI table in 2.0+ format. + // + GuidHob =3D GetFirstGuidHob (&gUniversalPayloadAcpiTableGuid); + if (GuidHob =3D=3D NULL) { + return EFI_NOT_FOUND; + } + + GenericHeader =3D (UNIVERSAL_PAYLOAD_GENERIC_HEADER *) GET_GUID_HOB_DATA= (GuidHob); + if ((sizeof (UNIVERSAL_PAYLOAD_GENERIC_HEADER) > GET_GUID_HOB_DATA_SIZE = (GuidHob)) || (GenericHeader->Length > GET_GUID_HOB_DATA_SIZE (GuidHob))) { + return EFI_NOT_FOUND; + } + if (GenericHeader->Revision =3D=3D UNIVERSAL_PAYLOAD_ACPI_TABLE_REVISION= ) { + // + // UNIVERSAL_PAYLOAD_ACPI_TABLE structure is used when Revision equals= to UNIVERSAL_PAYLOAD_ACPI_TABLE_REVISION + // + AcpiTableAdress =3D (UNIVERSAL_PAYLOAD_ACPI_TABLE *) GET_GUID_HOB_DATA= (GuidHob); + if (AcpiTableAdress->Header.Length < UNIVERSAL_PAYLOAD_SIZEOF_THROUGH_= FIELD (UNIVERSAL_PAYLOAD_ACPI_TABLE, Rsdp)) { + // + // Retrun if can't find the ACPI Info Hob with enough length + // + return EFI_NOT_FOUND; + } + Rsdp =3D (EFI_ACPI_3_0_ROOT_SYSTEM_DESCRIPTION_POINTER *) (UINTN) (Acp= iTableAdress->Rsdp); + + // + // An ACPI-compatible OS must use the XSDT if present. + // It shouldn't happen that XsdtAddress points beyond 4G range in 32-b= it environment. + // + ASSERT ((UINTN) Rsdp->XsdtAddress =3D=3D Rsdp->XsdtAddress); + + EntrySize =3D sizeof (UINT64); + Rsdt =3D (EFI_ACPI_DESCRIPTION_HEADER *) (UINTN) Rsdp->XsdtAddress; + if (Rsdt =3D=3D NULL) { + // + // XsdtAddress is zero, then we use Rsdt which has 32 bit entry + // + Rsdt =3D (EFI_ACPI_DESCRIPTION_HEADER *) (UINTN) Rsdp->RsdtAddress; + EntrySize =3D sizeof (UINT32); + } + + if (Rsdt->Length <=3D sizeof (EFI_ACPI_DESCRIPTION_HEADER)) { + return EFI_ABORTED; + } + + Count =3D (Rsdt->Length - sizeof (EFI_ACPI_DESCRIPTION_HEADER)) / Entr= ySize; + + for (Index =3D 0; Index < Count; Index++){ + ChildTableAddress =3D 0; + CopyMem (&ChildTableAddress, (UINT8 *) (Rsdt + 1) + EntrySize * Inde= x, EntrySize); + // + // If the address is of UINT64 while this module runs at 32 bits, + // make sure the upper bits are all-zeros. + // + ASSERT (ChildTableAddress =3D=3D (UINTN) ChildTableAddress); + if (ChildTableAddress !=3D (UINTN) ChildTableAddress) { + Status =3D EFI_ABORTED; + break; + } + + ChildTable =3D (EFI_ACPI_DESCRIPTION_HEADER *) (UINTN) ChildTableAdd= ress; + Status =3D AddTableToList (AcpiTableInstance, ChildTable, TRUE, Vers= ion, TRUE, &TableKey); + if (EFI_ERROR (Status)) { + DEBUG ((DEBUG_ERROR, "InstallAcpiTableFromHob: Fail to add ACPI ta= ble at 0x%p\n", ChildTable)); + ASSERT_EFI_ERROR (Status); + break; + } + if (ChildTable->Signature =3D=3D EFI_ACPI_3_0_FIXED_ACPI_DESCRIPTION= _TABLE_SIGNATURE){ + // + // Add the FACS and DSDT tables if it is not NULL. + // + if (((EFI_ACPI_3_0_FIXED_ACPI_DESCRIPTION_TABLE *) ChildTable)->Fi= rmwareCtrl !=3D 0) { + TableToInstall =3D (VOID *) (UINTN) ((EFI_ACPI_3_0_FIXED_ACPI_DE= SCRIPTION_TABLE *) ChildTable)->FirmwareCtrl; + Status =3D AddTableToList (AcpiTableInstance, TableToInstall, TR= UE, Version, TRUE, &TableKey); + if (EFI_ERROR (Status)) { + DEBUG ((DEBUG_ERROR, "InstallAcpiTableFromHob: Fail to add ACP= I table FACS\n")); + ASSERT_EFI_ERROR (Status); + break; + } + } + + if (((EFI_ACPI_3_0_FIXED_ACPI_DESCRIPTION_TABLE *) ChildTable)->Ds= dt !=3D 0) { + TableToInstall =3D (VOID *) (UINTN) ((EFI_ACPI_3_0_FIXED_ACPI_DE= SCRIPTION_TABLE *) ChildTable)->Dsdt; + Status =3D AddTableToList (AcpiTableInstance, TableToInstall, TR= UE, Version, TRUE, &TableKey); + if (EFI_ERROR (Status)) { + DEBUG ((DEBUG_ERROR, "InstallAcpiTableFromHob: Fail to add ACP= I table DSDT\n")); + ASSERT_EFI_ERROR (Status); + break; + } + } + } + } + } else { + return EFI_NOT_FOUND; + } + + if (EFI_ERROR (Status)) { + // + // Error happens when trying to add ACPI table to the list. + // Remove all of them from list because at this time, no other tables = except from HOB are in the list + // + while (SdtGetAcpiTable (AcpiTableInstance, 0, &Table, &Version, &Table= Key) =3D=3D EFI_SUCCESS) { + RemoveTableFromList (AcpiTableInstance, Version, TableKey); + } + } else { + Status =3D PublishTables (AcpiTableInstance, Version); + } + + ASSERT_EFI_ERROR (Status); + return Status; +} =20 /** Constructor for the ACPI table protocol. Initializes instance @@ -1918,6 +2073,8 @@ AcpiTableAcpiTableConstructor ( =20 ChecksumCommonTables (AcpiTableInstance); =20 + InstallAcpiTableFromHob (AcpiTableInstance); + // // Completed successfully // --=20 2.30.0.windows.2 -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#76512): https://edk2.groups.io/g/devel/message/76512 Mute This Topic: https://groups.io/mt/83551801/1787277 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org] -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- From nobody Mon Feb 9 09:02:22 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) client-ip=66.175.222.108; envelope-from=bounce+27952+76513+1787277+3901457@groups.io; helo=mail02.groups.io; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce+27952+76513+1787277+3901457@groups.io; dmarc=fail(p=none dis=none) header.from=intel.com ARC-Seal: i=1; a=rsa-sha256; t=1623748376; cv=none; d=zohomail.com; s=zohoarc; b=iGXLFGPM1cItwCKd3ifdIHaX52qlvtiNjZPr9ca7+sTySP2B57WGEZOM2zJdJo/FnOdii2Juzvy3rMoVz9PWEwk6m+9n/acwxSvJwNjxTQaFlqWWsowdpZ/8BqwVt/u94z3FUV8w6nBkZ3SOFbvmvDfKB/fccw/H/wNL6FlH124= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1623748376; h=Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Reply-To:References:Sender:Subject:To; bh=uCOR7GdM/t/TjUzz9sBn3xROAxhGT439Mjr3cCrdu+o=; b=dH/GlK8jxRacRqosCpDmoWvuNS8s1IhTR4IAsp4DPWQyKDVlJ+tXF4tKN1l3ntQOK1CIyadtkz70voNo/TKaWpXqBkbq1AZgCmXd4+EufzlNLtZI/90be0KtJRcHOr9nEoM+VFkwfbmLblN2/yZz8gDf/cPXo2CfmlVbFTDwSsk= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce+27952+76513+1787277+3901457@groups.io; dmarc=fail header.from= (p=none dis=none) Received: from mail02.groups.io (mail02.groups.io [66.175.222.108]) by mx.zohomail.com with SMTPS id 1623748376277767.4068574252768; Tue, 15 Jun 2021 02:12:56 -0700 (PDT) Return-Path: X-Received: by 127.0.0.2 with SMTP id dO9lYY1788612xkwBl5zYjbI; Tue, 15 Jun 2021 02:12:54 -0700 X-Received: from mga12.intel.com (mga12.intel.com []) by mx.groups.io with SMTP id smtpd.web11.6831.1623748371467770763 for ; Tue, 15 Jun 2021 02:12:54 -0700 IronPort-SDR: saH9eUb57PJafMar8WPeyhA0qXqRIDYrao51h5Da2CFhnIXDrl/qsMTJ/QqoezaWrLlwMH55GK fon8FduiEoLA== X-IronPort-AV: E=McAfee;i="6200,9189,10015"; a="185647659" X-IronPort-AV: E=Sophos;i="5.83,275,1616482800"; d="scan'208,223";a="185647659" X-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:36 -0700 IronPort-SDR: wOxpvRJoxV1d/2yDFqM6RUoBTcbxmhi2iHwvHz2Qo2R/8DY5uiQDRjGDJ+jC8JFwhdLIMJGT65 1YjzeJPwTLpg== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.83,275,1616482800"; d="scan'208,223";a="487713233" X-Received: from fieedk002.ccr.corp.intel.com ([10.239.158.144]) by fmsmga002.fm.intel.com with ESMTP; 15 Jun 2021 02:12:35 -0700 From: "Zhiguang Liu" To: devel@edk2.groups.io Cc: Maurice Ma , Guo Dong , Benjamin You , Ray Ni Subject: [edk2-devel] [Patch V5 9/9] UefiPayloadPkg: Create gUniversalPayloadAcpiTableGuid Hob Date: Tue, 15 Jun 2021 17:12:11 +0800 Message-Id: <20210615091211.801-10-zhiguang.liu@intel.com> In-Reply-To: <20210615091211.801-1-zhiguang.liu@intel.com> References: <20210615091211.801-1-zhiguang.liu@intel.com> MIME-Version: 1.0 Precedence: Bulk List-Unsubscribe: List-Subscribe: List-Help: Sender: devel@edk2.groups.io List-Id: Mailing-List: list devel@edk2.groups.io; contact devel+owner@edk2.groups.io Reply-To: devel@edk2.groups.io,zhiguang.liu@intel.com X-Gm-Message-State: PRVzlrdrm2GpMvWuIYl7aRb1x1787277AA= Content-Transfer-Encoding: quoted-printable DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=groups.io; q=dns/txt; s=20140610; t=1623748374; bh=sHHdUQyjiTw45yi/mP1c4ipwfx7Xmwc2XyLPzPENErY=; h=Cc:Date:From:Reply-To:Subject:To; b=JOVPK7HNyeDovvWvWV1IHc0QKOe+1FSjM2dEog345GuleQo8wEUZqOuc9hSl2IxL8c7 EsmmvdPM1sTBDyhnEFELi8GwRs0dqAVYlGDN+Jne93U6FBK+el0QDyzJiRpg3wjWGahUG Ef5OyDdK3D1xielBkdozevz75NZdpZWQQrQ= X-ZohoMail-DKIM: pass (identity @groups.io) Content-Type: text/plain; charset="utf-8" From SysTableInfo Hob, get ACPI table address, and create gUniversalPayloadAcpiTableGuid Hob to store it. Remove directly adding ACPI table to ConfigurationTable. Dxe ACPI driver will parse it and install ACPI table from Guid Hob. Cc: Maurice Ma Cc: Guo Dong Cc: Benjamin You Cc: Ray Ni Reviewed-by: Guo Dong Signed-off-by: Zhiguang Liu --- UefiPayloadPkg/BlSupportDxe/BlSupportDxe.c | 17 ----------------- UefiPayloadPkg/BlSupportDxe/BlSupportDxe.h | 5 +---- UefiPayloadPkg/BlSupportDxe/BlSupportDxe.inf | 1 - UefiPayloadPkg/UefiPayloadEntry/UefiPayloadEntry.c | 11 +++++++++++ UefiPayloadPkg/UefiPayloadEntry/UefiPayloadEntry.h | 2 +- UefiPayloadPkg/UefiPayloadEntry/UefiPayloadEntry.inf | 1 + UefiPayloadPkg/UefiPayloadPkg.fdf | 4 ++++ 7 files changed, 18 insertions(+), 23 deletions(-) diff --git a/UefiPayloadPkg/BlSupportDxe/BlSupportDxe.c b/UefiPayloadPkg/Bl= SupportDxe/BlSupportDxe.c index 56b85b8e6d..ffd3427fb3 100644 --- a/UefiPayloadPkg/BlSupportDxe/BlSupportDxe.c +++ b/UefiPayloadPkg/BlSupportDxe/BlSupportDxe.c @@ -99,7 +99,6 @@ BlDxeEntryPoint ( { EFI_STATUS Status; EFI_HOB_GUID_TYPE *GuidHob; - SYSTEM_TABLE_INFO *SystemTableInfo; EFI_PEI_GRAPHICS_INFO_HOB *GfxInfo; ACPI_BOARD_INFO *AcpiBoardInfo; =20 @@ -113,22 +112,6 @@ BlDxeEntryPoint ( Status =3D ReserveResourceInGcd (TRUE, EfiGcdMemoryTypeMemoryMappedIo, 0= xFED00000, SIZE_1KB, 0, ImageHandle); // HPET ASSERT_EFI_ERROR (Status); =20 - // - // Find the system table information guid hob - // - GuidHob =3D GetFirstGuidHob (&gUefiSystemTableInfoGuid); - ASSERT (GuidHob !=3D NULL); - SystemTableInfo =3D (SYSTEM_TABLE_INFO *)GET_GUID_HOB_DATA (GuidHob); - - // - // Install Acpi Table - // - if (SystemTableInfo->AcpiTableBase !=3D 0 && SystemTableInfo->AcpiTableS= ize !=3D 0) { - DEBUG ((DEBUG_ERROR, "Install Acpi Table at 0x%lx, length 0x%x\n", Sys= temTableInfo->AcpiTableBase, SystemTableInfo->AcpiTableSize)); - Status =3D gBS->InstallConfigurationTable (&gEfiAcpiTableGuid, (VOID *= )(UINTN)SystemTableInfo->AcpiTableBase); - ASSERT_EFI_ERROR (Status); - } - // // Find the frame buffer information and update PCDs // diff --git a/UefiPayloadPkg/BlSupportDxe/BlSupportDxe.h b/UefiPayloadPkg/Bl= SupportDxe/BlSupportDxe.h index 512105fafd..3332a30eae 100644 --- a/UefiPayloadPkg/BlSupportDxe/BlSupportDxe.h +++ b/UefiPayloadPkg/BlSupportDxe/BlSupportDxe.h @@ -1,7 +1,7 @@ /** @file The header file of bootloader support DXE. =20 -Copyright (c) 2014, Intel Corporation. All rights reserved.
+Copyright (c) 2021, Intel Corporation. All rights reserved.
SPDX-License-Identifier: BSD-2-Clause-Patent =20 **/ @@ -19,12 +19,9 @@ SPDX-License-Identifier: BSD-2-Clause-Patent #include #include =20 -#include #include #include #include #include =20 -#include - #endif diff --git a/UefiPayloadPkg/BlSupportDxe/BlSupportDxe.inf b/UefiPayloadPkg/= BlSupportDxe/BlSupportDxe.inf index 30f41f8c39..1ccb250991 100644 --- a/UefiPayloadPkg/BlSupportDxe/BlSupportDxe.inf +++ b/UefiPayloadPkg/BlSupportDxe/BlSupportDxe.inf @@ -42,7 +42,6 @@ HobLib =20 [Guids] - gEfiAcpiTableGuid gUefiSystemTableInfoGuid gUefiAcpiBoardInfoGuid gEfiGraphicsInfoHobGuid diff --git a/UefiPayloadPkg/UefiPayloadEntry/UefiPayloadEntry.c b/UefiPaylo= adPkg/UefiPayloadEntry/UefiPayloadEntry.c index 80f66a3fd5..8c6f7e326f 100644 --- a/UefiPayloadPkg/UefiPayloadEntry/UefiPayloadEntry.c +++ b/UefiPayloadPkg/UefiPayloadEntry/UefiPayloadEntry.c @@ -235,6 +235,7 @@ BuildHobFromBl ( EFI_PEI_GRAPHICS_DEVICE_INFO_HOB GfxDeviceInfo; EFI_PEI_GRAPHICS_DEVICE_INFO_HOB *NewGfxDeviceInfo; UNIVERSAL_PAYLOAD_SMBIOS_TABLE *SmBiosTableHob; + UNIVERSAL_PAYLOAD_ACPI_TABLE *AcpiTableHob; =20 // // Parse memory info and build memory HOBs @@ -287,6 +288,16 @@ BuildHobFromBl ( SmBiosTableHob->SmBiosEntryPoint =3D SysTableInfo.SmbiosTableBase; DEBUG ((DEBUG_INFO, "Create smbios table gUniversalPayloadSmbiosTableGui= d guid hob\n")); =20 + // + // 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")); + // // Create guid hob for acpi board information // diff --git a/UefiPayloadPkg/UefiPayloadEntry/UefiPayloadEntry.h b/UefiPaylo= adPkg/UefiPayloadEntry/UefiPayloadEntry.h index e7d0d15118..a4c9da128e 100644 --- a/UefiPayloadPkg/UefiPayloadEntry/UefiPayloadEntry.h +++ b/UefiPayloadPkg/UefiPayloadEntry/UefiPayloadEntry.h @@ -32,7 +32,7 @@ #include #include #include - +#include =20 #define LEGACY_8259_MASK_REGISTER_MASTER 0x21 #define LEGACY_8259_MASK_REGISTER_SLAVE 0xA1 diff --git a/UefiPayloadPkg/UefiPayloadEntry/UefiPayloadEntry.inf b/UefiPay= loadPkg/UefiPayloadEntry/UefiPayloadEntry.inf index fc5b5ce9d4..8d42925fcd 100644 --- a/UefiPayloadPkg/UefiPayloadEntry/UefiPayloadEntry.inf +++ b/UefiPayloadPkg/UefiPayloadEntry/UefiPayloadEntry.inf @@ -65,6 +65,7 @@ gEfiGraphicsDeviceInfoHobGuid gUefiAcpiBoardInfoGuid gUniversalPayloadSmbiosTableGuid + gUniversalPayloadAcpiTableGuid =20 [FeaturePcd.IA32] gEfiMdeModulePkgTokenSpaceGuid.PcdDxeIplSwitchToLongMode ## CONSUMES diff --git a/UefiPayloadPkg/UefiPayloadPkg.fdf b/UefiPayloadPkg/UefiPayload= Pkg.fdf index 8fc509024b..ed7fbcaddb 100644 --- a/UefiPayloadPkg/UefiPayloadPkg.fdf +++ b/UefiPayloadPkg/UefiPayloadPkg.fdf @@ -175,6 +175,10 @@ INF MdeModulePkg/Bus/Usb/UsbBusDxe/UsbBusDxe.inf INF MdeModulePkg/Bus/Usb/UsbKbDxe/UsbKbDxe.inf INF MdeModulePkg/Bus/Usb/UsbMassStorageDxe/UsbMassStorageDxe.inf =20 +# +# ACPI Support +# +INF MdeModulePkg/Universal/Acpi/AcpiTableDxe/AcpiTableDxe.inf =20 # # Shell --=20 2.30.0.windows.2 -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#76513): https://edk2.groups.io/g/devel/message/76513 Mute This Topic: https://groups.io/mt/83551802/1787277 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org] -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-