acpi: add aml_package() term

Signed-off-by: Igor Mammedov <imammedo@redhat.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
This commit is contained in:
Igor Mammedov 2015-02-18 19:14:28 +00:00 committed by Michael S. Tsirkin
parent 3f3992b7c4
commit 3bfa74a7e8
2 changed files with 9 additions and 0 deletions

View file

@ -505,3 +505,11 @@ Aml *aml_device(const char *name_format, ...)
va_end(ap);
return var;
}
/* ACPI 1.0b: 16.2.5.4 Type 2 Opcodes Encoding: DefPackage */
Aml *aml_package(uint8_t num_elements)
{
Aml *var = aml_bundle(0x12 /* PackageOp */, AML_PACKAGE);
build_append_byte(var->buf, num_elements);
return var;
}

View file

@ -78,6 +78,7 @@ Aml *aml_scope(const char *name_format, ...) GCC_FMT_ATTR(1, 2);
Aml *aml_device(const char *name_format, ...) GCC_FMT_ATTR(1, 2);
Aml *aml_method(const char *name, int arg_count);
Aml *aml_if(Aml *predicate);
Aml *aml_package(uint8_t num_elements);
/* other helpers */
GArray *build_alloc_array(void);