tech-userlevel archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Allow acpidump(8) to disassemble SSDT AML data
Hi,
On my DELL Optiplex 740, the ACPI tables include a SSDT which contains
AML datas; but acpidump(8) does not support disassembling it, even if
it can be handled just like the common DSDT table.
The attached patch, should fix it.
Does it looks ok ?
SSDT: Length=650, Revision=1, Checksum=55,
OEMID=PTLTD, OEM Table ID=POWERNOW, OEM Revision=0x1,
Creator ID= LTP, Creator Revision=0x1
*/
DefinitionBlock ("acpi_dst.aml", "SSDT", 0x1, "PTLTD", "POWERNOW", 0x1)
{
Scope(\_PR.CPU0) {
Name(_PCT, Package(0x02) {
Buffer(0x11) {0x82, 0xc, 0x0, 0x7f, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0
x0, 0x0, 0x0, 0x0, 0x79, 0x0 },
Buffer(0x11) {0x82, 0xc, 0x0, 0x7f, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0
x0, 0x0, 0x0, 0x0, 0x79, 0x0 },
})
[...]
--
Nicolas Joly
Biological Software and Databanks.
Institut Pasteur, Paris.
Index: usr.sbin/acpitools/acpidump/acpi.c
===================================================================
RCS file: /cvsroot/src/usr.sbin/acpitools/acpidump/acpi.c,v
retrieving revision 1.4
diff -u -p -r1.4 acpi.c
--- usr.sbin/acpitools/acpidump/acpi.c 13 Feb 2008 18:59:18 -0000 1.4
+++ usr.sbin/acpitools/acpidump/acpi.c 14 Sep 2008 00:15:35 -0000
@@ -76,17 +76,21 @@ acpi_trim_string(char *s, size_t length)
static void
acpi_print_dsdt_definition(void)
{
+ char signature[4 + 1];
char oemid[6 + 1];
char oemtblid[8 + 1];
+ acpi_trim_string((char *)dsdt_header.signature, sizeof(signature) - 1);
acpi_trim_string((char *)dsdt_header.oemid, sizeof(oemid) - 1);
acpi_trim_string((char *)dsdt_header.oemtblid, sizeof(oemtblid) - 1);
+ (void)strlcpy(signature, (const char *)dsdt_header.signature,
+ sizeof(signature));
(void)strlcpy(oemid, (const char *)dsdt_header.oemid, sizeof(oemid));
(void)strlcpy(oemtblid, (const char *)dsdt_header.oemtblid,
sizeof(oemtblid));
printf("DefinitionBlock (\"%s\", \"%s\", 0x%x, \"%s\", \"%s\", 0x%x)",
- "acpi_dst.aml", "DSDT", dsdt_header.rev, oemid, oemtblid,
+ "acpi_dst.aml", signature, dsdt_header.rev, oemid, oemtblid,
dsdt_header.oemrev);
}
@@ -199,7 +203,8 @@ acpi_print_sdt(struct ACPIsdt *sdp)
acpi_print_string((const char *)sdp->creator, 4);
printf(", Creator Revision=0x%x\n", sdp->crerev);
printf(END_COMMENT);
- if (!memcmp(sdp->signature, "DSDT", 4)) {
+ if (!memcmp(sdp->signature, "DSDT", 4) ||
+ !memcmp(sdp->signature, "SSDT", 4)) {
memcpy(&dsdt_header, sdp, sizeof(dsdt_header));
}
}
@@ -361,6 +366,8 @@ acpi_handle_rsdt(struct ACPIsdt *rsdp)
}
if (!memcmp(sdp->signature, "FACP", 4)) {
acpi_handle_facp((struct FACPbody *) sdp->body);
+ } else if (!memcmp(sdp->signature, "SSDT", 4)) {
+ acpi_handle_dsdt(sdp);
} else {
acpi_print_sdt(sdp);
}
Home |
Main Index |
Thread Index |
Old Index