From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by mx.groups.io with SMTP id smtpd.web11.35646.1629783288968603943 for ; Mon, 23 Aug 2021 22:34:49 -0700 Authentication-Results: mx.groups.io; dkim=missing; spf=pass (domain: arm.com, ip: 217.140.110.172, mailfrom: omkar.kulkarni@arm.com) Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id AAF601042; Mon, 23 Aug 2021 22:34:48 -0700 (PDT) Received: from usa.arm.com (a077433.blr.arm.com [10.162.46.10]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPA id 7774F3F766; Mon, 23 Aug 2021 22:34:47 -0700 (PDT) From: "Omkar Anand Kulkarni" To: devel@edk2.groups.io Cc: Ard Biesheuvel , Sami Mujawar Subject: [edk2-platforms][PATCH v3 4/5] EmbeddedPkg: Add helpers for HEST table generation Date: Tue, 24 Aug 2021 11:04:02 +0530 Message-Id: <20210824053403.24103-5-omkar.kulkarni@arm.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20210824053403.24103-1-omkar.kulkarni@arm.com> References: <20210824053403.24103-1-omkar.kulkarni@arm.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable 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 --- 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 } =20 // // Macros for the Multiple APIC Description Table (MADT) @@ -89,6 +90,25 @@ WatchdogTimerGSIV, WatchdogTimerFlags = \ } =20 +// +// 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) ( --=20 2.17.1