aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/cper.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/linux/cper.h')
-rw-r--r--include/linux/cper.h32
1 files changed, 32 insertions, 0 deletions
diff --git a/include/linux/cper.h b/include/linux/cper.h
index 2fc0ec3d89cc..76abba4b238e 100644
--- a/include/linux/cper.h
+++ b/include/linux/cper.h
@@ -22,6 +22,7 @@
22#define LINUX_CPER_H 22#define LINUX_CPER_H
23 23
24#include <linux/uuid.h> 24#include <linux/uuid.h>
25#include <linux/trace_seq.h>
25 26
26/* CPER record signature and the size */ 27/* CPER record signature and the size */
27#define CPER_SIG_RECORD "CPER" 28#define CPER_SIG_RECORD "CPER"
@@ -36,6 +37,13 @@
36#define CPER_RECORD_REV 0x0100 37#define CPER_RECORD_REV 0x0100
37 38
38/* 39/*
40 * CPER record length contains the CPER fields which are relevant for further
41 * handling of a memory error in userspace (we don't carry all the fields
42 * defined in the UEFI spec because some of them don't make any sense.)
43 * Currently, a length of 256 should be more than enough.
44 */
45#define CPER_REC_LEN 256
46/*
39 * Severity difinition for error_severity in struct cper_record_header 47 * Severity difinition for error_severity in struct cper_record_header
40 * and section_severity in struct cper_section_descriptor 48 * and section_severity in struct cper_section_descriptor
41 */ 49 */
@@ -356,6 +364,24 @@ struct cper_sec_mem_err {
356 __u16 mem_dev_handle; /* module handle in UEFI 2.4 */ 364 __u16 mem_dev_handle; /* module handle in UEFI 2.4 */
357}; 365};
358 366
367struct cper_mem_err_compact {
368 __u64 validation_bits;
369 __u16 node;
370 __u16 card;
371 __u16 module;
372 __u16 bank;
373 __u16 device;
374 __u16 row;
375 __u16 column;
376 __u16 bit_pos;
377 __u64 requestor_id;
378 __u64 responder_id;
379 __u64 target_id;
380 __u16 rank;
381 __u16 mem_array_handle;
382 __u16 mem_dev_handle;
383};
384
359struct cper_sec_pcie { 385struct cper_sec_pcie {
360 __u64 validation_bits; 386 __u64 validation_bits;
361 __u32 port_type; 387 __u32 port_type;
@@ -395,7 +421,13 @@ struct cper_sec_pcie {
395#pragma pack() 421#pragma pack()
396 422
397u64 cper_next_record_id(void); 423u64 cper_next_record_id(void);
424const char *cper_severity_str(unsigned int);
425const char *cper_mem_err_type_str(unsigned int);
398void cper_print_bits(const char *prefix, unsigned int bits, 426void cper_print_bits(const char *prefix, unsigned int bits,
399 const char * const strs[], unsigned int strs_size); 427 const char * const strs[], unsigned int strs_size);
428void cper_mem_err_pack(const struct cper_sec_mem_err *,
429 struct cper_mem_err_compact *);
430const char *cper_mem_err_unpack(struct trace_seq *,
431 struct cper_mem_err_compact *);
400 432
401#endif 433#endif