Subject: acpidump , well, dump...
To: Current Users <current-users@netbsd.org>
From: Chavdar Ivanov <ci4ic4@gmail.com>
List: current-users
Date: 06/10/2007 14:20:58
Hi,

I don't know if it's worth a send-pr; this has been on my laptop for a
while. Running acpidump gives:

...
Program received signal SIGABRT, Aborted.
0xbbb05b7b in kill () from /usr/lib/libc.so.12
(gdb) bt
#0  0xbbb05b7b in kill () from /usr/lib/libc.so.12
#1  0xbbba5ea4 in abort () from /usr/lib/libc.so.12
#2  0xbbb68d4e in __assert13 () from /usr/lib/libc.so.12
#3  0x0804c3fa in asl_dump_defif (dpp=3D0xbfbfe2c8, indent=3D4) at asl_dump=
.c:1046
#4  0x0804de29 in asl_dump_termobj (dpp=3D0xbfbfe314, indent=3D4) at asl_du=
mp.c:1608
#5  0x0804df13 in asl_dump_objectlist (dpp=3D0xbfbfe33c, end=3D0xbbad4126
"[\2027C141\b_ADR\v", indent=3D4) at asl_dump.c:1645
#6  0x0804b875 in asl_dump_defmethod (dpp=3D0xbfbfe398, indent=3D3) at
asl_dump.c:688
#7  0x0804c8a6 in asl_dump_termobj (dpp=3D0xbfbfe3e4, indent=3D3) at asl_du=
mp.c:1202
#8  0x0804df13 in asl_dump_objectlist (dpp=3D0xbfbfe410, end=3D0xbbad435a
"\024\027\\C12E\001\\/\003_SB_C002C12Eh\024\026\\C132", indent=3D3) at
asl_dump.c:1645
#9  0x0804a248 in asl_dump_defscope (dpp=3D0xbfbfe468, indent=3D2) at asl_d=
ump.c:234
#10 0x0804c861 in asl_dump_termobj (dpp=3D0xbfbfe4b4, indent=3D2) at asl_du=
mp.c:1193
#11 0x0804df13 in asl_dump_objectlist (dpp=3D0xbfbfe4e0, end=3D0xbbad7100
"\bC1AF\022@\t\002\022F\004\r\n\001\f=FF=FF=FF=FF\f=FF=FF=FF=FF\n\001\f=FF=
=FF=FF=FF\n",
indent=3D2) at asl_dump.c:1645
#12 0x0804bfa4 in asl_dump_defdevice (dpp=3D0xbfbfe538, indent=3D1) at
asl_dump.c:922
#13 0x0804ce3f in asl_dump_termobj (dpp=3D0xbfbfe584, indent=3D1) at asl_du=
mp.c:1319
#14 0x0804df13 in asl_dump_objectlist (dpp=3D0xbfbfe5b0, end=3D0xbbadf804
"\020L=C9\\_TZ_\bC305\022M\006\004\022\036\002\022\r\005\v=AC\005\n",
indent=3D1) at asl_dump.c:1645
#15 0x0804a248 in asl_dump_defscope (dpp=3D0xbfbfe608, indent=3D0) at asl_d=
ump.c:234
#16 0x0804c861 in asl_dump_termobj (dpp=3D0xbfbfe654, indent=3D0) at asl_du=
mp.c:1193
#17 0x0804df13 in asl_dump_objectlist (dpp=3D0xbfbfe680, end=3D0xbbae169e
"SSDT&\003", indent=3D0) at asl_dump.c:1645
#18 0x08048fc2 in acpi_dump_dsdt (dp=3D0xbbad1ae4 "\bC000\n",
end=3D0xbbae169e "SSDT&\003") at acpi.c:175
#19 0x08048e0d in acpi_handle_dsdt (dsdp=3D0xbbad1ac0) at acpi.c:116
#20 0x08048e6e in acpi_handle_facp (facp=3D0xbbae2624) at acpi.c:128
#21 0x080498a5 in acpi_handle_rsdt (rsdp=3D0xbbae2778) at acpi.c:355
#22 0x0804e093 in asl_dump_from_devmem () at acpidump.c:72
#23 0x0804e1bb in main (argc=3D1, argv=3D0xbfbfe7e8) at acpidump.c:111
(gdb)

The same in one other assert as well.

The patch:

--- usr.sbin/acpitools/acpidump/asl_dump.c,orig 2007-06-10
14:59:06.000000000 +0100
+++ usr.sbin/acpitools/acpidump/asl_dump.c      2007-02-20
12:49:56.000000000 +0000
@@ -690,7 +690,7 @@
         print_indent(indent);
         printf("}");

-        assert(dp =3D=3D end);
+        /* assert(dp =3D=3D end); */
         ASL_LEAVE_SCOPE(oname);
         *dpp =3D dp;
 }
@@ -1043,7 +1043,7 @@
         print_indent(indent);
         printf("}");

-        assert(dp =3D=3D end);
+        /* assert(dp =3D=3D end); */

         *dpp =3D dp;
 }

sorts me out, the output appears to be correct, although I realize the
asserts must have been put there for a reason. My guess is some
peculiarity of the ACPI implementation of my laptop, an HP nx6310.

% uname -a
NetBSD lisa 4.99.20 NetBSD 4.99.20 (GENERIC.MP) #0: Wed Jun  6
18:54:40 BST 2007
root@loan8:/f/obj/usr/src/sys/arch/i386/compile/GENERIC.MP i386

Chavdar Ivanov