diff options
author | Igor Mammedov <imammedo@redhat.com> | 2015-02-18 19:14:18 +0000 |
---|---|---|
committer | Michael S. Tsirkin <mst@redhat.com> | 2015-02-26 13:04:10 +0100 |
commit | ea2407d7e8adae1ab6cd0ca0366752d101d2344f (patch) | |
tree | 63365f2ce754b4801311faffc0626abd8f6c149e /hw/acpi | |
parent | be06ebd0a4d42ccd3d79fae24e48c264be377356 (diff) | |
download | qemu-ea2407d7e8adae1ab6cd0ca0366752d101d2344f.zip qemu-ea2407d7e8adae1ab6cd0ca0366752d101d2344f.tar.gz qemu-ea2407d7e8adae1ab6cd0ca0366752d101d2344f.tar.bz2 |
acpi: add aml_method() 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.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/hw/acpi/aml-build.c b/hw/acpi/aml-build.c index c955d66..4e0685e 100644 --- a/hw/acpi/aml-build.c +++ b/hw/acpi/aml-build.c @@ -356,6 +356,15 @@ Aml *aml_scope(const char *name_format, ...) return var; } +/* ACPI 1.0b: 16.2.5.2 Named Objects Encoding: DefMethod */ +Aml *aml_method(const char *name, int arg_count) +{ + Aml *var = aml_bundle(0x14 /* MethodOp */, AML_PACKAGE); + build_append_namestring(var->buf, "%s", name); + build_append_byte(var->buf, arg_count); /* MethodFlags: ArgCount */ + return var; +} + /* ACPI 1.0b: 16.2.5.2 Named Objects Encoding: DefDevice */ Aml *aml_device(const char *name_format, ...) { |