@@ -280,6 +280,7 @@ Aml *aml_buffer(int buffer_size, uint8_t *byte_list);
Aml *aml_resource_template(void);
Aml *aml_field(const char *name, AmlAccessType type, AmlUpdateRule rule);
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);
Aml *aml_touuid(const char *uuid);
Aml *aml_unicode(const char *str);
@@ -854,6 +854,17 @@ Aml *aml_create_dword_field(Aml *srcbuf, Aml *index, const char *name)
return var;
}
+/* ACPI 2.0: 17.2.4.2 Named Objects Encoding: DefCreateQWordField */
+Aml *aml_create_qword_field(Aml *srcbuf, Aml *index, const char *name)
+{
+ Aml *var = aml_alloc();
+ build_append_byte(var->buf, 0x8F); /* DefCreateQWordField */
+ aml_append(var, srcbuf);
+ aml_append(var, index);
+ build_append_namestring(var->buf, "%s", name);
+ return var;
+}
+
/* ACPI 1.0b: 16.2.3 Data Objects Encoding: String */
Aml *aml_string(const char *name_format, ...)
{
It follows the pattern of CreateDWordField() / aml_create_dword_field(). Cc: Paolo Bonzini <pbonzini@redhat.com> Cc: Gal Hammer <ghammer@redhat.com> Cc: Igor Mammedov <imammedo@redhat.com> Cc: "Michael S. Tsirkin" <mst@redhat.com> Signed-off-by: Laszlo Ersek <lersek@redhat.com> --- include/hw/acpi/aml-build.h | 1 + hw/acpi/aml-build.c | 11 +++++++++++ 2 files changed, 12 insertions(+)