mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-10 02:54:58 -06:00
acpi: extend aml_field() to support UpdateRule
The flags field is declared with default update rule 'Preserve', this patch extends aml_field() to support UpdateRule so that we can specify different values per field. Reviewed-by: Igor Mammedov <imammedo@redhat.com> Signed-off-by: Zhu Guihua <zhugh.fnst@cn.fujitsu.com> Reviewed-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
This commit is contained in:
parent
f7d3e29db5
commit
af50989731
3 changed files with 19 additions and 8 deletions
|
@ -636,9 +636,11 @@ Aml *aml_reserved_field(unsigned length)
|
|||
}
|
||||
|
||||
/* ACPI 1.0b: 16.2.5.2 Named Objects Encoding: DefField */
|
||||
Aml *aml_field(const char *name, AmlFieldFlags flags)
|
||||
Aml *aml_field(const char *name, AmlAccessType type, AmlUpdateRule rule)
|
||||
{
|
||||
Aml *var = aml_bundle(0x81 /* FieldOp */, AML_EXT_PACKAGE);
|
||||
uint8_t flags = rule << 5 | type;
|
||||
|
||||
build_append_namestring(var->buf, "%s", name);
|
||||
build_append_byte(var->buf, flags);
|
||||
return var;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue