Skip to contentSkip to conversation

EDAC: OcteonTX: Add EDAC driver OcteonTX2/Octeon10

PATCH New Vasyl Gomonovych 1 participant 1 message Apr 15, 2022

Subsystems (4)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 EDAC: OcteonTX: Add EDAC driver OcteonTX2/Octeon10

Marvell OcteonTX2/Octeon10 (CN10K) SoCs have support for EDAC capable on-chip peripherals, namely the DRAM controllers and internal memory controllers for tad/cache diagnostics. Platforms support correct one bit errors and detect two bit errors. Driver get notified via SDEI after firmware first handling from TF-ARM Return the apei_hest_parse function, which we use for error source enumeration, and adapt the HEST error status
block address after being modified by firmware to satisfy DRAM property and layout. Revert commit:
commit 06606646af97 ("ACPI: APEI: mark apei_hest_parse() static")

---
 drivers/acpi/apei/hest.c     |   5 +-
 drivers/edac/Kconfig         |  11 +
 drivers/edac/Makefile        |   1 +
 drivers/edac/octeontx_edac.c | 598 +++++++++++++++++++++++++++++++++++
 drivers/edac/octeontx_edac.h | 102 ++++++
 include/acpi/apei.h          |   3 +
 6 files changed, 717 insertions(+), 3 deletions(-)
 create mode 100644 drivers/edac/octeontx_edac.c
 create mode 100644 drivers/edac/octeontx_edac.h
drivers/acpi/apei/hest.c +2 -3
index 6aef1ee5e1bd..317bba602ad5 100644
@@ -86,9 +86,7 @@ static int hest_esrc_len(struct acpi_hest_header *hest_hdr)
 	return len;
 };
 
-typedef int (*apei_hest_func_t)(struct acpi_hest_header *hest_hdr, void *data);
-
-static int apei_hest_parse(apei_hest_func_t func, void *data)
+int apei_hest_parse(apei_hest_func_t func, void *data)
 {
 	struct acpi_hest_header *hest_hdr;
 	int i, rc, len;
@@ -123,6 +121,7 @@ static int apei_hest_parse(apei_hest_func_t func, void *data)
 
 	return 0;
 }
+EXPORT_SYMBOL_GPL(apei_hest_parse);
 
 /*
  * Check if firmware advertises firmware first mode. We need FF bit to be set
drivers/edac/Kconfig +11 -0
index 58ab63642e72..bb42d5227954 100644
@@ -539,4 +539,15 @@ config EDAC_DMC520
 	  Support for error detection and correction on the
 	  SoCs with ARM DMC-520 DRAM controller.
 
+config EDAC_OCTEONTX
+	bool "Marvell OcteonTX2 Octeon10 SoC EDAC"
+	select ARM_SDE_INTERFACE
+	select ACPI_APEI_GHES
+	help
+	  Support for error detection and correction on the
+	  Marvell OcteonTX2 and Octeon10 (CN10K) SoCs.
+	  This driver will allow SECDED errors detected in
+	  the firmware first model and reported via SDEI callbacks.
+	  EDAC Driver report Single Bit Errors and Double Bit Errors.
+
 endif # EDAC
drivers/edac/Makefile +1 -0
index 2d1641a27a28..dab4438a6c1a 100644
@@ -84,3 +84,4 @@ obj-$(CONFIG_EDAC_QCOM)			+= qcom_edac.o
 obj-$(CONFIG_EDAC_ASPEED)		+= aspeed_edac.o
 obj-$(CONFIG_EDAC_BLUEFIELD)		+= bluefield_edac.o
 obj-$(CONFIG_EDAC_DMC520)		+= dmc520_edac.o
+obj-$(CONFIG_EDAC_OCTEONTX)		+= octeontx_edac.o
drivers/edac/octeontx_edac.c new file +598 -0

598 lines not on this page · raw message

drivers/edac/octeontx_edac.h new file +102 -0

102 lines not on this page · raw message

include/acpi/apei.h +3 -0
index afaca3a075e8..4be95ef425c0 100644
@@ -39,6 +39,9 @@ void __init acpi_hest_init(void);
 static inline void acpi_hest_init(void) { }
 #endif
 
+typedef int (*apei_hest_func_t)(struct acpi_hest_header *hest_hdr, void *data);
+int apei_hest_parse(apei_hest_func_t func, void *data);
+
 int erst_write(const struct cper_record_header *record);
 ssize_t erst_get_record_count(void);
 int erst_get_record_id_begin(int *pos);
Signature · 1 line
2.17.1