efi: cper: Define macro for errors type
PATCH 1/1 efi: cper: Define macro for errors type
CPER defines errors type, which is currently in form of raw numbers referenced from cper and ghes_edac modules. CPER format sharable with firmware. This errors type macro can be common and share errors type between kernel and firmware and eliminate magic numbers uses. Also will simplify do code reuse in ghes_edac_report_mem_error.
Signed-off-by Vasyl Gomonovych <[email protected]>
--- include/linux/cper.h | 17 +++++++++++++++++ 1 file changed, 17 insertions(+)
include/linux/cper.h +17 -0
@@ -314,6 +314,23 @@ enum {#define CPER_ARM_ERR_ACCESS_MODE_SHIFT 43#define CPER_ARM_ERR_ACCESS_MODE_MASK GENMASK(0,0) +#define CPER_MEM_ERR_TYPE_UNKNOWN 0 +#define CPER_MEM_ERR_TYPE_NO_ERR 1 +#define CPER_MEM_ERR_TYPE_SBIT_ECC 2 +#define CPER_MEM_ERR_TYPE_MBIT_ECC 3 +#define CPER_MEM_ERR_TYPE_SSB_ECC 4 +#define CPER_MEM_ERR_TYPE_MSB_ECC 5 +#define CPER_MEM_ERR_TYPE_MSTR_ABRT 6 +#define CPER_MEM_ERR_TYPE_TARG_ABRT 7 +#define CPER_MEM_ERR_TYPE_PARITY_ERR 8 +#define CPER_MEM_ERR_TYPE_WDG_TIMOUT 9 +#define CPER_MEM_ERR_TYPE_INVAL_ADDR 10 +#define CPER_MEM_ERR_TYPE_MIRR_BROK 11 +#define CPER_MEM_ERR_TYPE_MEM_SPARING 12 +#define CPER_MEM_ERR_TYPE_SBR_CE 13 +#define CPER_MEM_ERR_TYPE_SBR_UE 14 +#define CPER_MEM_ERR_TYPE_PHYS_MAPOUT 15 +/* * All tables and structs must be byte-packed to match CPER * specification, since the tables are provided by the system BIOS
Signature · 1 line
2.17.1