lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [day] [month] [year] [list]
Message-ID: <20220420175726.27789-1-vgomonovych@marvell.com>
Date:   Wed, 20 Apr 2022 10:57:24 -0700
From:   Vasyl Gomonovych <vgomonovych@...vell.com>
To:     <bp@...e.de>, <ying.huang@...el.com>, <alex.kluver@....com>,
        <linux-kernel@...r.kernel.org>, <vgomonovych@...vell.com>
Subject: [PATCH] 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 <vgomonovych@...vell.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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