/* CPER record signature and the size */ #define CPER_SIG_RECORD "CPER" #define CPER_SIG_SIZE 4 /* Used in signature_end field in struct cper_record_header */ #define CPER_SIG_END 0xffffffff
/* * CPER record header revision, used in revision field in struct * cper_record_header
*/ #define CPER_RECORD_REV 0x0100
/* * CPER record length contains the CPER fields which are relevant for further * handling of a memory error in userspace (we don't carry all the fields * defined in the UEFI spec because some of them don't make any sense.) * Currently, a length of 256 should be more than enough.
*/ #define CPER_REC_LEN 256 /* * Severity definition for error_severity in struct cper_record_header * and section_severity in struct cper_section_descriptor
*/ enum {
CPER_SEV_RECOVERABLE,
CPER_SEV_FATAL,
CPER_SEV_CORRECTED,
CPER_SEV_INFORMATIONAL,
};
/* * Validation bits definition for validation_bits in struct * cper_record_header. If set, corresponding fields in struct * cper_record_header contain valid information.
*/ #define CPER_VALID_PLATFORM_ID 0x0001 #define CPER_VALID_TIMESTAMP 0x0002 #define CPER_VALID_PARTITION_ID 0x0004
/* * Notification type used to generate error record, used in * notification_type in struct cper_record_header. These UUIDs are defined * in the UEFI spec v2.7, sec N.2.1.
*/
/* CXL Event record UUIDs are formatted as GUIDs and reported in section type */ /* * General Media Event Record * CXL rev 3.0 Section 8.2.9.2.1.1; Table 8-43
*/ #define CPER_SEC_CXL_GEN_MEDIA_GUID \
GUID_INIT(0xfbcd0a77, 0xc260, 0x417f, \
0x85, 0xa9, 0x08, 0x8b, 0x16, 0x21, 0xeb, 0xa6) /* * DRAM Event Record * CXL rev 3.0 section 8.2.9.2.1.2; Table 8-44
*/ #define CPER_SEC_CXL_DRAM_GUID \
GUID_INIT(0x601dcbb3, 0x9c06, 0x4eab, \
0xb8, 0xaf, 0x4e, 0x9b, 0xfb, 0x5c, 0x96, 0x24) /* * Memory Module Event Record * CXL rev 3.0 section 8.2.9.2.1.3; Table 8-45
*/ #define CPER_SEC_CXL_MEM_MODULE_GUID \
GUID_INIT(0xfe927475, 0xdd59, 0x4339, \
0xa5, 0x86, 0x79, 0xba, 0xb1, 0x13, 0xb7, 0x74)
/* * Flags bits definitions for flags in struct cper_record_header * If set, the error has been recovered
*/ #define CPER_HW_ERROR_FLAGS_RECOVERED 0x1 /* If set, the error is for previous boot */ #define CPER_HW_ERROR_FLAGS_PREVERR 0x2 /* If set, the error is injected for testing */ #define CPER_HW_ERROR_FLAGS_SIMULATED 0x4
/* * CPER section header revision, used in revision field in struct * cper_section_descriptor
*/ #define CPER_SEC_REV 0x0100
/* * Validation bits definition for validation_bits in struct * cper_section_descriptor. If set, corresponding fields in struct * cper_section_descriptor contain valid information.
*/ #define CPER_SEC_VALID_FRU_ID 0x1 #define CPER_SEC_VALID_FRU_TEXT 0x2
/* * Flags bits definitions for flags in struct cper_section_descriptor * * If set, the section is associated with the error condition * directly, and should be focused on
*/ #define CPER_SEC_PRIMARY 0x0001 /* * If set, the error was not contained within the processor or memory * hierarchy and the error may have propagated to persistent storage * or network
*/ #define CPER_SEC_CONTAINMENT_WARNING 0x0002 /* If set, the component must be re-initialized or re-enabled prior to use */ #define CPER_SEC_RESET 0x0004 /* If set, Linux may choose to discontinue use of the resource */ #define CPER_SEC_ERROR_THRESHOLD_EXCEEDED 0x0008 /* * If set, resource could not be queried for error information due to * conflicts with other system software or resources. Some fields of * the section will be invalid
*/ #define CPER_SEC_RESOURCE_NOT_ACCESSIBLE 0x0010 /* * If set, action has been taken to ensure error containment (such as * poisoning data), but the error has not been fully corrected and the * data has not been consumed. Linux may choose to take further * corrective action before the data is consumed
*/ #define CPER_SEC_LATENT_ERROR 0x0020
/* * Section type definitions, used in section_type field in struct * cper_section_descriptor. These UUIDs are defined in the UEFI spec * v2.7, sec N.2.2.
*/
/* * All tables and structs must be byte-packed to match CPER * specification, since the tables are provided by the system BIOS
*/ #pragmapack(1)
/* Record Header, UEFI v2.7 sec N.2.1 */ struct cper_record_header { char signature[CPER_SIG_SIZE]; /* must be CPER_SIG_RECORD */
u16 revision; /* must be CPER_RECORD_REV */
u32 signature_end; /* must be CPER_SIG_END */
u16 section_count;
u32 error_severity;
u32 validation_bits;
u32 record_length;
u64 timestamp;
guid_t platform_id;
guid_t partition_id;
guid_t creator_id;
guid_t notification_type;
u64 record_id;
u32 flags;
u64 persistence_information;
u8 reserved[12]; /* must be zero */
};
/* Section Descriptor, UEFI v2.7 sec N.2.2 */ struct cper_section_descriptor {
u32 section_offset; /* Offset in bytes of the * section body from the base
* of the record header */
u32 section_length;
u16 revision; /* must be CPER_RECORD_REV */
u8 validation_bits;
u8 reserved; /* must be zero */
u32 flags;
guid_t section_type;
guid_t fru_id;
u32 section_severity;
u8 fru_text[20];
};
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.