linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] efi: cper: Define macro for errors type
@ 2022-04-20 17:57 Vasyl Gomonovych
  0 siblings, 0 replies; only message in thread
From: Vasyl Gomonovych @ 2022-04-20 17:57 UTC (permalink / raw)
  To: bp, ying.huang, alex.kluver, linux-kernel, vgomonovych

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 <vgomonovych@marvell.com>
---
 include/linux/cper.h | 17 +++++++++++++++++
 1 file changed, 17 insertions(+)

diff --git a/include/linux/cper.h b/include/linux/cper.h
index 6a511a1078ca069c4fa0e120b781c4203571afc8..13c09b08695241c9f040680c7435081f1cd2bcff 100644
--- a/include/linux/cper.h
+++ b/include/linux/cper.h
@@ -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
-- 
2.17.1


^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2022-04-20 17:58 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-04-20 17:57 [PATCH] efi: cper: Define macro for errors type Vasyl Gomonovych

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).