diff options
author | Mark Kettenis <kettenis@cvs.openbsd.org> | 2008-06-04 17:23:25 +0000 |
---|---|---|
committer | Mark Kettenis <kettenis@cvs.openbsd.org> | 2008-06-04 17:23:25 +0000 |
commit | ef46d46f4be9507d291157566a634cf935795505 (patch) | |
tree | 474c19f14a4e5d400b348da3aa4af3f34c8da159 /usr.sbin | |
parent | 46d98c9b0f43e2aaa13b18387beac0a45a00172e (diff) |
Don't disassemble the AML if the -o option is specified. That way at least
we get the complete files if the disassembler crashes on a machine.
ok marco@, krw@, deraadt@
Diffstat (limited to 'usr.sbin')
-rw-r--r-- | usr.sbin/acpidump/acpi.c | 8 | ||||
-rw-r--r-- | usr.sbin/acpidump/acpidump.8 | 13 |
2 files changed, 8 insertions, 13 deletions
diff --git a/usr.sbin/acpidump/acpi.c b/usr.sbin/acpidump/acpi.c index 5b3a069c1a0..440ddf6bf68 100644 --- a/usr.sbin/acpidump/acpi.c +++ b/usr.sbin/acpidump/acpi.c @@ -1,4 +1,4 @@ -/* $OpenBSD: acpi.c,v 1.5 2007/10/17 20:10:44 chl Exp $ */ +/* $OpenBSD: acpi.c,v 1.6 2008/06/04 17:23:24 kettenis Exp $ */ /*- * Copyright (c) 1998 Doug Rabson * Copyright (c) 2000 Mitsuru IWASAKI <iwasaki@FreeBSD.org> @@ -25,7 +25,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $Id: acpi.c,v 1.5 2007/10/17 20:10:44 chl Exp $ + * $Id: acpi.c,v 1.6 2008/06/04 17:23:24 kettenis Exp $ * $FreeBSD: src/usr.sbin/acpi/acpidump/acpi.c,v 1.3 2000/11/08 02:37:00 iwasaki Exp $ */ #include <sys/types.h> @@ -108,7 +108,8 @@ acpi_handle_dsdt(struct ACPIsdt *dsdp) dp = (u_int8_t *)dsdp->body; end = (u_int8_t *)dsdp + dsdp->len; - acpi_dump_dsdt(dp, end); + if (aml_dumpfile == NULL) + acpi_dump_dsdt(dp, end); } static void @@ -171,6 +172,7 @@ acpi_dump_dsdt(u_int8_t *dp, u_int8_t *end) printf("\n}\n"); assert(dp == end); } + void acpi_print_sdt(struct ACPIsdt *sdp) { diff --git a/usr.sbin/acpidump/acpidump.8 b/usr.sbin/acpidump/acpidump.8 index 22c32eb65d4..168b32af966 100644 --- a/usr.sbin/acpidump/acpidump.8 +++ b/usr.sbin/acpidump/acpidump.8 @@ -1,4 +1,4 @@ -.\" $OpenBSD: acpidump.8,v 1.7 2007/10/17 18:58:23 deraadt Exp $ +.\" $OpenBSD: acpidump.8,v 1.8 2008/06/04 17:23:24 kettenis Exp $ .\" .\" Copyright (c) 1999 Doug Rabson <dfr@FreeBSD.org> .\" Copyright (c) 2000 Mitsuru IWASAKI <iwasaki@FreeBSD.org> @@ -29,7 +29,7 @@ .\" .\" $FreeBSD: src/usr.sbin/acpi/acpidump/acpidump.8,v 1.9 2001/09/05 19:21:25 dd Exp $ .\" -.Dd $Mdocdate: October 17 2007 $ +.Dd $Mdocdate: June 4 2008 $ .Dt ACPIDUMP 8 .Os .Sh NAME @@ -115,7 +115,7 @@ Interpret AML data in DSDT from a file specified in .Ar dsdt_file_for_input and dumps them in ASL to standard output. .It Fl o Ar prefix_for_output -Additionally store ACPI tables from physical memory into files specified by +Store ACPI tables from physical memory into files specified by .Ar prefix_for_output . The files generated will be of the form <prefix>.<sig>.<id>. @@ -131,13 +131,6 @@ RSDP, FACP, DSDT, SSDT, HPET, MCFG, SPMI, APIC, SPCR, SRAT, XSDT. .Bl -tag -width /dev/mem .It Pa /dev/mem .El -.Sh EXAMPLES -This is an example to get a dump of SDTs and a DSDT data file -simultaneously on a machine that supports ACPI BIOS: -.Pp -.Dl # acpidump -o foo \*(Gt foo.asl -.Pp -This will generate foo.RSDP.x, foo.FACP.x, foo.DSDT.x, etc. .Sh SEE ALSO .\" .Xr acpi 4 , .Xr mem 4 |