summaryrefslogtreecommitdiff
path: root/src/include
diff options
context:
space:
mode:
authorTim Chu <Tim.Chu@quantatw.com>2022-11-04 08:25:51 +0000
committerMartin L Roth <gaumless@gmail.com>2022-12-09 03:46:33 +0000
commit14008751231124483d4854595592e228f2cdced0 (patch)
treec45d7bc384cfeceee23b516f94885b1fb0fbca1b /src/include
parent3cc20202de705baf45e58dfecf5937044d0b5c10 (diff)
include/cper.h: Add CPER Memory Error Section definitions
Add Memory Error Section definitions from UEFI Specification rev 2.10 appendix N.2.5. The structure defined here may be used for machine check handling. Signed-off-by: Tim Chu <Tim.Chu@quantatw.com> Change-Id: I0a165350a16a4cbe4033a3e7c43fa23a5b27c44b Reviewed-on: https://review.coreboot.org/c/coreboot/+/69198 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Jonathan Zhang <jonzhang@fb.com> Reviewed-by: Angel Pons <th3fanbus@gmail.com>
Diffstat (limited to 'src/include')
-rw-r--r--src/include/cper.h32
1 files changed, 32 insertions, 0 deletions
diff --git a/src/include/cper.h b/src/include/cper.h
index 576e1d878e..af1778534a 100644
--- a/src/include/cper.h
+++ b/src/include/cper.h
@@ -370,6 +370,38 @@ typedef struct cper_ia32x64_ctx_x64state {
u16 tr;
} cper_ia32x64_ctx_x64state_t;
+/* UEFI Spec 2.10, Appendix N.2.5 Memory Error Types (Table N.31) */
+#define CPER_UNDEFINED 0
+#define CPER_ERR_SINGLE_BIT_ECC 2
+#define CPER_ERR_MULTI_BIT_ECC 3
+#define CPER_ERR_MEM_PARITY_ERR 8
+#define CPER_ERR_MEM_SCRUB_CE_ERR 13
+#define CPER_ERR_MEM_SCRUB_UCE_ERR 14
+
+/* UEFI Spec 2.10, Appendix N.2.5 Memory Error Section (Table N.31) */
+struct cper_memory_section {
+ u64 valid_bits;
+ u64 err_sts;
+ u64 phys_addr;
+ u64 phys_addr_mask;
+ u16 node;
+ u16 card;
+ u16 module;
+ u16 bank;
+ u16 device;
+ u16 row;
+ u16 column;
+ u16 bit_position;
+ u64 requestor_id;
+ u64 responder_id;
+ u64 target_id;
+ u8 mem_err_type;
+ u8 extended;
+ u16 rank_number;
+ u16 card_handle;
+ u16 module_handle;
+};
+
#define FW_ERR_RECORD_ID_CRASHLOG_GUID \
GUID_INIT(0x8f87f311, 0xc998, 0x4d9e, \
0xa0, 0xc4, 0x60, 0x65, 0x51, 0x8c, 0x4f, 0x6d)