Attention is currently required from: Tim Chu.
Hello Tim Chu,
I'd like you to do a code review. Please visit
https://review.coreboot.org/c/coreboot/+/69198
to review the following change.
Change subject: include/cper.h: Add CPER Memory Error Section definitions ......................................................................
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 --- M src/include/cper.h 1 file changed, 48 insertions(+), 0 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/98/69198/1
diff --git a/src/include/cper.h b/src/include/cper.h index 576e1d8..8eccd0e 100644 --- a/src/include/cper.h +++ b/src/include/cper.h @@ -505,4 +505,38 @@ x86err->validation |= count << I32X64SEC_VALID_CTXNUM_SH; }
+/* UEFI Spec, Appendix N.2.5 Memory Error Types */ +enum cper_err_code { + CPER_UNDEFINED = 0, + CPER_ERR_SINGLE_BIT_ECC = 2, + CPER_ERR_MULTI_BIT_ECC = 3, + CPER_ERR_MEM_PARITY_ERR = 8, + CPER_ERR_MEM_SCRUB_CE_ERR = 13, + CPER_ERR_MEM_SCRUB_UCE_ERR = 14, +}; + +/* UEFI Spec, Appendix N.2.5 Memory Error Section */ +struct cper_memory_section { + u64 valid_bits; + u64 err_sts; // Fix later to struct + u64 phys_addr; + u64 phys_addr_mask; + u16 node; + u16 card; + u16 module; + u16 bank; + u16 device; + u16 row; + u16 column; + u16 bit_position; /* bit position of error */ + u64 requestor_id; + u64 responder_id; + u64 target_id; + enum cper_err_code mem_err_type; + u8 extended; + u16 rank_number; + u16 card_handle; + u16 module_handle; +} __packed; + #endif /* _CPER_H_ */