From be06ebd0a4d42ccd3d79fae24e48c264be377356 Mon Sep 17 00:00:00 2001 From: Igor Mammedov Date: Wed, 18 Feb 2015 19:14:17 +0000 Subject: acpi: add aml_device() term Signed-off-by: Igor Mammedov Reviewed-by: Michael S. Tsirkin Signed-off-by: Michael S. Tsirkin --- hw/acpi/aml-build.c | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'hw/acpi') diff --git a/hw/acpi/aml-build.c b/hw/acpi/aml-build.c index f891406d5f..c955d664ae 100644 --- a/hw/acpi/aml-build.c +++ b/hw/acpi/aml-build.c @@ -355,3 +355,14 @@ Aml *aml_scope(const char *name_format, ...) va_end(ap); return var; } + +/* ACPI 1.0b: 16.2.5.2 Named Objects Encoding: DefDevice */ +Aml *aml_device(const char *name_format, ...) +{ + va_list ap; + Aml *var = aml_bundle(0x82 /* DeviceOp */, AML_EXT_PACKAGE); + va_start(ap, name_format); + build_append_namestringv(var->buf, name_format, ap); + va_end(ap); + return var; +} -- cgit v1.2.3