1 /* SPDX-License-Identifier: GPL-2.0-or-later */ 2 3 #ifndef _HEST_H_ 4 #define _HEST_H_ 5 #include <acpi/acpi.h> 6 7 #define MCE_ERR_POLL_MS_INTERVAL 1000 8 #define HEST_PCIE_RP_AER_DESC_TYPE 6 9 #define HEST_GHES_DESC_TYPE 9 10 #define GHES_MAX_RAW_DATA_LENGTH (((CONFIG_ERROR_LOG_BUFFER_SIZE) >> 1) - 8) 11 #define GHEST_ERROR_STATUS_BLOCK_LENGTH ((CONFIG_ERROR_LOG_BUFFER_SIZE) >> 1) 12 #define GHEST_ASSIST (1 << 2) 13 #define FIRMWARE_FIRST (1 << 0) 14 #define MEM_VALID_BITS 0x66ff 15 #define PCIE_VALID_BITS 0xef 16 #define QWORD_ACCESS 4 17 #define NOTIFY_TYPE_SCI 3 18 19 /* Generic Error Source Descriptor */ 20 typedef struct acpi_ghes_esd { 21 u16 type; 22 u16 source_id; 23 u16 related_src_id; 24 u8 flags; 25 u8 enabled; 26 u32 prealloc_erecords; 27 u32 max_section_per_record; 28 } __packed acpi_ghes_esd_t; 29 30 typedef struct ghes_record { 31 acpi_ghes_esd_t esd; 32 u32 max_raw_data_length; 33 acpi_addr64_t sts_addr; 34 acpi_hest_hen_t notify; 35 u32 err_sts_blk_len; 36 } __packed ghes_record_t; 37 38 unsigned long hest_create(unsigned long current, struct acpi_rsdp *rsdp); 39 40 #endif 41