From: "Omkar Anand Kulkarni" <omkar.kulkarni@arm.com>
To: devel@edk2.groups.io
Cc: Ard Biesheuvel <ardb+tianocore@kernel.org>,
Sami Mujawar <sami.mujawar@arm.com>
Subject: [PATCH v2 2/4] ArmPlatformPkg: add definition for MM_HEST_ERROR_SOURCE_DESC_PROTOCOL
Date: Sat, 10 Jul 2021 21:48:29 +0530 [thread overview]
Message-ID: <20210710161831.30433-3-omkar.kulkarni@arm.com> (raw)
In-Reply-To: <20210710161831.30433-1-omkar.kulkarni@arm.com>
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 | 1 +
ArmPlatformPkg/Include/Protocol/HestErrorSourceInfo.h | 64 ++++++++++++++++++++
2 files changed, 65 insertions(+)
diff --git a/ArmPlatformPkg/ArmPlatformPkg.dec b/ArmPlatformPkg/ArmPlatformPkg.dec
index e4afe5da8e11..4f062292663b 100644
--- a/ArmPlatformPkg/ArmPlatformPkg.dec
+++ b/ArmPlatformPkg/ArmPlatformPkg.dec
@@ -131,3 +131,4 @@
[Protocols.common]
## Arm Platform HEST table generation protocol
gHestTableProtocolGuid = { 0x705bdcd9, 0x8c47, 0x457e, { 0xad, 0x0d, 0xf7, 0x86, 0xf3, 0x4a, 0x0d, 0x63 } }
+ 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..95afd4dffe9c
--- /dev/null
+++ b/ArmPlatformPkg/Include/Protocol/HestErrorSourceInfo.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 MM_HEST_ERROR_SOURCE_DESC_PROTOCOL_
+ MM_HEST_ERROR_SOURCE_DESC_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.
+
+ @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) (
+ IN MM_HEST_ERROR_SOURCE_DESC_PROTOCOL *This,
+ OUT VOID **Buffer,
+ OUT UINTN *ErrorSourcesLength,
+ OUT UINTN *ErrorSourcesCount
+ );
+
+//
+// Protocol declaration
+//
+struct MM_HEST_ERROR_SOURCE_DESC_PROTOCOL_ {
+ MM_HEST_GET_ERROR_SOURCE_DESCRIPTORS GetHestErrorSourceDescriptors;
+};
+
+extern EFI_GUID gMmHestErrorSourceDescProtocolGuid;
+
+#endif // MM_HEST_ERROR_SOURCE_DESC_
--
2.17.1
next prev parent reply other threads:[~2021-07-10 16:18 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-07-10 16:18 [PATCH v2 0/4] ArmPlatformPkg: Add support to generate HEST ACPI table Omkar Anand Kulkarni
2021-07-10 16:18 ` [PATCH v2 1/4] ArmPlatformPkg: Allow dynamic generation of " Omkar Anand Kulkarni
2021-08-02 12:50 ` Sami Mujawar
2021-08-24 5:22 ` Omkar Anand Kulkarni
2021-07-10 16:18 ` Omkar Anand Kulkarni [this message]
2021-08-03 14:45 ` [PATCH v2 2/4] ArmPlatformPkg: add definition for MM_HEST_ERROR_SOURCE_DESC_PROTOCOL Sami Mujawar
2021-08-24 5:23 ` Omkar Anand Kulkarni
2021-07-10 16:18 ` [PATCH v2 3/4] ArmPlatformPkg: retreive error source descriptors from MM Omkar Anand Kulkarni
2021-08-03 14:46 ` Sami Mujawar
2021-08-24 5:29 ` Omkar Anand Kulkarni
2021-07-10 16:18 ` [PATCH v2 4/4] ArmPlatformPkg: Add helpers for HEST table generation Omkar Anand Kulkarni
2021-08-03 15:09 ` Sami Mujawar
2021-08-24 5:30 ` Omkar Anand Kulkarni
2021-08-02 12:49 ` [PATCH v2 0/4] ArmPlatformPkg: Add support to generate HEST ACPI table Sami Mujawar
2021-08-03 15:14 ` Sami Mujawar
2021-08-24 5:19 ` Omkar Anand Kulkarni
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-list from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20210710161831.30433-3-omkar.kulkarni@arm.com \
--to=devel@edk2.groups.io \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox