From 36de884a133f8cf1a18d55c1d76d783db9844abe Mon Sep 17 00:00:00 2001 From: Igor Mammedov Date: Thu, 10 Dec 2015 00:41:12 +0100 Subject: acpi: extend aml_field() to support LockRule Signed-off-by: Igor Mammedov Reviewed-by: Michael S. Tsirkin Signed-off-by: Michael S. Tsirkin --- hw/acpi/aml-build.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'hw/acpi') diff --git a/hw/acpi/aml-build.c b/hw/acpi/aml-build.c index fd512a5996..5dcaf3239e 100644 --- a/hw/acpi/aml-build.c +++ b/hw/acpi/aml-build.c @@ -952,11 +952,14 @@ Aml *aml_reserved_field(unsigned length) } /* ACPI 1.0b: 16.2.5.2 Named Objects Encoding: DefField */ -Aml *aml_field(const char *name, AmlAccessType type, AmlUpdateRule rule) +Aml *aml_field(const char *name, AmlAccessType type, AmlLockRule lock, + AmlUpdateRule rule) { Aml *var = aml_bundle(0x81 /* FieldOp */, AML_EXT_PACKAGE); uint8_t flags = rule << 5 | type; + flags |= lock << 4; /* LockRule at 4 bit offset */ + build_append_namestring(var->buf, "%s", name); build_append_byte(var->buf, flags); return var; -- cgit v1.2.3