Add ioapic_dump_raw, which dumps the full IOAPIC register set.

This commit is contained in:
joerg 2007-10-17 21:18:18 +00:00
parent 961c73981f
commit 02ed2a3988

View File

@ -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 <sys/cdefs.h>
__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