diff options
author | Igor Mammedov <imammedo@redhat.com> | 2015-02-18 19:14:41 +0000 |
---|---|---|
committer | Michael S. Tsirkin <mst@redhat.com> | 2015-02-26 13:04:16 +0100 |
commit | 3dd156435369153c1c1d890b9ef525f1d033a971 (patch) | |
tree | 1c3ef05a63c08270efdb15ab706a1b6056ca6592 /hw | |
parent | 15e44e56d7da9d4569c10aa8de5f109a71570670 (diff) | |
download | qemu-3dd156435369153c1c1d890b9ef525f1d033a971.zip qemu-3dd156435369153c1c1d890b9ef525f1d033a971.tar.gz qemu-3dd156435369153c1c1d890b9ef525f1d033a971.tar.bz2 |
acpi: add aml_processor() 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')
-rw-r--r-- | hw/acpi/aml-build.c | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/hw/acpi/aml-build.c b/hw/acpi/aml-build.c index 97b027c..9081b49 100644 --- a/hw/acpi/aml-build.c +++ b/hw/acpi/aml-build.c @@ -650,3 +650,18 @@ Aml *aml_varpackage(uint32_t num_elements) build_append_int(var->buf, num_elements); return var; } + +/* ACPI 1.0b: 16.2.5.2 Named Objects Encoding: DefProcessor */ +Aml *aml_processor(uint8_t proc_id, uint32_t pblk_addr, uint8_t pblk_len, + const char *name_format, ...) +{ + va_list ap; + Aml *var = aml_bundle(0x83 /* ProcessorOp */, AML_EXT_PACKAGE); + va_start(ap, name_format); + build_append_namestringv(var->buf, name_format, ap); + va_end(ap); + build_append_byte(var->buf, proc_id); /* ProcID */ + build_append_int_noprefix(var->buf, pblk_addr, sizeof(pblk_addr)); + build_append_byte(var->buf, pblk_len); /* PblkLen */ + return var; +} |