This patch changes the values of boolean comparisons from 0:1 to 0:-1 (from
ACPI Spec) in order to fix an AML issue on some Asus machines.
Please test on other machines as well to verify that hardware sensors/acpi/boot
work properly.
Index: dsdt.c
===================================================================
RCS file: /cvs/src/sys/dev/acpi/dsdt.c,v
retrieving revision 1.181
diff -u -p -b -r1.181 dsdt.c
--- dsdt.c 2 Jan 2011 04:56:57 -0000 1.181
+++ dsdt.c 18 Mar 2011 21:55:16 -0000
@@ -1167,31 +1167,31 @@ aml_evalexpr(int64_t lhs, int64_t rhs, i
/* Logical/Comparison */
case AMLOP_LAND:
- res = (lhs && rhs);
+ res = -(lhs && rhs);
break;
case AMLOP_LOR:
- res = (lhs || rhs);
+ res = -(lhs || rhs);
break;
case AMLOP_LNOT:
- res = (!lhs);
+ res = -(!lhs);
break;
case AMLOP_LNOTEQUAL:
- res = (lhs != rhs);
+ res = -(lhs != rhs);
break;
case AMLOP_LLESSEQUAL:
- res = (lhs <= rhs);
+ res = -(lhs <= rhs);
break;
case AMLOP_LGREATEREQUAL:
- res = (lhs >= rhs);
+ res = -(lhs >= rhs);
break;
case AMLOP_LEQUAL:
- res = (lhs == rhs);
+ res = -(lhs == rhs);
break;
case AMLOP_LGREATER:
- res = (lhs > rhs);
+ res = -(lhs > rhs);
break;
case AMLOP_LLESS:
- res = (lhs < rhs);
+ res = -(lhs < rhs);
break;
}