[edk2-devel] [edk2-platforms][PATCH v3 4/5] EmbeddedPkg: Add helpers for HEST table generation
Omkar Anand Kulkarni
omkar.kulkarni at arm.com
Tue Aug 24 05:34:02 UTC 2021
Add helper macros for the generation of the HEST ACPI table. Macros to
initialize the HEST GHESv2 Notification Structure and Error Status
Structure are introduced.
Signed-off-by: Omkar Anand Kulkarni <omkar.kulkarni at arm.com>
---
EmbeddedPkg/Include/Library/AcpiLib.h | 20 ++++++++++++++++++++
1 file changed, 20 insertions(+)
diff --git a/EmbeddedPkg/Include/Library/AcpiLib.h b/EmbeddedPkg/Include/Library/AcpiLib.h
index c142446d9d59..6de067823011 100644
--- a/EmbeddedPkg/Include/Library/AcpiLib.h
+++ b/EmbeddedPkg/Include/Library/AcpiLib.h
@@ -22,6 +22,7 @@
#define ARM_GAS16(Address) { EFI_ACPI_5_0_SYSTEM_MEMORY, 16, 0, EFI_ACPI_5_0_WORD, Address }
#define ARM_GAS32(Address) { EFI_ACPI_5_0_SYSTEM_MEMORY, 32, 0, EFI_ACPI_5_0_DWORD, Address }
#define ARM_GASN(Address) { EFI_ACPI_5_0_SYSTEM_MEMORY, 0, 0, EFI_ACPI_5_0_DWORD, Address }
+#define ARM_GAS64(Address) { EFI_ACPI_6_3_SYSTEM_MEMORY, 64, 0, EFI_ACPI_6_3_QWORD, Address }
//
// Macros for the Multiple APIC Description Table (MADT)
@@ -89,6 +90,25 @@
WatchdogTimerGSIV, WatchdogTimerFlags \
}
+//
+// HEST table GHESv2 type related structure.
+// Helper Macro to initialize the HEST GHESv2 Notification Structure.
+// Refer Table 18-394 in ACPI Specification, Version 6.3.
+//
+#define EFI_ACPI_6_3_HARDWARE_ERROR_NOTIFICATION_STRUCTURE_INIT(Type, \
+ PollInterval, EventId) \
+ { \
+ Type, \
+ sizeof (EFI_ACPI_6_3_HARDWARE_ERROR_NOTIFICATION_STRUCTURE), \
+ {0, 0, 0, 0, 0, 0, 0}, /* ConfigurationWriteEnable */ \
+ PollInterval, \
+ EventId, \
+ 0, /* Poll Interval Threshold Value */ \
+ 0, /* Poll Interval Threshold Window */ \
+ 0, /* Error Threshold Value */ \
+ 0 /* Error Threshold Window */ \
+ }
+
typedef
BOOLEAN
(EFIAPI *EFI_LOCATE_ACPI_CHECK) (
--
2.17.1
-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#79745): https://edk2.groups.io/g/devel/message/79745
Mute This Topic: https://groups.io/mt/85104608/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