From b92082a557a6ec426acb7bffbb87756a5ee59622 Mon Sep 17 00:00:00 2001 From: sato Date: Thu, 16 Dec 1999 09:37:33 +0000 Subject: [PATCH] - dump some pmu registers at attach. --- sys/arch/hpcmips/vr/vrpmu.c | 34 ++++++++++++++++++++++++++++++++-- 1 file changed, 32 insertions(+), 2 deletions(-) diff --git a/sys/arch/hpcmips/vr/vrpmu.c b/sys/arch/hpcmips/vr/vrpmu.c index 1b7e392f82a9..4e3e8c237478 100644 --- a/sys/arch/hpcmips/vr/vrpmu.c +++ b/sys/arch/hpcmips/vr/vrpmu.c @@ -1,4 +1,4 @@ -/* $NetBSD: vrpmu.c,v 1.2 1999/12/08 01:54:59 sato Exp $ */ +/* $NetBSD: vrpmu.c,v 1.3 1999/12/16 09:37:33 sato Exp $ */ /* * Copyright (c) 1999 M. Warner Losh. All rights reserved. @@ -36,6 +36,12 @@ #include #include +#include "vrbcu.h" +#if NVRBCU > 0 +#include +#include +#endif + static int vrpmumatch __P((struct device *, struct cfdata *, void *)); static void vrpmuattach __P((struct device *, struct device *, void *)); @@ -167,12 +173,36 @@ vrpmu_dump_regs(arg) struct vrpmu_softc *sc = arg; unsigned int intstat1; unsigned int intstat2; - + unsigned int reg; +#if NVRBCU > 0 + int cpuid; +#endif intstat1 = vrpmu_read(sc, PMUINT_REG_W); intstat2 = vrpmu_read(sc, PMUINT2_REG_W); vrpmu_dump_intr(intstat1, intstat2); + /* others? XXXX */ + reg = vrpmu_read(sc, PMUCNT_REG_W); + printf("vrpmu: cnt 0x%x: ", reg); + bitdisp16(reg); + reg = vrpmu_read(sc, PMUCNT2_REG_W); + printf("vrpmu: cnt2 0x%x: ", reg); + bitdisp16(reg); +#if NVRBCU > 0 + cpuid = vrbcu_vrip_getcpuid(); + if (cpuid >= BCUREVID_RID_4111){ + reg = vrpmu_read(sc, PMUWAIT_REG_W); + printf("vrpmu: wait 0x%x", reg); + } + if (cpuid >= BCUREVID_RID_4121){ + reg = vrpmu_read(sc, PMUDIV_REG_W); + printf(" div 0x%x", reg); + } +#endif + printf("\n"); + } + /* * PMU interrupt handler. * XXX