summaryrefslogtreecommitdiff
path: root/sys/arch/amd64
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/amd64
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/amd64')
-rw-r--r--sys/arch/amd64/amd64/db_interface.c17
1 files changed, 16 insertions, 1 deletions
diff --git a/sys/arch/amd64/amd64/db_interface.c b/sys/arch/amd64/amd64/db_interface.c
index a38730bd15e..170bd00a442 100644
--- a/sys/arch/amd64/amd64/db_interface.c
+++ b/sys/arch/amd64/amd64/db_interface.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: db_interface.c,v 1.6 2005/12/05 21:31:23 miod Exp $ */
+/* $OpenBSD: db_interface.c,v 1.7 2006/03/05 14:46:45 marco Exp $ */
/* $NetBSD: db_interface.c,v 1.1 2003/04/26 18:39:27 fvdl Exp $ */
/*
@@ -56,6 +56,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;
@@ -370,6 +375,13 @@ x86_ipi_db(struct cpu_info *ci)
}
#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[] = {
#ifdef MULTIPROCESSOR
{ "cpuinfo", db_cpuinfo_cmd, 0, 0 },
@@ -377,6 +389,9 @@ struct db_command db_machine_command_table[] = {
{ "stopcpu", db_stopproc_cmd, 0, 0 },
{ "ddbcpu", db_ddbproc_cmd, 0, 0 },
#endif
+#if NACPI > 0
+ { "acpi", NULL, 0, db_acpi_cmds },
+#endif /* NACPI > 0 */
{ (char *)0, },
};