summaryrefslogtreecommitdiff
path: root/sys/dev/acpi/dsdt.c
diff options
context:
space:
mode:
authorjoshua stein <jcs@cvs.openbsd.org>2013-06-02 17:21:39 +0000
committerjoshua stein <jcs@cvs.openbsd.org>2013-06-02 17:21:39 +0000
commitdc37ea6b0c06ab67b8f98630cd0103f2a3e1238a (patch)
treed1fa969998c217011c035606cf1fbc53d7670db6 /sys/dev/acpi/dsdt.c
parent2e66cd0ddd5dd5f8851721ca31d758ed3f98fc21 (diff)
support aml_store to a method object to override it
resolves a problem parsing the AML on an ASUS UX21A originally from armani@ ok kettenis@
Diffstat (limited to 'sys/dev/acpi/dsdt.c')
-rw-r--r--sys/dev/acpi/dsdt.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/sys/dev/acpi/dsdt.c b/sys/dev/acpi/dsdt.c
index fac43d07815..f658e745c67 100644
--- a/sys/dev/acpi/dsdt.c
+++ b/sys/dev/acpi/dsdt.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: dsdt.c,v 1.202 2013/06/02 01:22:00 kettenis Exp $ */
+/* $OpenBSD: dsdt.c,v 1.203 2013/06/02 17:21:38 jcs Exp $ */
/*
* Copyright (c) 2005 Jordan Hargrave <jordan@openbsd.org>
*
@@ -2695,6 +2695,14 @@ aml_store(struct aml_scope *scope, struct aml_value *lhs , int64_t ival,
}
aml_copyvalue(node->value, rhs);
break;
+ case AML_OBJTYPE_METHOD:
+ /* Method override */
+ if (rhs->type != AML_OBJTYPE_INTEGER) {
+ aml_die("Overriding a method with a non-int?");
+ }
+ aml_freevalue(lhs);
+ aml_copyvalue(lhs, rhs);
+ break;
default:
aml_die("Store to default type! %x\n", lhs->type);
break;