From 4ef87f455b57e4529db1420fbfba22c9c16f1444 Mon Sep 17 00:00:00 2001 From: Saloni Kasbekar Date: Thu, 29 Aug 2024 20:59:22 -0700 Subject: [PATCH] MdePkg: Add Reset Reason definitions Add Reset Reason definitions defined in ACPI 6.5 Signed-off-by: Saloni Kasbekar --- MdePkg/Include/IndustryStandard/Acpi65.h | 48 ++++++++++++++++++++++++ 1 file changed, 48 insertions(+) diff --git a/MdePkg/Include/IndustryStandard/Acpi65.h b/MdePkg/Include/IndustryStandard/Acpi65.h index 1f2af6ad2a52..42a9aaf860e2 100644 --- a/MdePkg/Include/IndustryStandard/Acpi65.h +++ b/MdePkg/Include/IndustryStandard/Acpi65.h @@ -2944,6 +2944,54 @@ typedef struct { #define EFI_ACPI_6_5_PHAT_FIRMWARE_HEALTH_DATA_RECORD_UNKNOWN 0x02 #define EFI_ACPI_6_5_PHAT_FIRMWARE_HEALTH_DATA_RECORD_ADVISORY 0x03 +/// +/// Reset Reason Health Record Vendor Data Entry +/// +typedef struct { + GUID VendorDataID; + UINT16 Length; + UINT16 Revision; + // UINTN Data[]; +} EFI_ACPI_6_5_PHAT_RESET_REASON_HEALTH_RECORD_VENDOR_DATA_ENTRY; + +/// +/// Reset Reason Health Record Structure +/// +typedef struct { + UINT8 SupportedSources; + UINT8 Source; + UINT8 SubSource; + UINT8 Reason; + UINT16 VendorCount; + // EFI_ACPI_6_5_PHAT_RESET_REASON_HEALTH_RECORD_VENDOR_DATA_ENTRY VendorSpecificResetReasonEntry[]; +} EFI_ACPI_6_5_PHAT_RESET_REASON_HEALTH_RECORD_STRUCTURE; + +#define EFI_ACPI_6_5_PHAT_RESET_REASON_HEADER_GUID { 0x7a014ce2, 0xf263, 0x4b77, { 0xb8, 0x8a, 0xe6, 0x33, 0x6b, 0x78, 0x2c, 0x14 }} + +#define EFI_ACPI_6_5_PHAT_RESET_REASON_SUPPORTED_SOURCES_UNKNOWN BIT0 +#define EFI_ACPI_6_5_PHAT_RESET_REASON_SUPPORTED_SOURCES_HARDWARE BIT1 +#define EFI_ACPI_6_5_PHAT_RESET_REASON_SUPPORTED_SOURCES_FIRMWARE BIT2 +#define EFI_ACPI_6_5_PHAT_RESET_REASON_SUPPORTED_SOURCES_SOFTWARE BIT3 +#define EFI_ACPI_6_5_PHAT_RESET_REASON_SUPPORTED_SOURCES_SUPERVISOR BIT4 + +#define EFI_ACPI_6_5_PHAT_RESET_REASON_SOURCES_UNKNOWN BIT0 +#define EFI_ACPI_6_5_PHAT_RESET_REASON_SOURCES_HARDWARE BIT1 +#define EFI_ACPI_6_5_PHAT_RESET_REASON_SOURCES_FIRMWARE BIT2 +#define EFI_ACPI_6_5_PHAT_RESET_REASON_SOURCES_SOFTWARE BIT3 +#define EFI_ACPI_6_5_PHAT_RESET_REASON_SOURCES_SUPERVISOR BIT4 + +#define EFI_ACPI_6_5_PHAT_RESET_REASON_REASON_UNKNOWN 0x00 +#define EFI_ACPI_6_5_PHAT_RESET_REASON_REASON_COLD_BOOT 0x01 +#define EFI_ACPI_6_5_PHAT_RESET_REASON_REASON_COLD_RESET 0x02 +#define EFI_ACPI_6_5_PHAT_RESET_REASON_REASON_WARM_RESET 0x03 +#define EFI_ACPI_6_5_PHAT_RESET_REASON_REASON_UPDATE 0x04 +#define EFI_ACPI_6_5_PHAT_RESET_REASON_REASON_UNEXPECTED_RESET 0x20 +#define EFI_ACPI_6_5_PHAT_RESET_REASON_REASON_FAULT 0x21 +#define EFI_ACPI_6_5_PHAT_RESET_REASON_REASON_TIMEOUT 0x22 +#define EFI_ACPI_6_5_PHAT_RESET_REASON_REASON_THERMAL 0x23 +#define EFI_ACPI_6_5_PHAT_RESET_REASON_REASON_POWER_LOSS 0x24 +#define EFI_ACPI_6_5_PHAT_RESET_REASON_REASON_POWER_BUTTON 0x25 + // // Known table signatures //