Skip to contentSkip to conversation

alpha: improve Tsunami machine check reporting

PATCH Superseded Magnus Lindholm 2 participants 15 messages Oct 9 – Oct 11 Alpha port

v5 of 8 Superseded Latest is v8 →

lore
Share & tools
lore

Magnus Lindholm

author maintainer
#0 lore raw

v5 cover alpha: improve Tsunami machine check reporting

This series adds system-error diagnostics for Tsunami/Typhoon and live ES40 environmental diagnostics for Clipper. It applies to v7.3-rc1 on the Alpha for-next branch (33465f6ab697).

The first two patches move the existing handler unchanged and describe the system logout frame. A separate EV6 prerequisite handles the short correctable CPU frame safely. The final two patches add Tsunami system handling, Clipper live environmental decoding and console-log reporting.

PERRMASK is left as configured by firmware. Enabling more checking needs separate justification and hardware testing. Inverted SMIR halt/reset signals remain undecoded; PSU tests do not establish their polarity.

ES40 Service Guide Table D-18 gives sys_offset=0x20 in its console header, but places the summary at frame+0x18. Console environmental packets are therefore printed raw until an actual SRM record can resolve the layout. Live environmental decoding follows Tables D-20 and D-21; QW8 is not used.

Changes since v4:
- Split the implementation into five patches; build error objects for CONFIG_ALPHA_TSUNAMI, covering non-generic Shark, DP264 and Eiger.
- Correct PCI/system addresses, ECC commands and syndrome, INV/SERR handling, DAC/MWIN selection, and SGE page granularity.
- Remove the unsupported Titan master-abort dismissal policy and leave PERRMASK as configured by firmware.
- Snapshot each live PERROR and MISC before acknowledging defined W1C bits; report additional live status without combining transaction fields.
- Check saved and live UECC/PERR before expected-probe dismissal and panic on either; retain expected NXM probe handling.
- Add an EV6 prerequisite to validate CPU-area bounds, including short correctable frames, before decoding extended registers.
- Restrict ES40 environmental decoding to Clipper; fix masks, fan input, print suppression, context-only status, and PSU warning source.
- Leave inverted SMIR halt/reset bits undecoded pending polarity checks.
- Preserve console environmental packets as raw data pending verification.
- Register console handling on all Tsunami boards; bound subpacket decode and terminate extended-register annotation arrays.
- Remove duplicate definitions and the private header; use shared IDs.

Link to v4
https://lore.kernel.org/linux-alpha/[email protected]/

Validation:
- Fresh vmlinux builds for minimal GENERIC, SHARK, DP264 and EIGER configurations, using GCC 15.0.1.
- Native ASan/UBSan tests of the actual EV6/Tsunami handlers, console dispatch and raw-dump helpers, including short/truncated frames, saved fatal errors during expected probes, and separate live snapshots.
- git am of the five exported patches on the base produces the exact branch tree; git diff --check passes.
- checkpatch reports zero errors. Its remaining warnings include the Alpha err_print_prefix convention, existing split printk strings, moved barrier code and the new-file MAINTAINERS prompt.

This version was boot-tested on an AlphaServer ES40 using my ES40 configuration. Unplugging and reconnecting a PSU power cable produced correctable environmental events (code 206): PSU 0 was reported failed, then enabled again with its individual failure indication cleared. SMIR bit 0 remained set in all three reports; this does not establish whether it describes current status or a latched event.

Earlier v4 testing was on the same ES40, using PSU power-cable changes, opened hatches and a CALLSYS-based software trigger with modified handling. PALcode clearing behavior and halt/reset polarity remain unverified.

Magnus Lindholm (5):
alpha: move Tsunami machine check handling to err_tsunami.c
alpha: describe the Tsunami system machine check frame
alpha: bound EV6 logout decoding by the processor area
alpha: decode and acknowledge Tsunami system machine checks
alpha: decode Clipper environmental events and retain Tsunami console
logs

 arch/alpha/include/asm/core_tsunami.h |   5 +
 arch/alpha/include/asm/err_common.h   |   2 +
 arch/alpha/kernel/Makefile            |   4 +-
 arch/alpha/kernel/core_tsunami.c      |  34 --
 arch/alpha/kernel/err_ev6.c           |  36 +-
 arch/alpha/kernel/err_tsunami.c       | 595 ++++++++++++++++++++++++++
 arch/alpha/kernel/proto.h             |   2 +
 arch/alpha/kernel/sys_dp264.c         |  12 +-
 arch/alpha/kernel/sys_eiger.c         |   2 +-
 9 files changed, 640 insertions(+), 52 deletions(-)
 create mode 100644 arch/alpha/kernel/err_tsunami.c

base-commit: 33465f6ab697abceafd9a340067a544d551c4412

Signature · 1 line
2.43.0
author maintainer
#1 lore raw

PATCH v5 1/5 alpha: move Tsunami machine check handling to err_tsunami.c

Move the existing handler and PCI error clearing helpers without changing their behavior. Build the error objects for ALPHA_TSUNAMI so that all Tsunami configurations, including non-generic Shark, can use them.

---
 arch/alpha/kernel/Makefile       |  4 ++-
 arch/alpha/kernel/core_tsunami.c | 34 -----------------------
 arch/alpha/kernel/err_tsunami.c  | 47 ++++++++++++++++++++++++++++++++
 3 files changed, 50 insertions(+), 35 deletions(-)
 create mode 100644 arch/alpha/kernel/err_tsunami.c
arch/alpha/kernel/Makefile +3 -1
index 4ea5c189e60e..0178f6a5bdb8 100644
@@ -39,7 +39,7 @@ obj-y    += err_ev7.o err_titan.o err_marvel.o
 endif
 
 obj-y	 += irq_pyxis.o irq_i8259.o irq_srm.o
-obj-y	 += err_ev6.o
+obj-y	 += err_ev6.o err_tsunami.o
 obj-y	 += es1888.o smc37c669.o smc37c93x.o pc873xx.o gct.o
 obj-y    += srmcons.o
 
@@ -89,4 +89,6 @@ obj-$(CONFIG_ALPHA_MARVEL)	+= err_ev7.o err_marvel.o
 obj-$(CONFIG_ALPHA_NAUTILUS)	+= err_ev6.o
 obj-$(CONFIG_ALPHA_TITAN)	+= err_ev6.o err_titan.o
 
+obj-$(CONFIG_ALPHA_TSUNAMI)	+= err_ev6.o err_tsunami.o
+
 endif # GENERIC
