diff --git a/sys/arch/x86/x86/ioapic.c b/sys/arch/x86/x86/ioapic.c index 3b661f680028..014a101154d4 100644 --- a/sys/arch/x86/x86/ioapic.c +++ b/sys/arch/x86/x86/ioapic.c @@ -1,4 +1,4 @@ -/* $NetBSD: ioapic.c,v 1.24 2007/10/17 19:58:16 garbled Exp $ */ +/* $NetBSD: ioapic.c,v 1.25 2007/10/17 21:18:18 joerg Exp $ */ /*- * Copyright (c) 2000 The NetBSD Foundation, Inc. @@ -72,7 +72,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: ioapic.c,v 1.24 2007/10/17 19:58:16 garbled Exp $"); +__KERNEL_RCSID(0, "$NetBSD: ioapic.c,v 1.25 2007/10/17 21:18:18 joerg Exp $"); #include "opt_ddb.h" @@ -521,6 +521,7 @@ ioapic_delroute(struct pic *pic, struct cpu_info *ci, int pin, #ifdef DDB void ioapic_dump(void); +void ioapic_dump_raw(void); void ioapic_dump(void) @@ -537,4 +538,25 @@ ioapic_dump(void) } } } + +void +ioapic_dump_raw(void) +{ + struct ioapic_softc *sc; + int i; + uint32_t reg; + + for (sc = ioapics; sc != NULL; sc = sc->sc_next) { + printf("Register dump of %s\n", sc->sc_pic.pic_dev.dv_xname); + i = 0; + do { + if (i % 0x08 == 0) + printf("%02x", i); + reg = ioapic_read(sc, i); + printf(" %08x", (u_int)reg); + if (++i % 0x08 == 0) + printf("\n"); + } while (i < 0x40); + } +} #endif