summaryrefslogtreecommitdiff
path: root/sys/arch
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
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')
-rw-r--r--sys/arch/amd64/amd64/db_interface.c17
-rw-r--r--sys/arch/i386/i386/db_interface.c17
2 files changed, 32 insertions, 2 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, },
};
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, }
};