summaryrefslogtreecommitdiff
path: root/sys/arch/i386
diff options
context:
space:
mode:
authorMarco Peereboom <marco@cvs.openbsd.org>2006-03-05 14:46:47 +0000
committerMarco Peereboom <marco@cvs.openbsd.org>2006-03-05 14:46:47 +0000
commit232055cb4d121ed9e93d5ddaa18e361e4011ec5f (patch)
tree0a1c8571e823f5381315fdc3d0324e99d2bf3ae7 /sys/arch/i386
parentbe9b50319381ef4a0d73fa9de5e54198ea2d85e2 (diff)
Hook acpi to ddb since we need to be able to do some live debugging.
Lots and lots of help from miod@ and deraadt@ ok deraadt@ miod@
Diffstat (limited to 'sys/arch/i386')
-rw-r--r--sys/arch/i386/i386/db_interface.c17
1 files changed, 16 insertions, 1 deletions
diff --git a/sys/arch/i386/i386/db_interface.c b/sys/arch/i386/i386/db_interface.c
index 5c8786489bc..3778f3a22d9 100644
--- a/sys/arch/i386/i386/db_interface.c
+++ b/sys/arch/i386/i386/db_interface.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: db_interface.c,v 1.16 2004/07/20 20:18:53 art Exp $ */
+/* $OpenBSD: db_interface.c,v 1.17 2006/03/05 14:46:46 marco Exp $ */
/* $NetBSD: db_interface.c,v 1.22 1996/05/03 19:42:00 christos Exp $ */
/*
@@ -51,6 +51,11 @@
#include <ddb/db_output.h>
#include <ddb/db_var.h>
+#include "acpi.h"
+#if NACPI > 0
+#include <dev/acpi/acpidebug.h>
+#endif /* NACPI > 0 */
+
extern label_t *db_recover;
extern char *trap_type[];
extern int trap_types;
@@ -322,6 +327,13 @@ db_ddbproc_cmd(db_expr_t addr, int have_addr, db_expr_t count, char *modif)
}
#endif /* MULTIPROCESSOR */
+#if NACPI > 0
+struct db_command db_acpi_cmds[] = {
+ { "tree", db_acpi_tree, 0, NULL },
+ { NULL, NULL, 0, NULL }
+};
+#endif /* NACPI > 0 */
+
struct db_command db_machine_command_table[] = {
{ "sysregs", db_sysregs_cmd, 0, 0 },
#ifdef MULTIPROCESSOR
@@ -330,6 +342,9 @@ struct db_command db_machine_command_table[] = {
{ "stopcpu", db_stopproc_cmd, 0, 0 },
{ "ddbcpu", db_ddbproc_cmd, 0, 0 },
#endif /* MULTIPROCESSOR */
+#if NACPI > 0
+ { "acpi", NULL, 0, db_acpi_cmds },
+#endif /* NACPI > 0 */
{ (char *)0, }
};