will be used by for packing _CST package in follow up patch Signed-off-by: Igor Mammedov <imamm...@redhat.com> --- include/hw/acpi/aml-build.h | 1 + hw/acpi/aml-build.c | 7 +++++++ 2 files changed, 8 insertions(+)
diff --git a/include/hw/acpi/aml-build.h b/include/hw/acpi/aml-build.h index 10c7946..8c8ca0b 100644 --- a/include/hw/acpi/aml-build.h +++ b/include/hw/acpi/aml-build.h @@ -371,6 +371,7 @@ Aml *aml_release(Aml *mutex); Aml *aml_alias(const char *source_object, const char *alias_object); Aml *aml_create_field(Aml *srcbuf, Aml *bit_index, Aml *num_bits, const char *name); +Aml *aml_create_byte_field(Aml *srcbuf, Aml *index, const char *name); Aml *aml_create_dword_field(Aml *srcbuf, Aml *index, const char *name); Aml *aml_create_qword_field(Aml *srcbuf, Aml *index, const char *name); Aml *aml_varpackage(uint32_t num_elements); diff --git a/hw/acpi/aml-build.c b/hw/acpi/aml-build.c index def62b3..977d929 100644 --- a/hw/acpi/aml-build.c +++ b/hw/acpi/aml-build.c @@ -1094,6 +1094,13 @@ Aml *aml_create_field(Aml *srcbuf, Aml *bit_index, Aml *num_bits, return var; } +/* ACPI 1.0b: 16.2.5.2 Named Objects Encoding: DefCreateByteField */ +Aml *aml_create_byte_field(Aml *srcbuf, Aml *index, const char *name) +{ + return create_field_common(0x8C /* CreateByteFieldOp */, + srcbuf, index, name); +} + /* ACPI 1.0b: 16.2.5.2 Named Objects Encoding: DefCreateDWordField */ Aml *aml_create_dword_field(Aml *srcbuf, Aml *index, const char *name) { -- 2.7.4