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@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/1787277
Group Owner: devel+owner@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org]
-=-=-=-=-=-=-=-=-=-=-=-
Hi Omkar,
This patch looks good to me.
Reviewed-by: Sami Mujawar <sami.mujawar@arm.com>
Regards,
Sami Mujawar
On 24/08/2021 06:34 AM, Omkar Anand Kulkarni wrote:
> 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@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) (
-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#81456): https://edk2.groups.io/g/devel/message/81456
Mute This Topic: https://groups.io/mt/85104608/1787277
Group Owner: devel+owner@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org]
-=-=-=-=-=-=-=-=-=-=-=-
© 2016 - 2026 Red Hat, Inc.