diff options
author | Igor Mammedov <imammedo@redhat.com> | 2015-12-10 00:41:05 +0100 |
---|---|---|
committer | Michael S. Tsirkin <mst@redhat.com> | 2015-12-22 18:39:21 +0200 |
commit | f411199de79bd3015975a31068bbd9d94adcfb38 (patch) | |
tree | 304b78c43c49fe5bedfec046d6bb0789d94f94e2 /hw/acpi/aml-build.c | |
parent | 7b38ba9cb6fd47d89ab2db5b92ea6e4e6cd046cd (diff) |
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/aml-build.c')
-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 b4fff5f0a8..f58eb0123a 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) { |