arch/alpha/kernel/core_tsunami.c +0 -34
index fc1ab73f23de..d435ec9fb828 100644
@@ -448,37 +448,3 @@ tsunami_kill_arch(int mode)
 	if (TSUNAMI_cchip->csc.csr & 1L<<14)
 		tsunami_kill_one_pchip(TSUNAMI_pchip1, 1);
 }
-
-static inline void
-tsunami_pci_clr_err_1(tsunami_pchip *pchip)
-{
-	pchip->perror.csr;
-	pchip->perror.csr = 0x040;
-	mb();
-	pchip->perror.csr;
-}
-
-static inline void
-tsunami_pci_clr_err(void)
-{
-	tsunami_pci_clr_err_1(TSUNAMI_pchip0);
-
-	/* TSUNAMI and TYPHOON can have 2, but might only have 1 (DS10) */
-	if (TSUNAMI_cchip->csc.csr & 1L<<14)
-		tsunami_pci_clr_err_1(TSUNAMI_pchip1);
-}
-
-void
-tsunami_machine_check(unsigned long vector, unsigned long la_ptr)
-{
-	/* Clear error before any reporting.  */
-	mb();
-	mb();  /* magic */
-	draina();
-	tsunami_pci_clr_err();
-	wrmces(0x7);
-	mb();
-
-	process_mcheck_info(vector, la_ptr, "TSUNAMI",
-			    mcheck_expected(smp_processor_id()));
-}
arch/alpha/kernel/err_tsunami.c new file +47 -0

47 lines not on this page · raw message

Signature · 1 line
2.43.0
author maintainer
#4 lore raw

PATCH v5 2/5 alpha: describe the Tsunami system machine check frame

In reply to Magnus Lindholm

Define the five system-specific quadwords in the SRM logout frame, as documented in the AlphaServer ES40 Service Guide, Table D-19.

---
 arch/alpha/include/asm/core_tsunami.h | 5 +++++
 1 file changed, 5 insertions(+)
