From nobody Mon Feb 9 16:18:29 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of groups.io designates 66.175.222.12 as permitted sender) client-ip=66.175.222.12; envelope-from=bounce+27952+66829+1787277+3901457@groups.io; helo=web01.groups.io; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.12 as permitted sender) smtp.mailfrom=bounce+27952+66829+1787277+3901457@groups.io; dmarc=fail(p=none dis=none) header.from=arm.com ARC-Seal: i=1; a=rsa-sha256; t=1604070064; cv=none; d=zohomail.com; s=zohoarc; b=IEiT9iuK8dfgBa985hBB2R1WL3o5Y/Ssbp/fGYRgGE4oohYGsQASYBfgOqCMEh/9VUoF6Pr9GbCLdiirvMLOKb8F3RTLpgx5xJ7Ln5Ps3U9tehtydOAR0s+WPN29tqUu1JSo5/EUT+PlnGEafW5oVugQlJI/bTmuSHNBkgoVn1M= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1604070064; h=Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Id:List-Unsubscribe:MIME-Version:Message-ID:Reply-To:References:Sender:Subject:To; bh=UdVFbBLLv5LViMz6PuBjTo8AEhGnHiVPiNV2/qehAXE=; b=gUTRHcQ7sfShQS3d6WwfCiGYTGbIKC0u9ZxZaOOSVExTEHb8TuQnIf5qnqkygA9eQzNLJfw5JYquHvLcmsCNBKwSD09E+3xSmm6CV3UhD1qEvMljQ94UYB3enrV4/DsByBDoInlZjcLxeKlaktQh861aORpDczCTqzu14nYiNbQ= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.12 as permitted sender) smtp.mailfrom=bounce+27952+66829+1787277+3901457@groups.io; dmarc=fail header.from= (p=none dis=none) header.from= Received: from web01.groups.io (web01.groups.io [66.175.222.12]) by mx.zohomail.com with SMTPS id 1604070064702841.9486134633736; Fri, 30 Oct 2020 08:01:04 -0700 (PDT) Return-Path: X-Received: by 127.0.0.2 with SMTP id hbghYY1788612xwFdhHQxqhg; Fri, 30 Oct 2020 08:01:01 -0700 X-Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by mx.groups.io with SMTP id smtpd.web08.10539.1604047330937049439 for ; Fri, 30 Oct 2020 01:42:11 -0700 X-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 845BB143D; Fri, 30 Oct 2020 01:42:10 -0700 (PDT) X-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 DC2633F719; Fri, 30 Oct 2020 01:42:08 -0700 (PDT) From: "Omkar Anand Kulkarni" To: devel@edk2.groups.io Cc: Ard Biesheuvel , Leif Lindholm , Sami Mujawar , Jiewen Yao Subject: [edk2-devel] [edk2-platforms][PATCH 3/6] Platform/Arm/Sgi: Install HEST ACPI table Date: Fri, 30 Oct 2020 14:11:53 +0530 Message-Id: <20201030084156.8291-4-omkar.kulkarni@arm.com> In-Reply-To: <20201030084156.8291-1-omkar.kulkarni@arm.com> References: <20201030084156.8291-1-omkar.kulkarni@arm.com> MIME-Version: 1.0 Precedence: Bulk List-Unsubscribe: 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,omkar.kulkarni@arm.com X-Gm-Message-State: GrVQ5KxggNUAi4UBSL2GSOLcx1787277AA= Content-Transfer-Encoding: quoted-printable DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=groups.io; q=dns/txt; s=20140610; t=1604070061; bh=fYh/1n6bSHNr9j0NRn1WekqByVRk8+iAWdVUV0J3NgM=; h=Cc:Date:From:Reply-To:Subject:To; b=eF8xjVR175lj7cVFkiT0RELMUkw8Zzse70C//LFVduZgbaoexY4QxSPFQT29yC/DhCF 5vGepi9jM9iWL6mv3Rj7nmZQ1FeNE2gQMIs1rcEwSSYU07enn3PszFTrm6i+j5Pg/fcFS GZlSbofXnEi4pBBGjX7Svjbh9fiyNbTitLI= X-ZohoMail-DKIM: pass (identity @groups.io) Content-Type: text/plain; charset="utf-8" On SGI/RD platforms that publish the platform error source descriptors using the HEST table generation protocol, install the dynamically created HEST table. Co-authored-by: Thomas Abraham Signed-off-by: Omkar Anand Kulkarni --- Platform/ARM/SgiPkg/SgiPlatform.dec = | 1 + Platform/ARM/SgiPkg/Drivers/PlatformDxe/PlatformDxe.inf = | 2 + Platform/ARM/SgiPkg/Drivers/PlatformDxe/{PlatformDxe.inf =3D> PlatformDxeM= m.inf} | 10 +++- Platform/ARM/SgiPkg/Drivers/PlatformDxe/PlatformDxe.c = | 52 ++++++++++++++++++++ 4 files changed, 63 insertions(+), 2 deletions(-) diff --git a/Platform/ARM/SgiPkg/SgiPlatform.dec b/Platform/ARM/SgiPkg/SgiP= latform.dec index f139b90d81e3..099652734c0e 100644 --- a/Platform/ARM/SgiPkg/SgiPlatform.dec +++ b/Platform/ARM/SgiPkg/SgiPlatform.dec @@ -31,6 +31,7 @@ [PcdsFeatureFlag.common] gArmSgiTokenSpaceGuid.PcdVirtioBlkSupported|FALSE|BOOLEAN|0x00000001 gArmSgiTokenSpaceGuid.PcdVirtioNetSupported|FALSE|BOOLEAN|0x00000010 + gArmSgiTokenSpaceGuid.PcdHestSupported|FALSE|BOOLEAN|0x0000000C gArmSgiTokenSpaceGuid.PcdSdeiSupported|FALSE|BOOLEAN|0x0000000D =20 [PcdsFixedAtBuild] diff --git a/Platform/ARM/SgiPkg/Drivers/PlatformDxe/PlatformDxe.inf b/Plat= form/ARM/SgiPkg/Drivers/PlatformDxe/PlatformDxe.inf index 2ea2c09e3920..448a22672a17 100644 --- a/Platform/ARM/SgiPkg/Drivers/PlatformDxe/PlatformDxe.inf +++ b/Platform/ARM/SgiPkg/Drivers/PlatformDxe/PlatformDxe.inf @@ -17,6 +17,7 @@ VirtioDevices.c =20 [Packages] + ArmPlatformPkg/ArmPlatformPkg.dec EmbeddedPkg/EmbeddedPkg.dec MdePkg/MdePkg.dec OvmfPkg/OvmfPkg.dec @@ -33,6 +34,7 @@ gArmSgiAcpiTablesGuid =20 [FeaturePcd] + gArmSgiTokenSpaceGuid.PcdHestSupported gArmSgiTokenSpaceGuid.PcdSdeiSupported gArmSgiTokenSpaceGuid.PcdVirtioBlkSupported gArmSgiTokenSpaceGuid.PcdVirtioNetSupported diff --git a/Platform/ARM/SgiPkg/Drivers/PlatformDxe/PlatformDxe.inf b/Plat= form/ARM/SgiPkg/Drivers/PlatformDxe/PlatformDxeMm.inf similarity index 77% copy from Platform/ARM/SgiPkg/Drivers/PlatformDxe/PlatformDxe.inf copy to Platform/ARM/SgiPkg/Drivers/PlatformDxe/PlatformDxeMm.inf index 2ea2c09e3920..980a4047aa37 100644 --- a/Platform/ARM/SgiPkg/Drivers/PlatformDxe/PlatformDxe.inf +++ b/Platform/ARM/SgiPkg/Drivers/PlatformDxe/PlatformDxeMm.inf @@ -1,5 +1,5 @@ # -# Copyright (c) 2018, ARM Limited. All rights reserved. +# Copyright (c) 2018-2020, ARM Limited. All rights reserved. # # SPDX-License-Identifier: BSD-2-Clause-Patent # @@ -17,6 +17,7 @@ VirtioDevices.c =20 [Packages] + ArmPlatformPkg/ArmPlatformPkg.dec EmbeddedPkg/EmbeddedPkg.dec MdePkg/MdePkg.dec OvmfPkg/OvmfPkg.dec @@ -32,7 +33,12 @@ gArmSgiPlatformIdDescriptorGuid gArmSgiAcpiTablesGuid =20 +[Protocols] + gEfiAcpiTableProtocolGuid + gHestTableProtocolGuid + [FeaturePcd] + gArmSgiTokenSpaceGuid.PcdHestSupported gArmSgiTokenSpaceGuid.PcdSdeiSupported gArmSgiTokenSpaceGuid.PcdVirtioBlkSupported gArmSgiTokenSpaceGuid.PcdVirtioNetSupported @@ -44,4 +50,4 @@ gArmSgiTokenSpaceGuid.PcdVirtioNetSize =20 [Depex] - TRUE + AFTER gArmPlatformHestErrorSourcesGuid diff --git a/Platform/ARM/SgiPkg/Drivers/PlatformDxe/PlatformDxe.c b/Platfo= rm/ARM/SgiPkg/Drivers/PlatformDxe/PlatformDxe.c index 9250243decb8..9ea20357b87e 100644 --- a/Platform/ARM/SgiPkg/Drivers/PlatformDxe/PlatformDxe.c +++ b/Platform/ARM/SgiPkg/Drivers/PlatformDxe/PlatformDxe.c @@ -15,6 +15,7 @@ #include =20 #include +#include =20 #include =20 @@ -88,6 +89,50 @@ InstallSdeiTable (VOID) return Status; } =20 +/** + Install the HEST ACPI table. + + HEST ACPI table is used to list the platform errors for which the error + handling has been supported. Use the HEST table generation protocol to + install the HEST table. + + @retval EFI_SUCCESS SDEI table installed successfully. + @retval Other For any error during installation. + +**/ +STATIC +EFI_STATUS +InstallHestTable (VOID) +{ + HEST_TABLE_PROTOCOL *HestProtocol; + EFI_STATUS Status; + + Status =3D gBS->LocateProtocol ( + &gHestTableProtocolGuid, + NULL, + (VOID **)&HestProtocol + ); + if (EFI_ERROR (Status)) { + DEBUG (( + DEBUG_ERROR, + "Failed to locate Hest Dxe Protocol, status: %r\n", + Status + )); + return Status; + } + + Status =3D HestProtocol->InstallHestTable (); + if (EFI_ERROR (Status)) { + DEBUG (( + DEBUG_ERROR, + "Failed to install HEST table, status: %r\n", + Status + )); + } + + return Status; +} + EFI_STATUS EFIAPI ArmSgiPkgEntryPoint ( @@ -110,6 +155,13 @@ ArmSgiPkgEntryPoint ( } } =20 + if (FeaturePcdGet (PcdHestSupported)) { + Status =3D InstallHestTable (); + if (EFI_ERROR (Status)) { + return Status; + } + } + InitVirtioDevices (); =20 return Status; --=20 2.17.1 -=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 (#66829): https://edk2.groups.io/g/devel/message/66829 Mute This Topic: https://groups.io/mt/77913847/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-