]> Git Repo - qemu.git/commitdiff
acpi: add aml_to_integer()
authorIgor Mammedov <[email protected]>
Wed, 9 Dec 2015 23:41:05 +0000 (00:41 +0100)
committerMichael S. Tsirkin <[email protected]>
Tue, 22 Dec 2015 16:39:21 +0000 (18:39 +0200)
Signed-off-by: Igor Mammedov <[email protected]>
Reviewed-by: Michael S. Tsirkin <[email protected]>
Signed-off-by: Michael S. Tsirkin <[email protected]>
Reviewed-by: Marcel Apfelbaum <[email protected]>
hw/acpi/aml-build.c
include/hw/acpi/aml-build.h

index b4fff5f0a81b94e638bec4ae1370265d05669fd7..f58eb0123af5da12ff8f575068c34d5dd8da8904 100644 (file)
@@ -427,6 +427,15 @@ Aml *aml_arg(int pos)
     return var;
 }
 
+/* ACPI 2.0a: 17.2.4.4 Type 2 Opcodes Encoding: DefToInteger */
+Aml *aml_to_integer(Aml *arg)
+{
+    Aml *var = aml_opcode(0x99 /* ToIntegerOp */);
+    aml_append(var, arg);
+    build_append_byte(var->buf, 0x00 /* NullNameOp */);
+    return var;
+}
+
 /* ACPI 1.0b: 16.2.5.4 Type 2 Opcodes Encoding: DefStore */
 Aml *aml_store(Aml *val, Aml *target)
 {
index 81326bd9b7859bc07f3d0e851d8daa1511f547c6..c3d3fd5c8f518b05f0e72ca0e82c4f9b2bf79880 100644 (file)
@@ -224,6 +224,7 @@ Aml *aml_name_decl(const char *name, Aml *val);
 Aml *aml_return(Aml *val);
 Aml *aml_int(const uint64_t val);
 Aml *aml_arg(int pos);
+Aml *aml_to_integer(Aml *arg);
 Aml *aml_store(Aml *val, Aml *target);
 Aml *aml_and(Aml *arg1, Aml *arg2);
 Aml *aml_or(Aml *arg1, Aml *arg2);
This page took 0.02963 seconds and 4 git commands to generate.