From 232055cb4d121ed9e93d5ddaa18e361e4011ec5f Mon Sep 17 00:00:00 2001 From: Marco Peereboom Date: Sun, 5 Mar 2006 14:46:47 +0000 Subject: 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@ --- sys/arch/i386/i386/db_interface.c | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) (limited to 'sys/arch/i386') 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 #include +#include "acpi.h" +#if NACPI > 0 +#include +#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, } }; -- cgit v1.2.3