]> Git Repo - qemu.git/commitdiff
acpi: add aml_if() term
authorIgor Mammedov <[email protected]>
Wed, 18 Feb 2015 19:14:19 +0000 (19:14 +0000)
committerMichael S. Tsirkin <[email protected]>
Thu, 26 Feb 2015 12:04:10 +0000 (13:04 +0100)
Signed-off-by: Igor Mammedov <[email protected]>
Reviewed-by: Michael S. Tsirkin <[email protected]>
Signed-off-by: Michael S. Tsirkin <[email protected]>
hw/acpi/aml-build.c
include/hw/acpi/aml-build.h

index 4e0685e37a706ab6f7f4488dc1ab1e6a64965645..d19d1fb74aeaaa58068fac760a4c18305338654b 100644 (file)
@@ -356,6 +356,14 @@ Aml *aml_scope(const char *name_format, ...)
     return var;
 }
 
+/* ACPI 1.0b: 16.2.5.3 Type 1 Opcodes Encoding: DefIfElse */
+Aml *aml_if(Aml *predicate)
+{
+    Aml *var = aml_bundle(0xA0 /* IfOp */, AML_PACKAGE);
+    aml_append(var, predicate);
+    return var;
+}
+
 /* ACPI 1.0b: 16.2.5.2 Named Objects Encoding: DefMethod */
 Aml *aml_method(const char *name, int arg_count)
 {
index 97e210a1f30c55cd9f6a9d66f00b4a68580c7c76..13cc9e9db990dfe1cda9e7eb1f5ae1f2f19baf41 100644 (file)
@@ -63,6 +63,7 @@ void aml_append(Aml *parent_ctx, Aml *child);
 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);
 
 /* other helpers */
 GArray *build_alloc_array(void);
This page took 0.028261 seconds and 4 git commands to generate.