Is this for -current only, or you need testing on 4.2 too?
Marco Peereboom P=P0P?P8QP0:
Please test this on all acpi capable machines and send me a dmesg if you
see this in the dmesg: store from field!!
If you see this panic or something similar:
acpi0: tables DSDT FACP SLIC HPET APIC MCFG TCPA SSDT SSDT SSDT SSDT
SSDT
wrong setbufint type
2ca8 Called: \\_SB_.C003.C098.C155
arg0: 0xd17b7910 cnt:01 stk:00 objref: 0xd176d484 index:ffffffff
[\\_SB_.C06A] 0xd176d484 cnt:02 stk:00 field: bitpos=02e0 bitlen=00a0
ref1:d176c904 ref2:0 [Field]
[\\_SB_.C043] 0xd176c904 cnt:32 stk:00 opregion: 00,3f7e7dc0,140
arg1: 0xd17b793c cnt:01 stk:00 objref: 0xd1756410 index:ffffffff
0xd1756410 cnt:00 stk:60 integer: 0
local0: 0xd1756a10 cnt:00 stk:60 integer: 0
2c7d Called: \\_SB_.C003.C098._INI
local0: 0xd1756410 cnt:00 stk:60 integer: 0
panic: aml_die aml_setbufint:983
please try this diff:
Index: dsdt.c
===================================================================
RCS file: /cvs/src/sys/dev/acpi/dsdt.c,v
retrieving revision 1.106
diff -u -p -r1.106 dsdt.c
--- dsdt.c 2 Dec 2007 22:24:54 -0000 1.106
+++ dsdt.c 16 Jan 2008 20:20:27 -0000
@@ -980,9 +980,10 @@ void
aml_setbufint(struct aml_value *dst, int bitpos, int bitlen,
struct aml_value *src)
{
- if (src->type != AML_OBJTYPE_BUFFER)
+ if (src->type != AML_OBJTYPE_BUFFER) {
+ aml_showvalue(src, 0);
aml_die("wrong setbufint type %d\n", src->type);
-
+ }
#if 1
/* Return buffer type */
_aml_setvalue(dst, AML_OBJTYPE_BUFFER, (bitlen+7)>>3, NULL);
@@ -1633,10 +1634,17 @@ aml_setvalue(struct aml_scope *scope, st
struct aml_value tmpint;
/* Use integer as result */
+ memset(&tmpint, 0, sizeof(tmpint));
if (rhs == NULL) {
- memset(&tmpint, 0, sizeof(tmpint));
rhs = _aml_setvalue(&tmpint, AML_OBJTYPE_INTEGER, ival, NULL);
}
+ else if (rhs->type == AML_OBJTYPE_BUFFERFIELD ||
+ rhs->type == AML_OBJTYPE_FIELDUNIT)
+ {
+ printf("store from field!!\n");
+ aml_fieldio(scope, rhs, &tmpint, ACPI_IOREAD);
+ rhs = &tmpint;
+ }
if (!is_local(scope, lhs))
lhs = aml_dereftarget(scope, lhs);
@@ -1725,6 +1733,7 @@ aml_setvalue(struct aml_scope *scope, st
dnprintf(10, "setvalue.unknown: %x", lhs->type);
break;
}
+ aml_freevalue(&tmpint);
}
/* Allocate dynamic AML value