[edk2-devel] [PATCH 2/3] ArmPlatformPkg: add definition for MM_HEST_ERROR_SOURCE_DESC_PROTOCOL
Omkar Anand Kulkarni
omkar.kulkarni at arm.com
Fri Oct 30 08:36:10 UTC 2020
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 at arm.com>
Signed-off-by: Omkar Anand Kulkarni <omkar.kulkarni at 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 23c5b768f677..8fc44c40e813 100644
--- a/ArmPlatformPkg/ArmPlatformPkg.dec
+++ b/ArmPlatformPkg/ArmPlatformPkg.dec
@@ -114,3 +114,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..396a7cc48ee9
--- /dev/null
+++ b/ArmPlatformPkg/Include/Protocol/HestErrorSourceInfo.h
@@ -0,0 +1,64 @@
+/** @file
+ Standalone MM protocol to get the HEST secure error source descriptor
+ information.
+
+ Drivers must implement his protocol in order to pusblih their Hardware
+ error source descriptor information to OS through the HEST ACPI table.
+
+ Copyright (c) 2020, 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 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
+ descriptors.
+ If the user of this driver calls the protocol by passing NULL as Buffer parameter.
+ Then protocol shall return EFI_INVALID_PARAMETR with the total length and count of
+ the error source descriptor it supports.
+
+ @param[in] This Instance of MM_HEST_ERROR_SOURCE_DESC_PROTOCOL.
+ @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
-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#66824): https://edk2.groups.io/g/devel/message/66824
Mute This Topic: https://groups.io/mt/77913842/1813853
Group Owner: devel+owner at edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [edk2-devel-archive at redhat.com]
-=-=-=-=-=-=-=-=-=-=-=-
More information about the edk2-devel-archive
mailing list