summaryrefslogtreecommitdiffstats
path: root/hw/acpi
diff options
context:
space:
mode:
authorIgor Mammedov <imammedo@redhat.com>2015-02-18 19:14:22 +0000
committerMichael S. Tsirkin <mst@redhat.com>2015-02-26 13:04:11 +0100
commitb25af5ad5953c9587e59c82cc668e574384f5245 (patch)
treecac68bee52b977bb69166c5f2e6733b10ebaa7be /hw/acpi
parent295a515df0df655a902df6ebfc301096a3ee88ed (diff)
downloadhqemu-b25af5ad5953c9587e59c82cc668e574384f5245.zip
hqemu-b25af5ad5953c9587e59c82cc668e574384f5245.tar.gz
acpi: add aml_return() 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>
Diffstat (limited to 'hw/acpi')
-rw-r--r--hw/acpi/aml-build.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/hw/acpi/aml-build.c b/hw/acpi/aml-build.c
index aaa80e5..8207d9c 100644
--- a/hw/acpi/aml-build.c
+++ b/hw/acpi/aml-build.c
@@ -355,6 +355,14 @@ Aml *aml_scope(const char *name_format, ...)
return var;
}
+/* ACPI 1.0b: 16.2.5.3 Type 1 Opcodes Encoding: DefReturn */
+Aml *aml_return(Aml *val)
+{
+ Aml *var = aml_opcode(0xA4 /* ReturnOp */);
+ aml_append(var, val);
+ return var;
+}
+
/*
* ACPI 1.0b: 16.2.3 Data Objects Encoding:
* encodes: ByteConst, WordConst, DWordConst, QWordConst, ZeroOp, OneOp
OpenPOWER on IntegriCloud