summaryrefslogtreecommitdiff
path: root/hw/acpi/aml-build.c
diff options
context:
space:
mode:
Diffstat (limited to 'hw/acpi/aml-build.c')
-rw-r--r--hw/acpi/aml-build.c5
1 files changed, 4 insertions, 1 deletions
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;