diff options
author | Igor Mammedov <imammedo@redhat.com> | 2015-12-10 00:41:05 +0100 |
---|---|---|
committer | Timothy Pearson <tpearson@raptorengineering.com> | 2019-11-29 19:28:21 -0600 |
commit | e7e7bf009d236ca48cf6dd361fdab4c72c62f40c (patch) | |
tree | 5f005ea13f42b077fb27d11819ea2f02dfcaf1dd /hw/acpi | |
parent | 8ccaa4e62713fd2e8b851cd4bf8c80fc46b4604c (diff) | |
download | hqemu-e7e7bf009d236ca48cf6dd361fdab4c72c62f40c.zip hqemu-e7e7bf009d236ca48cf6dd361fdab4c72c62f40c.tar.gz |
acpi: add aml_to_integer()
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/acpi')
-rw-r--r-- | hw/acpi/aml-build.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/hw/acpi/aml-build.c b/hw/acpi/aml-build.c index b4fff5f..f58eb01 100644 --- a/hw/acpi/aml-build.c +++ b/hw/acpi/aml-build.c @@ -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) { |