From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by mx.groups.io with SMTP id smtpd.web11.10596.1604046985718245916 for ; Fri, 30 Oct 2020 01:36:25 -0700 Authentication-Results: mx.groups.io; dkim=missing; spf=pass (domain: arm.com, ip: 217.140.110.172, mailfrom: omkar.kulkarni@arm.com) Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 64F22D6E; Fri, 30 Oct 2020 01:36:24 -0700 (PDT) Received: from usa.arm.com (a076764.blr.arm.com [10.162.16.42]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPA id BB9903F719; Fri, 30 Oct 2020 01:36:22 -0700 (PDT) From: omkar.kulkarni@arm.com To: devel@edk2.groups.io Cc: Ard Biesheuvel , Leif Lindholm , Sami Mujawar , Jiewen Yao Subject: [PATCH 0/3] ArmPlatformPkg: Introduce dynamic generation of HEST table Date: Fri, 30 Oct 2020 14:06:08 +0530 Message-Id: <20201030083611.8196-1-omkar.kulkarni@arm.com> X-Mailer: git-send-email 2.17.1 MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable This patch series adds support for dynamic creation of the HEST ACPI table with the error source descritors reterived from various other error handling drivers, including those implemented in StandaloneMM. The first patch adds a HEST table generation driver and introduces HEST table protocol. The driver enables dynamic creation of HEST ACPI table. The driver implements HEST table protocol serives to append error source descriptors to the table and install the fully populated HEST table. This enables other drivers to append and publish error source descriptor information to HEST table. The append protocol service when called for the first time creates HEST table and populates it with HEST header information. So on subsequent calls made to append service only error source descriptor information be appended at the end of HEST table. After all the hardware error source descriptors are added to the HEST table, install protocol service is used to publish the HEST table to OSPM. The second patch introduces a protocol definition to Get HEST error source descriptors from StandaloneMM. The protocol should be implemented by MM drivers that publish it's error sources as error source descriptors via HEST ACPI table. The third patch is combination of Hest Error Source DXE and its Standalone MM counterpart. These are responsible to collect all RAS error sources that are implemented as MM drivers. DXE driver communicates with Standalone MM driver using MM Communicate 2 protocol. First call into the Standalone MM is returned with the size of MM Communicate buffer required to hold all error source descriptor information. The DXE driver then allocates MM Communicate buffer buffer required to hold Error Source descriptor information like count of error source descriptors, total length of error source descriptors and the descriptor information itself and calls agian into Standalone MM. The MM counterpart of this driver is implemented as a gateway driver and DXE driver communicates only with it to get information on the error source descriptors supported by drivers in MM. Standalone MM driver locates all handles implementing Get Error Source Descriptor protocol. Loops over the handles and calls into respective MM driver. Omkar Anand Kulkarni (3): ArmPlatformPkg: Allow dynamic generation of HEST ACPI table ArmPlatformPkg: add definition for MM_HEST_ERROR_SOURCE_DESC_PROTOCOL ArmPlatformPkg: retreive error source descriptors from MM ArmPlatformPkg/ArmPlatformPkg.dec | 12 + .../Drivers/Apei/HestDxe/HestDxe.inf | 45 +++ .../HestMmErrorSources/HestErrorSourceDxe.inf | 41 +++ .../HestErrorSourceStandaloneMm.inf | 51 +++ .../HestMmErrorSourceCommon.h | 33 ++ .../Include/Protocol/HestErrorSourceInfo.h | 64 ++++ ArmPlatformPkg/Include/Protocol/HestTable.h | 66 ++++ ArmPlatformPkg/Drivers/Apei/HestDxe/HestDxe.c | 320 ++++++++++++++++++ .../HestMmErrorSources/HestErrorSourceDxe.c | 257 ++++++++++++++ .../HestErrorSourceStandaloneMm.c | 282 +++++++++++++++ 10 files changed, 1171 insertions(+) create mode 100644 ArmPlatformPkg/Drivers/Apei/HestDxe/HestDxe.inf create mode 100644 ArmPlatformPkg/Drivers/HestMmErrorSources/HestErrorSo= urceDxe.inf create mode 100644 ArmPlatformPkg/Drivers/HestMmErrorSources/HestErrorSo= urceStandaloneMm.inf create mode 100644 ArmPlatformPkg/Drivers/HestMmErrorSources/HestMmError= SourceCommon.h create mode 100644 ArmPlatformPkg/Include/Protocol/HestErrorSourceInfo.h create mode 100644 ArmPlatformPkg/Include/Protocol/HestTable.h create mode 100644 ArmPlatformPkg/Drivers/Apei/HestDxe/HestDxe.c create mode 100644 ArmPlatformPkg/Drivers/HestMmErrorSources/HestErrorSo= urceDxe.c create mode 100644 ArmPlatformPkg/Drivers/HestMmErrorSources/HestErrorSo= urceStandaloneMm.c --=20 2.17.1