diff options
author | Igor Mammedov <imammedo@redhat.com> | 2015-12-10 00:41:13 +0100 |
---|---|---|
committer | Michael S. Tsirkin <mst@redhat.com> | 2015-12-22 18:39:21 +0200 |
commit | 6d5ea945ceeda364c18a28f7ef7bcbe3c7c94f67 (patch) | |
tree | 8d4d4460f886b464ff053839a6d142826b754d21 /hw | |
parent | 36de884a133f8cf1a18d55c1d76d783db9844abe (diff) | |
download | qemu-6d5ea945ceeda364c18a28f7ef7bcbe3c7c94f67.zip qemu-6d5ea945ceeda364c18a28f7ef7bcbe3c7c94f67.tar.gz qemu-6d5ea945ceeda364c18a28f7ef7bcbe3c7c94f67.tar.bz2 |
acpi: add aml_to_hexstring()
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>
Reviewed-by: Marcel Apfelbaum <marcel@redhat.com>
Diffstat (limited to 'hw')
-rw-r--r-- | hw/acpi/aml-build.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/hw/acpi/aml-build.c b/hw/acpi/aml-build.c index 5dcaf32..40ea128 100644 --- a/hw/acpi/aml-build.c +++ b/hw/acpi/aml-build.c @@ -436,6 +436,19 @@ Aml *aml_to_integer(Aml *arg) return var; } +/* ACPI 2.0a: 17.2.4.4 Type 2 Opcodes Encoding: DefToHexString */ +Aml *aml_to_hexstring(Aml *src, Aml *dst) +{ + Aml *var = aml_opcode(0x98 /* ToHexStringOp */); + aml_append(var, src); + if (dst) { + aml_append(var, dst); + } else { + 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) { |