Be a bit more elaborate with UE DMA errors.

This commit is contained in:
eeh 2001-09-15 07:10:04 +00:00
parent 388726b340
commit a7283de29c
2 changed files with 13 additions and 6 deletions

View File

@ -1,4 +1,4 @@
/* $NetBSD: psycho.c,v 1.35 2001/09/10 16:17:06 eeh Exp $ */
/* $NetBSD: psycho.c,v 1.36 2001/09/15 07:10:04 eeh Exp $ */
/*
* Copyright (c) 1999, 2000 Matthew R. Green
@ -585,14 +585,18 @@ psycho_ue(arg)
{
struct psycho_softc *sc = (struct psycho_softc *)arg;
struct psychoreg *regs = sc->sc_regs;
long long afsr = regs->psy_ue_afsr;
long long afar = regs->psy_ue_afar;
char bits[128];
/*
* It's uncorrectable. Dump the regs and panic.
*/
panic("%s: uncorrectable DMA error AFAR %llx AFSR %llx\n",
sc->sc_dev.dv_xname,
(long long)regs->psy_ue_afar, (long long)regs->psy_ue_afsr);
panic("%s: uncorrectable DMA error AFAR %llx pa %llx AFSR %llx:\n%s",
sc->sc_dev.dv_xname, afar,
(long long)iommu_extract(sc->sc_is, (vaddr_t)afar), afsr,
bitmask_snprintf(afsr, PSYCHO_UE_AFSR_BITS,
bits, sizeof(bits)));
return (1);
}
static int

View File

@ -1,4 +1,4 @@
/* $NetBSD: psychoreg.h,v 1.8 2001/09/10 16:17:06 eeh Exp $ */
/* $NetBSD: psychoreg.h,v 1.9 2001/09/15 07:10:05 eeh Exp $ */
/*
* Copyright (c) 1998, 1999 Eduardo E. Horvath
@ -69,6 +69,9 @@ struct psychoreg {
u_int64_t psy_ecccr; /* ECC control register */ /* 1fe.0000.0020 */
u_int64_t reserved; /* 1fe.0000.0028 */
u_int64_t psy_ue_afsr; /* Uncorrectable Error AFSR */ /* 1fe.0000.0030 */
#define PSYCHO_UE_AFSR_BITS "\177\020" \
"b\27BLK\0b\070P_DTE\0b\071S_DTE\0b\072S_DWR\0b\073S_DRD\0b" \
"\075P_DWR\0b\076P_DRD\0\0"
u_int64_t psy_ue_afar; /* Uncorrectable Error AFAR */ /* 1fe.0000.0038 */
u_int64_t psy_ce_afsr; /* Correctable Error AFSR */ /* 1fe.0000.0040 */
u_int64_t psy_ce_afar; /* Correctable Error AFAR */ /* 1fe.0000.0048 */