From 3bfa74a7e8c0787877e0f23a873413ad8817c66c Mon Sep 17 00:00:00 2001 From: Igor Mammedov Date: Wed, 18 Feb 2015 19:14:28 +0000 Subject: acpi: add aml_package() term Signed-off-by: Igor Mammedov Reviewed-by: Michael S. Tsirkin Signed-off-by: Michael S. Tsirkin --- hw/acpi/aml-build.c | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'hw/acpi') diff --git a/hw/acpi/aml-build.c b/hw/acpi/aml-build.c index 18427b6..fdeeacc 100644 --- a/hw/acpi/aml-build.c +++ b/hw/acpi/aml-build.c @@ -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; +} -- cgit v1.1