From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from EUR03-DB5-obe.outbound.protection.outlook.com (EUR03-DB5-obe.outbound.protection.outlook.com [40.107.4.55]) by mx.groups.io with SMTP id smtpd.web12.13325.1633369667203418852 for ; Mon, 04 Oct 2021 10:47:48 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@armh.onmicrosoft.com header.s=selector2-armh-onmicrosoft-com header.b=UzSa/3+F; spf=pass (domain: arm.com, ip: 40.107.4.55, mailfrom: sami.mujawar@arm.com) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=armh.onmicrosoft.com; s=selector2-armh-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=8SkgrU2R2DJqqSNTaXEpN2kuXj1v0k1wMQf6fIX7WQg=; b=UzSa/3+FczFstWc35vBrhuwx+mIzJTaD9FGHhVnp5kpR6g5eu8YsGv7+Vf3ZtJmByid3id9QTe2aP+ym+GlwCamw/FeSuwqi+Zxkif/ARLuDzrCJ4GvEJy1CMtbKp27fcv2zy/3XX+5t+tyXXkVEILV4TJnNQgU8e8S3YOzUB0w= Received: from AS8PR04CA0159.eurprd04.prod.outlook.com (2603:10a6:20b:331::14) by AM6PR08MB2951.eurprd08.prod.outlook.com (2603:10a6:209:4e::21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4566.22; Mon, 4 Oct 2021 17:47:44 +0000 Received: from VE1EUR03FT057.eop-EUR03.prod.protection.outlook.com (2603:10a6:20b:331:cafe::c2) by AS8PR04CA0159.outlook.office365.com (2603:10a6:20b:331::14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4566.14 via Frontend Transport; Mon, 4 Oct 2021 17:47:44 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 63.33.187.114) smtp.mailfrom=arm.com; edk2.groups.io; dkim=pass (signature was verified) header.d=armh.onmicrosoft.com;edk2.groups.io; dmarc=pass action=none header.from=arm.com; Received-SPF: Pass (protection.outlook.com: domain of arm.com designates 63.33.187.114 as permitted sender) receiver=protection.outlook.com; client-ip=63.33.187.114; helo=64aa7808-outbound-2.mta.getcheckrecipient.com; Received: from 64aa7808-outbound-2.mta.getcheckrecipient.com (63.33.187.114) by VE1EUR03FT057.mail.protection.outlook.com (10.152.19.123) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4566.14 via Frontend Transport; Mon, 4 Oct 2021 17:47:44 +0000 Received: ("Tessian outbound ac52c8afb262:v103"); Mon, 04 Oct 2021 17:47:43 +0000 X-CheckRecipientChecked: true X-CR-MTA-CID: afeccf1aedfa7a69 X-CR-MTA-TID: 64aa7808 Received: from 535171213220.2 by 64aa7808-outbound-1.mta.getcheckrecipient.com id 2E0E4FA2-C003-49E7-8402-F3E56512AC74.1; Mon, 04 Oct 2021 17:47:06 +0000 Received: from EUR04-HE1-obe.outbound.protection.outlook.com by 64aa7808-outbound-1.mta.getcheckrecipient.com with ESMTPS id 535171213220.2 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384); Mon, 04 Oct 2021 17:47:06 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=i6pj7Jz2gVY7HLwwEbEM2gPXctG4C0R1AUN7Qt4o059Te2z5g4eOuZRBBpO0bafgHRwxBAkbJpR7IfBOGzr5e0cMaW1JnbEm1vAiWJdtTVXS8OT3NVOMcXwz02xxdFRXC/TQTO3XwGF9YPhbNzS2jxYG5sDKqcxypjOz17q9UawoYigUcd4d9t6/TWQAgOTTtOyOe185SSUP0RCqkJ9O4czEi56BkpXLXvXQdOgUIKnmFouRxK16RR2M0HoMWz8hnU6gtbWI2IxShuUXdCPBlFuOGMS6+RfM4jpgmHTEoJHYcWAS23Wdf7ulOtu4whPoU46ZaPVmkhJhk5cniK7Kvw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=8SkgrU2R2DJqqSNTaXEpN2kuXj1v0k1wMQf6fIX7WQg=; b=Vn9KCBO7PHCjPALImrd+BTbtbja/EPw4j2etbWDTC1WM1qvNzT/8SO9kZfgPqGYD+UDWUvINBfNbM5WjcGgmoV0sEEh1TgSulsdw6IXX2jgM3D6aq/3B/7fmW2vUCh3vNbXS3ZOmDLxS4rIus0xgODmoW3ZTRf7eE0yCydOzdFPFlXNguKHmzMK2IYvY89uP1val5etY2EgLZKXh934UkbN9wqyhPXSoHZ+UPhAJen41MI0tLt42t7pzOBvKJ/pDroC9sfGIpNKPydPlghXGv+NMr+VfnSBxffpHI3P8lr2ZxfL0/P30DiHQZSNG+ly4eWAldQ8UjbAdsqbGx6PcjA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=arm.com; dmarc=pass action=none header.from=arm.com; dkim=pass header.d=arm.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=armh.onmicrosoft.com; s=selector2-armh-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=8SkgrU2R2DJqqSNTaXEpN2kuXj1v0k1wMQf6fIX7WQg=; b=UzSa/3+FczFstWc35vBrhuwx+mIzJTaD9FGHhVnp5kpR6g5eu8YsGv7+Vf3ZtJmByid3id9QTe2aP+ym+GlwCamw/FeSuwqi+Zxkif/ARLuDzrCJ4GvEJy1CMtbKp27fcv2zy/3XX+5t+tyXXkVEILV4TJnNQgU8e8S3YOzUB0w= Authentication-Results-Original: arm.com; dkim=none (message not signed) header.d=none;arm.com; dmarc=none action=none header.from=arm.com; Received: from AS8PR08MB6806.eurprd08.prod.outlook.com (2603:10a6:20b:39b::12) by AM5PR0801MB1715.eurprd08.prod.outlook.com (2603:10a6:203:3c::10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4566.22; Mon, 4 Oct 2021 17:47:04 +0000 Received: from AS8PR08MB6806.eurprd08.prod.outlook.com ([fe80::54b5:239d:9896:ee65]) by AS8PR08MB6806.eurprd08.prod.outlook.com ([fe80::54b5:239d:9896:ee65%4]) with mapi id 15.20.4566.022; Mon, 4 Oct 2021 17:46:59 +0000 Subject: Re: [edk2-platforms][PATCH v3 2/5] ArmPlatformPkg: add definition for MM_HEST_ERROR_SOURCE_DESC_PROTOCOL To: Omkar Anand Kulkarni , devel@edk2.groups.io Cc: Ard Biesheuvel , nd References: <20210824053403.24103-1-omkar.kulkarni@arm.com> <20210824053403.24103-3-omkar.kulkarni@arm.com> From: "Sami Mujawar" Message-ID: <952e8fe7-81b3-cced-1d8d-9bb7f6e72f39@arm.com> Date: Mon, 4 Oct 2021 18:47:01 +0100 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.0.1 In-Reply-To: <20210824053403.24103-3-omkar.kulkarni@arm.com> X-ClientProxiedBy: LO4P123CA0413.GBRP123.PROD.OUTLOOK.COM (2603:10a6:600:189::22) To AS8PR08MB6806.eurprd08.prod.outlook.com (2603:10a6:20b:39b::12) MIME-Version: 1.0 Received: from [10.1.196.43] (217.140.106.52) by LO4P123CA0413.GBRP123.PROD.OUTLOOK.COM (2603:10a6:600:189::22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4566.15 via Frontend Transport; Mon, 4 Oct 2021 17:46:58 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: c00f2a43-7fa2-4071-6ce9-08d9875f1201 X-MS-TrafficTypeDiagnostic: AM5PR0801MB1715:|AM6PR08MB2951: X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: x-checkrecipientrouted: true NoDisclaimer: true X-MS-Oob-TLC-OOBClassifiers: OLM:142;OLM:142; X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam-Untrusted: BCL:0; X-Microsoft-Antispam-Message-Info-Original: RvUE923fcEHiEXhaZgf8WD/i6xLEEu3YDedZ+l7pzCQKn2FV8EyNo1L3RYuRldjD/FVcNvlz2znXZ+50dGIB7lKG1ERCJ8/bsylCOaPwXD606MG8PYSFQ4U2NKtgirjJo327g74R00jyEy0EiQv23Ol6FOQYKB0qvkoxt+yAdfMJbf6eM6buT8lpY011JHXiszlQF6iJe7P8SvHifMlADulQqAroPYp4LupKAkgAMI+xz6/EzRGR0eveYFCEFohUkqTbhcVk37t1g3Zlb3tHv5gNUxWFoCGxPBbJbwVtusKGWneUVrLVARlFAU8mEX37p21Duwxh5C6YTM3XoFvLWnRMd9svj9sHXRumYWaN/XmdmjU9v+Mk1L8t7BFVHD3YTZKHWhmzolTcZvSYdyXX8YXF1EcZwzoiO53q+6f7xvtRXduxOfTtnBgjwjLYti/Wb7ezQXS/oUNpT109NtPTnTRPUB8AhLzBzNAho9mE+vTrkyI8hfbKVGcNspsQcSYvBeOdlLHnP7QoLBC4KLCKwIkO7jSk3AYjy6d0xIHjRG5N4muftf/h2muDGXgezOpbCYlfYOsahtAeacbzMjM5vK3NUepDrGBsrNMVF8dk09l8eYKBsByqGMXRB2n9TwuIl6+zUeqWKYPc+5RoxKFhQEC7ckz//UJC5DfuFYWNfV+waWPEW3UtZ2izMZTcqtqDgA+X8EF28G3BDeRP24tFSlGNztLl88dXOGFQZvh0OWlkp9pZwo5A5HBAuiUJWuYaqx3DeeWBR+4sAtjDSiTDgg== X-Forefront-Antispam-Report-Untrusted: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:AS8PR08MB6806.eurprd08.prod.outlook.com;PTR:;CAT:NONE;SFS:(4636009)(366004)(6486002)(86362001)(508600001)(316002)(31696002)(54906003)(66556008)(66476007)(83380400001)(38350700002)(38100700002)(16576012)(2616005)(31686004)(956004)(5660300002)(8936002)(8676002)(4326008)(6666004)(53546011)(33964004)(66946007)(52116002)(186003)(26005)(2906002)(44832011)(36756003)(45980500001)(43740500002);DIR:OUT;SFP:1101; X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM5PR0801MB1715 Original-Authentication-Results: arm.com; dkim=none (message not signed) header.d=none;arm.com; dmarc=none action=none header.from=arm.com; Return-Path: Sami.Mujawar@arm.com X-EOPAttributedMessage: 0 X-MS-Exchange-Transport-CrossTenantHeadersStripped: VE1EUR03FT057.eop-EUR03.prod.protection.outlook.com X-MS-Office365-Filtering-Correlation-Id-Prvs: 1b3e6fde-aba2-4c41-f725-08d9875ef6d7 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: FRogECC58pK30E1uEGbY3nGctIs05jN0NZx3wXfDrUWRsLn6haebvRCdwfU9qzodJX59v58q7YBYE5ItUrRXIXk/uwGBNm8dTJIisMt/gxlOdbxYJa22KlP7J3QWDlskuabt+/N07Q+/r3f6X/Ru1uEge6QHXEBlocL9uCgor/oOOJEyk5FIijwTAKn8VdLSP2NS4uWe7we9+1lFNCDvTj+Isq/ArcKkTRAa5EOR40uTNAT1tLbZkyya/eCHhYUCLiiRBqu1h3Vz4aQqd7DJTfKrF3TFx6zHDNHnBmbz7AxqzWrNluxhAm1bXCXTNdxQtB5WRyEv/Zmz41/5yX2pDCLwf86m3TN7g+qfpBnkOGZS9bYsdn7sC5WpFHm1uHcuSZdnIIv9MeXJgF/MsruigMCibqe12HjIBhuD9F+dGEdev/O/PEqJx1HoN0AmtkNXoCWrJmVdWF5PQL0BDpsp0LZzRk0sZ82iHrwABqhSiA3BhGOb799/9vUBNbgbD+QVNwFBMIgTEgcZ08Q1lWdDnwTZqhfDGBBSuZPT4/MeJG7OiN0dbQUtQhG/kRD19GT8prPJY5TxZ87S3uqEz8DGcOHFwueQLXo5U10w32QlZf65jtlry73tX+ENtVbaZ3WB/vKu4V/44Lt40emuWcx1Klb2rW0EuJgF3JuXo50PXDE0Mr2M6BrIlgQgAI7eIaC/bHIBp5H845L8QZ5MbKiVyqKKd8oruD/NW5hx7J6s5O8= X-Forefront-Antispam-Report: CIP:63.33.187.114;CTRY:IE;LANG:en;SCL:1;SRV:;IPV:CAL;SFV:NSPM;H:64aa7808-outbound-2.mta.getcheckrecipient.com;PTR:ec2-63-33-187-114.eu-west-1.compute.amazonaws.com;CAT:NONE;SFS:(4636009)(46966006)(36840700001)(44832011)(70586007)(31686004)(70206006)(47076005)(2906002)(4326008)(26005)(6486002)(86362001)(36756003)(31696002)(16576012)(54906003)(82310400003)(316002)(186003)(508600001)(956004)(2616005)(36860700001)(53546011)(5660300002)(336012)(8676002)(8936002)(83380400001)(356005)(6666004)(81166007)(33964004)(43740500002);DIR:OUT;SFP:1101; X-OriginatorOrg: arm.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 04 Oct 2021 17:47:44.1992 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: c00f2a43-7fa2-4071-6ce9-08d9875f1201 X-MS-Exchange-CrossTenant-Id: f34e5979-57d9-4aaa-ad4d-b122a662184d X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=f34e5979-57d9-4aaa-ad4d-b122a662184d;Ip=[63.33.187.114];Helo=[64aa7808-outbound-2.mta.getcheckrecipient.com] X-MS-Exchange-CrossTenant-AuthSource: VE1EUR03FT057.eop-EUR03.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM6PR08MB2951 Content-Type: multipart/alternative; boundary="------------C37ACD3D058F297627E476A9" Content-Language: en-GB --------------C37ACD3D058F297627E476A9 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Hi Omkar, Please find my feedback inline marked [SAMI]. Regards, Sami Mujawar On 24/08/2021 06:34 AM, Omkar Anand Kulkarni wrote: > Add the protocol definition of the MM_HEST_ERROR_SOURCE_DESC_PROTOCOL > protocol. This protocol can be implemented by MM drivers to publish > error source descriptors that have to be populated into HEST table. > > Co-authored-by: Thomas Abraham > Signed-off-by: Omkar Anand Kulkarni > --- > ArmPlatformPkg/ArmPlatformPkg.dec | 3 + > ArmPlatformPkg/Include/Protocol/HestErrorSourceInfo.h | 64 ++++++++++++++++++++ > 2 files changed, 67 insertions(+) > > diff --git a/ArmPlatformPkg/ArmPlatformPkg.dec b/ArmPlatformPkg/ArmPlatformPkg.dec > index 3a25ddcdc8ca..446d93b880f9 100644 > --- a/ArmPlatformPkg/ArmPlatformPkg.dec > +++ b/ArmPlatformPkg/ArmPlatformPkg.dec > @@ -127,3 +127,6 @@ > gArmPlatformTokenSpaceGuid.PcdPL031RtcPpmAccuracy|300000000|UINT32|0x00000022 > > gArmPlatformTokenSpaceGuid.PcdWatchdogCount|0x0|UINT32|0x00000033 > + > +[Protocols.common] > + gMmHestErrorSourceDescProtocolGuid = { 0x560bf236, 0xa4a8, 0x4d69, { 0xbc, 0xf6, 0xc2, 0x97, 0x24, 0x10, 0x9d, 0x91 } } > diff --git a/ArmPlatformPkg/Include/Protocol/HestErrorSourceInfo.h b/ArmPlatformPkg/Include/Protocol/HestErrorSourceInfo.h > new file mode 100644 > index 000000000000..86662ea7af57 > --- /dev/null > +++ b/ArmPlatformPkg/Include/Protocol/HestErrorSourceInfo.h [SAMI] Can this file be rename to MmHestErrorSourceProtocol.h? > @@ -0,0 +1,64 @@ > +/** @file > + MM protocol to get the secure error source descriptor information. > + > + MM Drivers must implement this protocol in order to publish secure side > + error source descriptor information to OSPM through the HEST ACPI table. > + > + Copyright (c) 2020 - 2021, ARM Limited. All rights reserved. > + SPDX-License-Identifier: BSD-2-Clause-Patent > +**/ > + > +#ifndef MM_HEST_ERROR_SOURCE_DESC_ > +#define MM_HEST_ERROR_SOURCE_DESC_ > + > +#define MM_HEST_ERROR_SOURCE_DESC_PROTOCOL_GUID \ > + { \ > + 0x560bf236, 0xa4a8, 0x4d69, { 0xbc, 0xf6, 0xc2, 0x97, 0x24, 0x10, 0x9d, 0x91 } \ > + } > + > +typedef struct MmHestErrorSourceDescProtocol > + MM_HEST_ERROR_SOURCE_DESC_PROTOCOL; [SAMI] Can this be renamed to EDKII_MM_HEST_ERROR_SOURCE_PROTOCOL ? > + > +/** > + Get HEST Secure Error Source Descriptors. > + > + The MM drivers implementing this protocol must convey the total count and > + total length of the error sources the driver has along with the actual error > + source descriptor(s). > + > + Passing NULL as Buffer parameter shall return EFI_INVALID_PARAMETR with the > + total length and count of the error source descriptor(s) it supports. [SAMI]I think the error code EFI_BUFFER_TOO_SMALL should be returned when the Buffer is NULL and *ErrorSourcesLength is 0. i.e. To determine the size of required buffer, the caller shall call this interface with Buffer = NULL and *ErrorSourcesLength = 0. In response this interface shall return an error code EFI_BUFFER_TOO_SMALL with the required buffer length in ErrorSourcesLength and count in ErrorSourcesCount. The EFI_INVALID_PARAMETR should be returned when a parameter is invalid. e.g. ErrorSourcesLength should be an IN OUT parameter and cannot be NULL. The ErrorSourcesCount could be an optional parameter and can be NULL. Can you revisit the design of this interface, please? [/SAMI] > + > + @param[in] This MM_HEST_ERROR_SOURCE_DESC_PROTOCOL instance. > + @param[out] Buffer Buffer to be appended with the error > + source descriptors information. > + @param[out] ErrorSourcesLength Total length of all the error source > + descriptors. > + @param[out] ErrorSourceCount Count of total error source descriptors > + supported by the driver. > + > + retval EFI_SUCCESS If the Buffer is valid and is filled with valid > + Error Source descriptor data. > + retval EFI_INVALID_PARAMTER Buffer is NULL. > + retval Other If no error source descriptor information is > + available. > +**/ > +typedef > +EFI_STATUS > +(EFIAPI *MM_HEST_GET_ERROR_SOURCE_DESCRIPTORS) ( [SAMI] Can this be renamed to EDKII_MM_HEST_GET_ERROR_SOURCE_DESCRIPTORS? > + IN MM_HEST_ERROR_SOURCE_DESC_PROTOCOL *This, > + OUT VOID **Buffer, > + OUT UINTN *ErrorSourcesLength, > + OUT UINTN *ErrorSourcesCount > + ); > + > +// > +// Protocol declaration > +// > +struct MmHestErrorSourceDescProtocol { > + MM_HEST_GET_ERROR_SOURCE_DESCRIPTORS GetHestErrorSourceDescriptors; > +}; > + > +extern EFI_GUID gMmHestErrorSourceDescProtocolGuid; > + > +#endif // MM_HEST_ERROR_SOURCE_DESC_ --------------C37ACD3D058F297627E476A9 Content-Type: text/html; charset=utf-8 Content-Transfer-Encoding: 7bit

Hi Omkar,

Please find my feedback inline marked [SAMI].

Regards,

Sami Mujawar


On 24/08/2021 06:34 AM, Omkar Anand Kulkarni wrote:
Add the protocol definition of the MM_HEST_ERROR_SOURCE_DESC_PROTOCOL
protocol. This protocol can be implemented by MM drivers to publish
error source descriptors that have to be populated into HEST table.

Co-authored-by: Thomas Abraham <thomas.abraham@arm.com>
Signed-off-by: Omkar Anand Kulkarni <omkar.kulkarni@arm.com>
---
 ArmPlatformPkg/ArmPlatformPkg.dec                     |  3 +
 ArmPlatformPkg/Include/Protocol/HestErrorSourceInfo.h | 64 ++++++++++++++++++++
 2 files changed, 67 insertions(+)

diff --git a/ArmPlatformPkg/ArmPlatformPkg.dec b/ArmPlatformPkg/ArmPlatformPkg.dec
index 3a25ddcdc8ca..446d93b880f9 100644
--- a/ArmPlatformPkg/ArmPlatformPkg.dec
+++ b/ArmPlatformPkg/ArmPlatformPkg.dec
@@ -127,3 +127,6 @@
   gArmPlatformTokenSpaceGuid.PcdPL031RtcPpmAccuracy|300000000|UINT32|0x00000022
 
   gArmPlatformTokenSpaceGuid.PcdWatchdogCount|0x0|UINT32|0x00000033
+
+[Protocols.common]
+  gMmHestErrorSourceDescProtocolGuid = { 0x560bf236, 0xa4a8, 0x4d69, { 0xbc, 0xf6, 0xc2, 0x97, 0x24, 0x10, 0x9d, 0x91 } }
diff --git a/ArmPlatformPkg/Include/Protocol/HestErrorSourceInfo.h b/ArmPlatformPkg/Include/Protocol/HestErrorSourceInfo.h
new file mode 100644
index 000000000000..86662ea7af57
--- /dev/null
+++ b/ArmPlatformPkg/Include/Protocol/HestErrorSourceInfo.h
[SAMI] Can this file be rename to MmHestErrorSourceProtocol.h?
@@ -0,0 +1,64 @@
+/** @file
+  MM protocol to get the secure error source descriptor information.
+
+  MM Drivers must implement this protocol in order to publish secure side
+  error source descriptor information to OSPM through the HEST ACPI table.
+
+  Copyright (c) 2020 - 2021, ARM Limited. All rights reserved.
+  SPDX-License-Identifier: BSD-2-Clause-Patent
+**/
+
+#ifndef MM_HEST_ERROR_SOURCE_DESC_
+#define MM_HEST_ERROR_SOURCE_DESC_
+
+#define MM_HEST_ERROR_SOURCE_DESC_PROTOCOL_GUID \
+  { \
+    0x560bf236, 0xa4a8, 0x4d69, { 0xbc, 0xf6, 0xc2, 0x97, 0x24, 0x10, 0x9d, 0x91 } \
+  }
+
+typedef struct MmHestErrorSourceDescProtocol
+                 MM_HEST_ERROR_SOURCE_DESC_PROTOCOL;
[SAMI] Can this be renamed to EDKII_MM_HEST_ERROR_SOURCE_PROTOCOL ?
+
+/**
+  Get HEST Secure Error Source Descriptors.
+
+  The MM drivers implementing this protocol must convey the total count and
+  total length of the error sources the driver has along with the actual error
+  source descriptor(s).
+
+  Passing NULL as Buffer parameter shall return EFI_INVALID_PARAMETR with the
+  total length and count of the error source descriptor(s) it supports.
[SAMI]I think the error code EFI_BUFFER_TOO_SMALL should be returned when the Buffer is NULL and *ErrorSourcesLength is 0.
i.e. To determine the size of required buffer, the caller shall call this interface with Buffer = NULL and *ErrorSourcesLength = 0. In response this interface shall return an error code EFI_BUFFER_TOO_SMALL with the required buffer length in ErrorSourcesLength and count in ErrorSourcesCount.

The EFI_INVALID_PARAMETR should be returned when a parameter is invalid. e.g. ErrorSourcesLength should be an IN OUT parameter and cannot be NULL.
The ErrorSourcesCount could be an optional parameter and can be NULL.

Can you revisit the design of this interface, please?
[/SAMI]
+
+  @param[in]   This                MM_HEST_ERROR_SOURCE_DESC_PROTOCOL instance.
+  @param[out]  Buffer              Buffer to be appended with the error
+                                   source descriptors information.
+  @param[out]  ErrorSourcesLength  Total length of all the error source
+                                   descriptors.
+  @param[out]  ErrorSourceCount    Count of total error source descriptors
+                                   supported by the driver.
+
+  retval  EFI_SUCCESS           If the Buffer is valid and is filled with valid
+                                Error Source descriptor data.
+  retval  EFI_INVALID_PARAMTER  Buffer is NULL.
+  retval  Other                 If no error source descriptor information is
+                                available.
+**/
+typedef
+EFI_STATUS
+(EFIAPI *MM_HEST_GET_ERROR_SOURCE_DESCRIPTORS) (
[SAMI] Can this be renamed to EDKII_MM_HEST_GET_ERROR_SOURCE_DESCRIPTORS?
+  IN  MM_HEST_ERROR_SOURCE_DESC_PROTOCOL *This,
+  OUT VOID                               **Buffer,
+  OUT UINTN                              *ErrorSourcesLength,
+  OUT UINTN                              *ErrorSourcesCount
+  );
+
+//
+// Protocol declaration
+//
+struct MmHestErrorSourceDescProtocol {
+  MM_HEST_GET_ERROR_SOURCE_DESCRIPTORS GetHestErrorSourceDescriptors;
+};
+
+extern EFI_GUID gMmHestErrorSourceDescProtocolGuid;
+
+#endif // MM_HEST_ERROR_SOURCE_DESC_

--------------C37ACD3D058F297627E476A9--