arch/alpha/include/asm/core_tsunami.h +5 -0
index 3391e95754f2..fe3fd4570fac 100644
@@ -283,6 +283,11 @@ union TPchipPERRMASK {
  * Data structure for handling TSUNAMI machine checks:
  */
 struct el_TSUNAMI_sysdata_mcheck {
+	u64 sesf;
+	u64 dir;
+	u64 misc;
+	u64 p0_perror;
+	u64 p1_perror;
 };
 
 
Signature · 1 line
2.43.0
author maintainer
#6 lore raw

PATCH v5 3/5 alpha: bound EV6 logout decoding by the processor area

In reply to Magnus Lindholm

The ES40 correctable logout frame has only the common CPU registers before its system area at offset 0x58. The EV6 decoder treats those system words as extra CPU registers and reads beyond the 0x80-byte frame.

Validate the CPU and system boundaries before decoding or dumping data. Print the additional CPU registers only when the processor area contains them. This also rejects truncated processor frames passed by console-log handlers. See the ES40 Service Guide EK-ES240-SV A01, Table D-19.

---
 arch/alpha/kernel/err_ev6.c | 36 ++++++++++++++++++++++++++----------
 1 file changed, 26 insertions(+), 10 deletions(-)
arch/alpha/kernel/err_ev6.c +26 -10
index 8144f2045b5b..ec0b63b0f377 100644
@@ -190,6 +190,23 @@ ev6_process_logout_frame(struct el_common *mchk_header, int print)
 		(struct el_common_EV6_mcheck *)mchk_header;
 	int status = MCHK_DISPOSITION_UNKNOWN_ERROR;
 
+	/*
+	 * ES40 correctable frames end the CPU area before EXC_ADDR (Table
+	 * D-19). Validate both regions before decoding or dumping any data.
+	 */
+	if (mchk_header->proc_offset != offsetof(struct el_common_EV6_mcheck,
+					       I_STAT) ||
+	    mchk_header->sys_offset < offsetof(struct el_common_EV6_mcheck,
+					      EXC_ADDR) ||
+	    mchk_header->sys_offset > mchk_header->size ||
+	    ((mchk_header->sys_offset | mchk_header->size) & 7)) {
+		if (print)
+			printk("%s    Invalid EV6 logout frame: size %x, CPU %x, system %x\n",
+			       err_print_prefix, mchk_header->size,
+			       mchk_header->proc_offset, mchk_header->sys_offset);
+		return MCHK_DISPOSITION_UNKNOWN_ERROR;
+	}
+
 	status |= ev6_parse_ibox(ev6mchk->I_STAT, print);
 	status |= ev6_parse_mbox(ev6mchk->MM_STAT, ev6mchk->DC_STAT, 
 				 ev6mchk->C_STAT, print);
@@ -203,16 +220,15 @@ ev6_process_logout_frame(struct el_common *mchk_header, int print)
 	if (status != MCHK_DISPOSITION_DISMISS) {
 		char *saved_err_prefix = err_print_prefix;
 
-		/*
-		 * Dump some additional information from the frame
-		 */
-		printk("%s    EXC_ADDR: 0x%016lx   IER_CM: 0x%016lx"
-		            "   ISUM: 0x%016lx\n"
-		         "    PAL_BASE: 0x%016lx   I_CTL:  0x%016lx"
-		            "   PCTX: 0x%016lx\n",
-		       err_print_prefix,
-		       ev6mchk->EXC_ADDR, ev6mchk->IER_CM, ev6mchk->ISUM,
-		       ev6mchk->PAL_BASE, ev6mchk->I_CTL, ev6mchk->PCTX);
+		/* These registers are absent from short correctable frames. */
+		if (mchk_header->sys_offset >= sizeof(*ev6mchk))
+			printk("%s    EXC_ADDR: 0x%016lx   IER_CM: 0x%016lx"
+			       "   ISUM: 0x%016lx\n"
+			       "    PAL_BASE: 0x%016lx   I_CTL:  0x%016lx"
+			       "   PCTX: 0x%016lx\n",
+			       err_print_prefix,
+			       ev6mchk->EXC_ADDR, ev6mchk->IER_CM, ev6mchk->ISUM,
+			       ev6mchk->PAL_BASE, ev6mchk->I_CTL, ev6mchk->PCTX);
 
 		if (status == MCHK_DISPOSITION_UNKNOWN_ERROR) {
 			printk("%s    UNKNOWN error, frame follows:\n",
Signature · 1 line
2.43.0
author maintainer
#9 lore raw

PATCH v5 4/5 alpha: decode and acknowledge Tsunami system machine checks

In reply to Magnus Lindholm

Decode PCI and ECC transactions separately, honor invalid transaction information, and select Pchip errors using the logout summary. Report master aborts until a Tsunami-specific dismissal policy can be justified. Delegate processor vectors to the bounded EV6 decoder.

Capture each live PERROR and MISC value before acknowledging their defined W1C bits. Report live status not already represented in the saved frame, retaining the Pchip identity, transaction and NXM source. Do not assume that PALcode cleared the registers or that its frame captures later errors.

Check saved and live UECC/PERR before expected-probe dismissal and panic on either. Preserve expected NXM probes, but report coincident Pchip errors before consuming the probe exception. Leave PERRMASK unchanged.

---
 arch/alpha/kernel/err_tsunami.c | 260 +++++++++++++++++++++++++++++---
 1 file changed, 242 insertions(+), 18 deletions(-)
arch/alpha/kernel/err_tsunami.c +242 -18
index 1045b920fa6b..bdaa39d6242a 100644
@@ -1,5 +1,10 @@
 // SPDX-License-Identifier: GPL-2.0
-/* Machine check handling for Tsunami/Typhoon systems. */
+/*
+ * Machine check handling for Tsunami/Typhoon systems.
+ * Author: Magnus Lindholm <[email protected]>
+ * Based on Titan error handling by Jeff Wiedemeier (Compaq).
+ * Register definitions: 21272 Hardware Reference Manual, revision 4.0.
+ */
 #include <linux/init.h>
 #include <linux/pci.h>
 #include <linux/sched.h>
@@ -12,36 +17,255 @@
 #include "proto.h"
 #include "pci_impl.h"
 
-static inline void
-tsunami_pci_clr_err_1(tsunami_pchip *pchip)
+#define TSUNAMI_PERROR_ERRMASK	0xdffUL
+#define TSUNAMI_PERROR_ECCMASK	(perror_m_uecc | perror_m_cre)
+#define TSUNAMI_PERROR_FATAL	(perror_m_uecc | perror_m_perr)
+#define TSUNAMI_PERROR_INV	(1UL << 51)
+#define TSUNAMI_MISC_NXM		(1UL << 28)
+
+static int
+tsunami_frame_valid(struct el_common *header, size_t size)
 {
-	pchip->perror.csr;
-	pchip->perror.csr = 0x040;
+	return !((header->sys_offset | header->size) & 7) &&
+	       header->sys_offset >= sizeof(*header) &&
+	       header->sys_offset <= header->size &&
+	       size <= header->size - header->sys_offset;
+}
+
+static int
+tsunami_parse_p_perror(int which, u64 perror, int print)
+{
+	static const char * const errors[] = {
+		"Lost error", "SERR asserted", "PERR asserted",
+		"Delayed-completion retry timeout", "Invalid scatter-gather PTE",
+		"Address parity error", "Target abort", "Read data parity error",
+		"No DEVSEL (master abort)", NULL,
+		"Uncorrectable ECC error", "Correctable ECC error"
+	};
+	static const char * const pci_cmd[] = {
+		"Interrupt acknowledge", "Special cycle", "I/O read", "I/O write",
+		"Reserved", "Reserved", "Memory read", "Memory write",
+		"Reserved", "Reserved", "Configuration read", "Configuration write",
+		"Memory read multiple", "Dual address cycle",
+		"Memory read line", "Memory write and invalidate"
+	};
+	unsigned long addr;
+	unsigned int cmd;
+	int i;
+
+	if (!(perror & TSUNAMI_PERROR_ERRMASK))
+		return MCHK_DISPOSITION_UNKNOWN_ERROR;
+	/* Do not import Titan's BIOS master-abort dismissal policy. */
+	if (!print)
+		return MCHK_DISPOSITION_REPORT;
+
+	printk("%s  Pchip %d PERROR: %016llx\n", err_print_prefix, which, perror);
+	for (i = 0; i < ARRAY_SIZE(errors); i++)
+		if ((perror & TSUNAMI_PERROR_ERRMASK & (1UL << i)) && errors[i])
+			printk("%s    %s\n", err_print_prefix, errors[i]);
+
+	/* INV invalidates SYN, CMD and ADDR; SERR has no command/address. */
+	if (perror & (TSUNAMI_PERROR_INV | perror_m_serr)) {
+		printk("%s    Transaction information unavailable\n", err_print_prefix);
+		return MCHK_DISPOSITION_REPORT;
+	}
+	cmd = (perror & perror_m_cmd) >> 52;
+	if (perror & TSUNAMI_PERROR_ECCMASK) {
+		const char *command = "Reserved";
+
+		if (cmd == 0)
+			command = "DMA read";
+		else if (cmd == 1)
+			command = "DMA RMW";
+		else if (cmd == 3)
+			command = "SGTE read";
+		addr = ((perror >> 19) & 0xffffffffUL) << 3;
+		printk("%s    Command: %s (%x), syndrome: %02llx\n",
+		       err_print_prefix, command, cmd, (perror & perror_m_syn) >> 56);
+		printk("%s    System address: %lx\n", err_print_prefix, addr);
+	} else {
+		addr = ((perror >> 18) & 0x3fffffffUL) << 2;
+		/* SGE captures only PCI address bits <31:13> (8KB page). */
+		if (perror & perror_m_sge)
+			addr &= ~0x1fffUL;
+		printk("%s    Command: %s (%x), PCI address: %lx%s\n",
+		       err_print_prefix, pci_cmd[cmd], cmd, addr,
+		       (perror & perror_m_sge) ? " (8KB page)" : "");
+		if (perror & (1UL << 17))
+			printk("%s    Monster window\n", err_print_prefix);
+		else if (perror & (1UL << 16))
+			printk("%s    DAC scatter-gather window 3\n", err_print_prefix);
+	}
+	return MCHK_DISPOSITION_REPORT;
+}
+
+/* SESF bits 0/1 identify PCI errors, bit 2 covers ECC on either Pchip/CPU. */
+static u64
+tsunami_pchip_error(struct el_TSUNAMI_sysdata_mcheck *frame, int which)
+{
+	u64 perror = which ? frame->p1_perror : frame->p0_perror;
+
+	if (frame->sesf & (1UL << which))
+		return perror;
+	if ((frame->sesf & 4) && (perror & TSUNAMI_PERROR_ECCMASK))
+		return perror;
+	return 0;
+}
+
+static struct el_TSUNAMI_sysdata_mcheck *
+tsunami_system_frame(struct el_common *header)
+{
+	if ((header->code != 0x202 && header->code != 0x204) ||
+	    !tsunami_frame_valid(header, sizeof(struct el_TSUNAMI_sysdata_mcheck)))
+		return NULL;
+	return (void *)header + header->sys_offset;
+}
+
+static int
+tsunami_process_logout_frame(struct el_common *header, int print)
+{
+	struct el_TSUNAMI_sysdata_mcheck *frame = tsunami_system_frame(header);
+	int status = MCHK_DISPOSITION_UNKNOWN_ERROR;
+	int i;
+
+	if (!frame) {
+		if (print)
+			printk("%s  Unknown or truncated Tsunami system frame\n", err_print_prefix);
+		return MCHK_DISPOSITION_UNKNOWN_ERROR;
+	}
+	if (print)
+		printk("%s  SESF: %016llx DIR: %016llx MISC: %016llx\n",
+		       err_print_prefix, frame->sesf, frame->dir, frame->misc);
+	if (frame->misc & TSUNAMI_MISC_NXM) {
+		status = MCHK_DISPOSITION_REPORT;
+		if (print)
+			printk("%s  Non-existent memory, NXS: %llu\n",
+			       err_print_prefix, (frame->misc >> 29) & 7);
+	}
+	for (i = 0; i < 2; i++)
+		status |= tsunami_parse_p_perror(i, tsunami_pchip_error(frame, i), print);
+	return status;
+}
+
+struct tsunami_error_state {
+	u64 perror[2];
+	u64 misc;
+};
+
+static void
+tsunami_ack_pchip(tsunami_pchip *pchip, u64 perror)
+{
+	if (!(perror & TSUNAMI_PERROR_ERRMASK))
+		return;
+	pchip->perror.csr = perror & TSUNAMI_PERROR_ERRMASK;
+	/* Complete the W1C write before releasing the logout frame. */
 	mb();
 	pchip->perror.csr;
 }
 
-static inline void
-tsunami_pci_clr_err(void)
+static void
+tsunami_clear_errors(struct tsunami_error_state *state)
+{
+	bool pchip1 = TSUNAMI_cchip->csc.csr & (1UL << 14);
+
+	/* Preserve each chip's transaction and the NXM source before clearing. */
+	state->perror[0] = TSUNAMI_pchip0->perror.csr;
+	state->perror[1] = pchip1 ? TSUNAMI_pchip1->perror.csr : 0;
+	state->misc = TSUNAMI_cchip->misc.csr;
+
+	tsunami_ack_pchip(TSUNAMI_pchip0, state->perror[0]);
+	/* Do not access the second Pchip on single-Pchip systems. */
+	if (pchip1)
+		tsunami_ack_pchip(TSUNAMI_pchip1, state->perror[1]);
+	if (state->misc & TSUNAMI_MISC_NXM) {
+		/* Zero writes leave the other MISC fields unchanged. */
+		TSUNAMI_cchip->misc.csr = TSUNAMI_MISC_NXM;
+		/* Complete the NXM acknowledgment before releasing the frame. */
+		mb();
+		TSUNAMI_cchip->misc.csr;
+	}
+}
+
+static void
+tsunami_report_live_errors(struct tsunami_error_state *state,
+			  struct el_TSUNAMI_sysdata_mcheck *frame)
 {
-	tsunami_pci_clr_err_1(TSUNAMI_pchip0);
+	int i;
 
-	/* TSUNAMI and TYPHOON can have 2, but might only have 1 (DS10) */
-	if (TSUNAMI_cchip->csc.csr & 1L<<14)
-		tsunami_pci_clr_err_1(TSUNAMI_pchip1);
+	/* PALcode's frame may predate these errors, or describe another chip. */
+	for (i = 0; i < 2; i++) {
+		if (!(state->perror[i] & TSUNAMI_PERROR_ERRMASK) ||
+		    (frame && state->perror[i] == tsunami_pchip_error(frame, i)))
+			continue;
+		printk("%s  Live Pchip status before acknowledgment:\n", err_print_prefix);
+		tsunami_parse_p_perror(i, state->perror[i], 1);
+	}
+	if ((state->misc & TSUNAMI_MISC_NXM) &&
+	    (!frame || ((state->misc ^ frame->misc) & (0xfUL << 28))))
+		printk("%s  Live MISC: %016llx, non-existent memory, NXS: %llu\n",
+		       err_print_prefix, state->misc, (state->misc >> 29) & 7);
 }
 
 void
 tsunami_machine_check(unsigned long vector, unsigned long la_ptr)
 {
-	/* Clear error before any reporting.  */
+	struct el_common *header = (void *)la_ptr;
+	struct el_TSUNAMI_sysdata_mcheck *frame = NULL;
+	struct tsunami_error_state live;
+	char *saved_err_prefix = err_print_prefix;
+	u64 perror;
+	bool fatal, expected;
+
+	/* Synchronize pending accesses before inspecting the chipset. */
 	mb();
-	mb();  /* magic */
-	draina();
-	tsunami_pci_clr_err();
-	wrmces(0x7);
 	mb();
+	draina();
+	tsunami_clear_errors(&live);
+	perror = live.perror[0] | live.perror[1];
+	if (vector == SCB_Q_SYSMCHK || vector == SCB_Q_SYSERR) {
+		frame = tsunami_system_frame(header);
+		if (frame)
+			perror |= tsunami_pchip_error(frame, 0) |
+				  tsunami_pchip_error(frame, 1);
+	}
+	/* Saved fatal errors matter even if PALcode already cleared PERROR. */
+	fatal = perror & TSUNAMI_PERROR_FATAL;
+	expected = vector != SCB_Q_SYSEVENT && mcheck_expected(smp_processor_id());
+	if (expected && !(perror & TSUNAMI_PERROR_ERRMASK)) {
+		wrmces(0x7);
+		/* Complete acknowledgment before returning to the probe. */
+		mb();
+		process_mcheck_info(vector, la_ptr, "TSUNAMI", 1);
+		return;
+	}
+
+	err_print_prefix = KERN_CRIT;
+	if (vector == SCB_Q_SYSMCHK || vector == SCB_Q_SYSERR) {
+		printk("%sSystem %s error (vector %lx, code %x) on CPU %d:\n",
+		       err_print_prefix, vector == SCB_Q_SYSERR ? "correctable" :
+		       "uncorrectable", vector, header->code, smp_processor_id());
+		if (tsunami_process_logout_frame(header, 0) == MCHK_DISPOSITION_UNKNOWN_ERROR)
+			printk("%s  Unrecognized system error\n", err_print_prefix);
+		tsunami_process_logout_frame(header, 1);
+	} else if (vector == SCB_Q_SYSEVENT) {
+		printk("%sTsunami environmental event (code %x): layout unknown\n",
+		       err_print_prefix, header->code);
+	}
+	tsunami_report_live_errors(&live, frame);
+	err_print_prefix = saved_err_prefix;
 
-	process_mcheck_info(vector, la_ptr, "TSUNAMI",
-			    mcheck_expected(smp_processor_id()));
+	if (vector != SCB_Q_SYSMCHK && vector != SCB_Q_SYSERR &&
+	    vector != SCB_Q_SYSEVENT) {
+		/* EV6 decoding also releases the logout frame. */
+		ev6_machine_check(vector, la_ptr);
+	} else {
+		wrmces(0x7);
+		/* Complete acknowledgment before resuming or panicking. */
+		mb();
+	}
+	if (fatal)
+		panic("Tsunami: uncorrectable ECC or PCI write parity error");
+	/* An expected probe may coincide with a separately reported error. */
+	if (expected)
+		process_mcheck_info(vector, la_ptr, "TSUNAMI", 1);
 }
Signature · 1 line
2.43.0
author maintainer
#12 lore raw

PATCH v5 5/5 alpha: decode Clipper environmental events and retain Tsunami console logs

In reply to Magnus Lindholm

Restrict ES40 live environmental decoding to Clipper. Honor the print argument, bound each string table, and classify only fault bits; enabled supplies, closed doors and fan speeds are context. Leave inverted halt/reset signals undecoded pending hardware confirmation.

Table D-18 in the ES40 Service Guide gives a console system offset that conflicts with its field positions. Print console environmental packets as raw data until the firmware layout can be verified. Do not interpret those packets using the live layout from Table D-20.

Register console handling for every Tsunami board. Validate packet lengths before decoding, keep shared subpacket identifiers with the Regatta types, and terminate annotation arrays for safe raw dumps of longer packets.

---
 arch/alpha/include/asm/err_common.h |   2 +
 arch/alpha/kernel/err_tsunami.c     | 324 ++++++++++++++++++++++++++++
 arch/alpha/kernel/proto.h           |   2 +
 arch/alpha/kernel/sys_dp264.c       |  12 +-
 arch/alpha/kernel/sys_eiger.c       |   2 +-
 5 files changed, 335 insertions(+), 7 deletions(-)
arch/alpha/include/asm/err_common.h +2 -0
index 610e01fe73ab..63d4320581e2 100644
@@ -47,6 +47,8 @@
 #  define EL_TYPE__REGATTA__PROCESSOR_ERROR_FRAME	(1)
 #  define EL_TYPE__REGATTA__SYSTEM_ERROR_FRAME		(2)
 #  define EL_TYPE__REGATTA__ENVIRONMENTAL_FRAME		(3)
+#  define EL_TYPE__REGATTA__TSUNAMI_PCHIP0_EXTENDED	(6)
+#  define EL_TYPE__REGATTA__TSUNAMI_PCHIP1_EXTENDED	(7)
 #  define EL_TYPE__REGATTA__TITAN_PCHIP0_EXTENDED	(8)
 #  define EL_TYPE__REGATTA__TITAN_PCHIP1_EXTENDED	(9)
 #  define EL_TYPE__REGATTA__TITAN_MEMORY_EXTENDED	(10)
arch/alpha/kernel/err_tsunami.c +324 -0

327 lines not on this page · raw message

arch/alpha/kernel/proto.h +2 -0
index f138bd494628..9f3d77d9d8bc 100644
@@ -78,6 +78,8 @@ extern struct _alpha_agp_info *titan_agp_info(void);
 extern struct pci_ops tsunami_pci_ops;
 extern void tsunami_init_arch(void);
 extern void tsunami_kill_arch(int);
+extern void tsunami_init_pci(void);
+extern void clipper_machine_check(unsigned long vector, unsigned long la_ptr);
 extern void tsunami_machine_check(unsigned long vector, unsigned long la_ptr);
 extern void tsunami_pci_tbi(struct pci_controller *, dma_addr_t, dma_addr_t);
 
arch/alpha/kernel/sys_dp264.c +6 -6
index 0a2d319bb1c8..961902a1da03 100644
@@ -516,7 +516,7 @@ clipper_map_irq(const struct pci_dev *dev, u8 slot, u8 pin)
 static void __init
 dp264_init_pci(void)
 {
-	common_init_pci();
+	tsunami_init_pci();
 	SMC669_Init(0);
 	locate_and_init_vga(NULL);
 }
@@ -524,7 +524,7 @@ dp264_init_pci(void)
 static void __init
 monet_init_pci(void)
 {
-	common_init_pci();
+	tsunami_init_pci();
 	SMC669_Init(1);
 	es1888_init();
 	locate_and_init_vga(NULL);
@@ -533,7 +533,7 @@ monet_init_pci(void)
 static void __init
 clipper_init_pci(void)
 {
-	common_init_pci();
+	tsunami_init_pci();
 	locate_and_init_vga(NULL);
 }
 
@@ -616,7 +616,7 @@ struct alpha_machine_vector webbrick_mv __initmv = {
 	.init_arch		= webbrick_init_arch,
 	.init_irq		= dp264_init_irq,
 	.init_rtc		= common_init_rtc,
-	.init_pci		= common_init_pci,
+	.init_pci		= tsunami_init_pci,
 	.kill_arch		= tsunami_kill_arch,
 	.pci_map_irq		= webbrick_map_irq,
 	.pci_swizzle		= common_swizzle,
@@ -627,7 +627,7 @@ struct alpha_machine_vector clipper_mv __initmv = {
 	DO_EV6_MMU,
 	DO_DEFAULT_RTC,
 	DO_TSUNAMI_IO,
-	.machine_check		= tsunami_machine_check,
+	.machine_check		= clipper_machine_check,
 	.max_isa_dma_address	= ALPHA_MAX_ISA_DMA_ADDRESS,
 	.min_io_address		= DEFAULT_IO_BASE,
 	.min_mem_address	= DEFAULT_MEM_BASE,
@@ -667,7 +667,7 @@ struct alpha_machine_vector shark_mv __initmv = {
 	.init_arch		= tsunami_init_arch,
 	.init_irq		= clipper_init_irq,
 	.init_rtc		= common_init_rtc,
-	.init_pci		= common_init_pci,
+	.init_pci		= tsunami_init_pci,
 	.kill_arch		= tsunami_kill_arch,
 	.pci_map_irq		= clipper_map_irq,
 	.pci_swizzle		= common_swizzle,
arch/alpha/kernel/sys_eiger.c +1 -1
index aea8a54da4bc..c53c5006ea81 100644
@@ -217,7 +217,7 @@ struct alpha_machine_vector eiger_mv __initmv = {
 	.init_arch		= tsunami_init_arch,
 	.init_irq		= eiger_init_irq,
 	.init_rtc		= common_init_rtc,
-	.init_pci		= common_init_pci,
+	.init_pci		= tsunami_init_pci,
 	.kill_arch		= tsunami_kill_arch,
 	.pci_map_irq		= eiger_map_irq,
 	.pci_swizzle		= eiger_swizzle,
Signature · 1 line
2.43.0
maintainer Reviewed-by on v5 1/5
#2 lore raw

Re: [PATCH v5 1/5] alpha: move Tsunami machine check handling to err_tsunami.c

In reply to Magnus Lindholm

Subject: Re: [PATCH v5 1/5] alpha: move Tsunami machine check handling to err_tsunami.c
In-Reply-To: <[email protected]>

Quoted 5 lines · Magnus Lindholm

Move the existing handler and PCI error clearing helpers without changing their behavior. Build the error objects for ALPHA_TSUNAMI so that all Tsunami configurations, including non-generic Shark, can use them.

+obj-$(CONFIG_ALPHA_TSUNAMI) += err_ev6.o err_tsunami.o

Nit: nothing in a non-generic Tsunami build uses err_ev6.o until patch 4, so that half could move there. Not worth a respin on its own.

I built each patch with W=1 for GENERIC and SHARK, and the tip for DP264 and EIGER as well. No new warnings. GENERIC boots on QEMU's clipper with two CPUs.

maintainer
#7 lore raw

Re: [PATCH v5 3/5] alpha: bound EV6 logout decoding by the processor area

In reply to Magnus Lindholm
Quoted 3 lines · Magnus Lindholm

The ES40 correctable logout frame has only the common CPU registers before its system area at offset 0x58. The EV6 decoder treats those system words as extra CPU registers and reads beyond the 0x80-byte frame.

Is the short frame specific to the ES40? I would have guessed it comes from the common EV6 PALcode, in which case Titan and Nautilus have had the same problem. If you know either way, please say so here.

arch/alpha/kernel/err_ev6.c ev6_process_logout_frame(struct el_common *mchk_header, int print) · line 208

Quoted 12 lines

+ if (mchk_header->proc_offset != offsetof(struct el_common_EV6_mcheck,

arch/alpha/kernel/err_ev6.c +11 -0
+       I_STAT) ||
+    mchk_header->sys_offset < offsetof(struct el_common_EV6_mcheck,
+      EXC_ADDR) ||
+    mchk_header->sys_offset > mchk_header->size ||
+    ((mchk_header->sys_offset | mchk_header->size) & 7)) {
+ if (print)
+ printk("%s    Invalid EV6 logout frame: size %x, CPU %x, system %x\n",
+       err_print_prefix, mchk_header->size,
+       mchk_header->proc_offset, mchk_header->sys_offset);
+ return MCHK_DISPOSITION_UNKNOWN_ERROR;
+ }

ev6_process_logout_frame() is also called for Titan and Nautilus, and this has only been run on an ES40. If some other firmware builds its frame a little differently, we now print this one line and throw the contents away. Before the patch an unknown error at least got the frame dumped.

Could the failure path dump the frame raw with mchk_dump_mem(), with the length taken from size and capped at something sane? Then a frame we reject is still there to look at.

The rest looks good to me.

maintainer
#10 lore raw

Re: [PATCH v5 4/5] alpha: decode and acknowledge Tsunami system machine checks

In reply to Magnus Lindholm
Quoted 1 line · Magnus Lindholm

+#define TSUNAMI_PERROR_ERRMASK 0xdffUL

This leaves out bit 9, and errors[] has NULL in that slot, but core_tsunami.h defines perror_m_rto as 0x200 and has a perror_v_rto bitfield. Which one is right? If rev 4.0 of the HRM marks the bit reserved, please fix the header in this series. If it is a real error bit, it is neither reported nor acknowledged here.

arch/alpha/kernel/err_tsunami.c line 120

Quoted 6 lines
arch/alpha/kernel/err_tsunami.c +6 -0
+static struct el_TSUNAMI_sysdata_mcheck *
+tsunami_system_frame(struct el_common *header)
+{
+ if ((header->code != 0x202 && header->code != 0x204) ||
+    !tsunami_frame_valid(header, sizeof(struct el_TSUNAMI_sysdata_mcheck)))
+ return NULL;

Do we know that DS10, DS20, XP1000 and the others use these two codes? The vector already says it is a system frame, so I am not sure the code check buys anything.

When this returns NULL the caller prints "Unrecognized system error" followed by "Unknown or truncated Tsunami system frame", which is two lines for one condition and none of the frame. Please dump it raw in that case, as the EV6 code does for an error it cannot decode. The same goes for the "layout unknown" environmental message on the non-Clipper boards.

Quoted 1 line

+ expected = vector != SCB_Q_SYSEVENT && mcheck_expected(smp_processor_id());

Nothing sets mcheck_expected on Tsunami. The only writer is in core_tsunami.c under NXM_MACHINE_CHECKS_ON_TSUNAMI, which is never defined. So this is always false, and neither the early return nor the process_mcheck_info() call at the end can be reached.

I would drop both, along with the changelog paragraph about expected probes. If you want to keep them for a probe path that might come back, the changelog should say they are untested.

arch/alpha/kernel/err_tsunami.c line 246

Quoted 4 lines

+ if (vector == SCB_Q_SYSMCHK || vector == SCB_Q_SYSERR) {
+ printk("%sSystem %s error (vector %lx, code %x) on CPU %d:\n",

arch/alpha/kernel/err_tsunami.c +2 -0
+       err_print_prefix, vector == SCB_Q_SYSERR ? "correctable" :
+       "uncorrectable", vector, header->code, smp_processor_id());

The old handler went through process_mcheck_info(), which printed the PC and called dik_show_regs(). System errors now get neither. For an NXM the PC is the first thing I would want to see. Please add dik_show_regs(get_irq_regs(), NULL) here, as ev6_machine_check() does.

Quoted 2 lines

+ if (fatal)
+ panic("Tsunami: uncorrectable ECC or PCI write parity error");

This is new policy. The old handler never panicked, and none of the other err_*.c handlers do. I can see the case for UECC. I am less sure about PERR, and fatal is computed from the live PERROR on every vector, so a correctable CPU error would panic the machine if the bit happened to be set.

Could the panic go in its own patch, with the reasoning in its changelog? That would also make it easy to revert if it turns out to be too eager on some board.

The decode and the write-one-to-clear acknowledgment look good to me. Writing back what was read is a clear improvement on the old hardcoded 0x040.

maintainer
#13 lore raw

Re: [PATCH v5 5/5] alpha: decode Clipper environmental events and retain Tsunami console logs

In reply to Magnus Lindholm
Quoted 5 lines · Magnus Lindholm

+static const char * const CLIPPER_EnvQW5DOOR[] = {
+ "",
+ "Set = System CPU door is open",
+ "Set = System Fan door is open",
+ "Set = System PCI door is open",

The "Set = " looks like it came along from the table in the manual. "System CPU door is open" reads better in a log.

Quoted 2 lines

+ if (!(status & MCHK_DISPOSITION_REPORT))
+ return MCHK_DISPOSITION_DISMISS;

An event with no fault bit set is dropped, so a recovery (door closed, supply back) is silent unless some other fault bit is still set. If I read your cover letter right, the "enabled again" report in the PSU test was only printed because SMIR bit 0 stayed set. Is that intended? I think I would want to see the recovery.

arch/alpha/kernel/err_tsunami.c tsunami_machine_check(unsigned long vector, unsigned long la_ptr) · line 595

Quoted 12 lines
arch/alpha/kernel/err_tsunami.c +12 -0
+void __init
+tsunami_init_pci(void)
+{
+ size_t i;
+
+ for (i = 0; i < ARRAY_SIZE(el_tsunami_annotations); i++)
+ cdl_register_subpacket_annotation(&el_tsunami_annotations[i]);
+ cdl_register_subpacket_handler(&tsunami_subpacket_handler);
+ ev6_register_error_handlers();
+ cdl_check_console_data_log();
+ common_init_pci();
+}

Two things here.

cdl_check_console_data_log() follows console_data_log_pa from the HWRPB on every Tsunami board now, and this has run on an ES40 only. It is fine on QEMU's clipper, which I booted, but there the log is empty. I do not know what older DS10, DS20 or XP1000 firmware leaves in that field, and a bad pointer would mean a crash during boot. Can anyone on the list try it on one of those?

It is also odd to have the PCI init hook in the error file. Titan has titan_register_error_handlers() in err_titan.c and leaves the init_pci hook in sys_titan.c, which calls cdl_check_console_data_log() itself. The same split would work here.

The table sizes all match their masks, and the subpacket length checks look right to me.

author maintainer
#3 lore raw

Re: [PATCH v5 1/5] alpha: move Tsunami machine check handling to err_tsunami.c

In reply to Matt Turner

Hi Matt,

Quoted 12 lines · Matt Turner

Subject: Re: [PATCH v5 1/5] alpha: move Tsunami machine check handling to err_tsunami.c
In-Reply-To: <[email protected]>

Quoted 5 lines · Magnus Lindholm

Move the existing handler and PCI error clearing helpers without changing their behavior. Build the error objects for ALPHA_TSUNAMI so that all Tsunami configurations, including non-generic Shark, can use them.

+obj-$(CONFIG_ALPHA_TSUNAMI) += err_ev6.o err_tsunami.o

Quoted 8 lines

Nit: nothing in a non-generic Tsunami build uses err_ev6.o until patch 4, so that half could move there. Not worth a respin on its own.

I built each patch with W=1 for GENERIC and SHARK, and the tip for DP264 and EIGER as well. No new warnings. GENERIC boots on QEMU's clipper with two CPUs.

Thanks, I've moved that dependency to patch 4 in the upcoming v6.
I'll pick up your tag for the v6

Magnus

author maintainer
#8 lore raw

Re: [PATCH v5 3/5] alpha: bound EV6 logout decoding by the processor area

In reply to Matt Turner

Hi Matt,

Quoted 10 lines · Matt Turner
Quoted 3 lines · Magnus Lindholm

The ES40 correctable logout frame has only the common CPU registers before its system area at offset 0x58. The EV6 decoder treats those system words as extra CPU registers and reads beyond the 0x80-byte frame.

Is the short frame specific to the ES40? I would have guessed it comes from the common EV6 PALcode, in which case Titan and Nautilus have had the same problem. If you know either way, please say so here.

I can confirm it from the ES40 Service Guide, Table D-19, but I haven't established
whether Titan or Nautilus PALcode uses the same short frame. I've clarified that in the v6 commit message.

Quoted 19 lines

arch/alpha/kernel/err_ev6.c ev6_process_logout_frame(struct el_common *mchk_header, int print) · line 208

Quoted 12 lines

+ if (mchk_header->proc_offset != offsetof(struct el_common_EV6_mcheck,

arch/alpha/kernel/err_ev6.c +11 -0
+       I_STAT) ||
+    mchk_header->sys_offset < offsetof(struct el_common_EV6_mcheck,
+      EXC_ADDR) ||
+    mchk_header->sys_offset > mchk_header->size ||
+    ((mchk_header->sys_offset | mchk_header->size) & 7)) {
+ if (print)
+ printk("%s    Invalid EV6 logout frame: size %x, CPU %x, system %x\n",
+       err_print_prefix, mchk_header->size,
+       mchk_header->proc_offset, mchk_header->sys_offset);
+ return MCHK_DISPOSITION_UNKNOWN_ERROR;
+ }

ev6_process_logout_frame() is also called for Titan and Nautilus, and this has only been run on an ES40. If some other firmware builds its frame a little differently, we now print this one line and throw the contents away. Before the patch an unknown error at least got the frame dumped.

Quoted 4 lines

Could the failure path dump the frame raw with mchk_dump_mem(), with the length taken from size and capped at something sane? Then a frame we reject is still there to look at.

Agreed. V6 adds a raw fallback using the advertised size, capped at 1 KiB and rounded down to complete quadwords, without using the rejected offsets

Quoted 1 line

The rest looks good to me.

Thanks

Magnusi

author maintainer
#11 lore raw

Re: [PATCH v5 4/5] alpha: decode and acknowledge Tsunami system machine checks

In reply to Matt Turner

Hi Matt,

Quoted 10 lines · Matt Turner
Quoted 1 line · Magnus Lindholm

+#define TSUNAMI_PERROR_ERRMASK 0xdffUL

This leaves out bit 9, and errors[] has NULL in that slot, but core_tsunami.h defines perror_m_rto as 0x200 and has a perror_v_rto bitfield. Which one is right? If rev 4.0 of the HRM marks the bit reserved, please fix the header in this series. If it is a real error bit, it is neither reported nor acknowledged here.

Table 10-42 in rev. 4.0 marks bit 9 reserved, MBZ/RAZ. The 0xdff mask is correct, I've removed the RTO definition and reserved its bitfield position in v6.

Quoted 11 lines

arch/alpha/kernel/err_tsunami.c line 120

Quoted 6 lines
arch/alpha/kernel/err_tsunami.c +6 -0
+static struct el_TSUNAMI_sysdata_mcheck *
+tsunami_system_frame(struct el_common *header)
+{
+ if ((header->code != 0x202 && header->code != 0x204) ||
+    !tsunami_frame_valid(header, sizeof(struct el_TSUNAMI_sysdata_mcheck)))
+ return NULL;

Do we know that DS10, DS20, XP1000 and the others use these two codes? The vector already says it is a system frame, so I am not sure the code check buys anything.

I haven't verified that. I've removed the reason-code restriction, keeping the structural bounds checks.

Quoted 7 lines

When this returns NULL the caller prints "Unrecognized system error" followed by "Unknown or truncated Tsunami system frame", which is two lines for one condition and none of the frame. Please dump it raw in that case, as the EV6 code does for an error it cannot decode. The same goes for the "layout unknown" environmental message on the non-Clipper boards.

Agreed. V6 replaces the duplicate rejection messages with a bounded raw dump. It also dumps environmental frames whose layout we don't decode.

Quoted 11 lines
Quoted 1 line

+ expected = vector != SCB_Q_SYSEVENT && mcheck_expected(smp_processor_id());

Nothing sets mcheck_expected on Tsunami. The only writer is in core_tsunami.c under NXM_MACHINE_CHECKS_ON_TSUNAMI, which is never defined. So this is always false, and neither the early return nor the process_mcheck_info() call at the end can be reached.

I would drop both, along with the changelog paragraph about expected probes. If you want to keep them for a probe path that might come back, the changelog should say they are untested.

You're right, I've removed the inactive expected-probe handling and the associated changelog claims.

Quoted 10 lines

arch/alpha/kernel/err_tsunami.c line 246

Quoted 4 lines

+ if (vector == SCB_Q_SYSMCHK || vector == SCB_Q_SYSERR) {
+ printk("%sSystem %s error (vector %lx, code %x) on CPU %d:\n",

arch/alpha/kernel/err_tsunami.c +2 -0
+       err_print_prefix, vector == SCB_Q_SYSERR ? "correctable" :
+       "uncorrectable", vector, header->code, smp_processor_id());

The old handler went through process_mcheck_info(), which printed the PC and called dik_show_regs(). System errors now get neither. For an NXM the PC is the first thing I would want to see. Please add dik_show_regs(get_irq_regs(), NULL) here, as ev6_machine_check() does.

Will do in v6, thanks.

Quoted 9 lines
Quoted 2 lines

+ if (fatal)
+ panic("Tsunami: uncorrectable ECC or PCI write parity error");

This is new policy. The old handler never panicked, and none of the other err_*.c handlers do. I can see the case for UECC. I am less sure about PERR, and fatal is computed from the live PERROR on every vector, so a correctable CPU error would panic the machine if the bit happened to be set.

Quoted 4 lines

Could the panic go in its own patch, with the reasoning in its changelog? That would also make it easy to revert if it turns out to be too eager on some board.

Agreed. It is now a separate final patch, and applies only to system-error vectors.
For PERR, HRM §8.8.2.4 describes incoming write parity errors poisoning memory ECC
and explicitly expects software to crash. PERR also covers parity errors reported by a
target on outgoing writes; the proposed policy treats both conservatively. I've explained this in the commit message. I haven't performed hardware UECC/PERR injection.

Quoted 3 lines

The decode and the write-one-to-clear acknowledgment look good to me. Writing back what was read is a clear improvement on the old hardcoded 0x040.

Thanks for the detailed review.

Magnus

author maintainer
#14 lore raw

Re: [PATCH v5 5/5] alpha: decode Clipper environmental events and retain Tsunami console logs

In reply to Matt Turner

Hi Matt,

Quoted 11 lines · Matt Turner
Quoted 5 lines · Magnus Lindholm

+static const char * const CLIPPER_EnvQW5DOOR[] = {
+ "",
+ "Set = System CPU door is open",
+ "Set = System Fan door is open",
+ "Set = System PCI door is open",

The "Set = " looks like it came along from the table in the manual. "System CPU door is open" reads better in a log.

Agreed, removed in v6.

Quoted 9 lines
Quoted 2 lines

+ if (!(status & MCHK_DISPOSITION_REPORT))
+ return MCHK_DISPOSITION_DISMISS;

An event with no fault bit set is dropped, so a recovery (door closed, supply back) is silent unless some other fault bit is still set. If I read your cover letter right, the "enabled again" report in the PSU test was only printed because SMIR bit 0 stayed set. Is that intended? I think I would want to see the recovery.

You're right. The fault-only filter also suppressed notifications that could describe recovery. V6 reports valid notifications even without recognized fault bits, together with the status context.

I've booted v6 on the ES40 and repeated the PSU cable test. The individual PSU failure indication cleared after reconnection and its enabled indication returned.
SMIR bit 0 stayed set throughout, so this still doesn't exercise the all-fault-bits-clear
path; that currently has synthetic coverage only.

Quoted 22 lines

arch/alpha/kernel/err_tsunami.c tsunami_machine_check(unsigned long vector, unsigned long la_ptr) · line 595

Quoted 12 lines
arch/alpha/kernel/err_tsunami.c +12 -0
+void __init
+tsunami_init_pci(void)
+{
+ size_t i;
+
+ for (i = 0; i < ARRAY_SIZE(el_tsunami_annotations); i++)
+ cdl_register_subpacket_annotation(&el_tsunami_annotations[i]);
+ cdl_register_subpacket_handler(&tsunami_subpacket_handler);
+ ev6_register_error_handlers();
+ cdl_check_console_data_log();
+ common_init_pci();
+}

Two things here.

cdl_check_console_data_log() follows console_data_log_pa from the HWRPB on every Tsunami board now, and this has run on an ES40 only. It is fine on QEMU's clipper, which I booted, but there the log is empty. I do not know what older DS10, DS20 or XP1000 firmware leaves in that field, and a bad pointer would mean a crash during boot. Can anyone on the list try it on one of those?

Quoted 5 lines

It is also odd to have the PCI init hook in the error file. Titan has titan_register_error_handlers() in err_titan.c and leaves the init_pci hook in sys_titan.c, which calls cdl_check_console_data_log() itself. The same split would work here.

Agreed. V6 follows the Titan split: error-handler registration stays in the error file, with PCI initialization and the console-log call in sys_dp264.c.

Quoted 2 lines

The table sizes all match their masks, and the subpacket length checks look right to me.

Thanks for the feedback

Magnus