[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PULL 84/96] acpi: add aml_processor() term
From: |
Michael S. Tsirkin |
Subject: |
[Qemu-devel] [PULL 84/96] acpi: add aml_processor() term |
Date: |
Wed, 18 Feb 2015 22:51:58 +0100 |
From: Igor Mammedov <address@hidden>
Signed-off-by: Igor Mammedov <address@hidden>
Reviewed-by: Michael S. Tsirkin <address@hidden>
Signed-off-by: Michael S. Tsirkin <address@hidden>
---
include/hw/acpi/aml-build.h | 2 ++
hw/acpi/aml-build.c | 15 +++++++++++++++
2 files changed, 17 insertions(+)
diff --git a/include/hw/acpi/aml-build.h b/include/hw/acpi/aml-build.h
index 5e2b434..58bbbfe 100644
--- a/include/hw/acpi/aml-build.h
+++ b/include/hw/acpi/aml-build.h
@@ -94,6 +94,8 @@ Aml *aml_named_field(const char *name, unsigned length);
Aml *aml_local(int num);
Aml *aml_string(const char *name_format, ...) GCC_FMT_ATTR(1, 2);
Aml *aml_equal(Aml *arg1, Aml *arg2);
+Aml *aml_processor(uint8_t proc_id, uint32_t pblk_addr, uint8_t pblk_len,
+ const char *name_format, ...) GCC_FMT_ATTR(4, 5);
/* Block AML object primitives */
Aml *aml_scope(const char *name_format, ...) GCC_FMT_ATTR(1, 2);
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;
+}
--
MST
- [Qemu-devel] [PULL 74/96] acpi: add aml_resource_template() helper, (continued)
- [Qemu-devel] [PULL 74/96] acpi: add aml_resource_template() helper, Michael S. Tsirkin, 2015/02/18
- [Qemu-devel] [PULL 75/96] acpi: add aml_io() helper, Michael S. Tsirkin, 2015/02/18
- [Qemu-devel] [PULL 76/96] acpi: include PkgLength size only when requested, Michael S. Tsirkin, 2015/02/18
- [Qemu-devel] [PULL 77/96] acpi: add aml_operation_region() term, Michael S. Tsirkin, 2015/02/18
- [Qemu-devel] [PULL 78/96] acpi: add aml_field() & aml_named_field() terms, Michael S. Tsirkin, 2015/02/18
- [Qemu-devel] [PULL 80/96] acpi: add aml_string() term, Michael S. Tsirkin, 2015/02/18
- [Qemu-devel] [PULL 79/96] acpi: add aml_local() term, Michael S. Tsirkin, 2015/02/18
- [Qemu-devel] [PULL 81/96] pc: acpi-build: generate pvpanic device description dynamically, Michael S. Tsirkin, 2015/02/18
- [Qemu-devel] [PULL 82/96] acpi: add aml_varpackage() term, Michael S. Tsirkin, 2015/02/18
- [Qemu-devel] [PULL 83/96] acpi: add aml_equal() term, Michael S. Tsirkin, 2015/02/18
- [Qemu-devel] [PULL 84/96] acpi: add aml_processor() term,
Michael S. Tsirkin <=
- [Qemu-devel] [PULL 85/96] acpi: add aml_eisaid() term, Michael S. Tsirkin, 2015/02/18
- [Qemu-devel] [PULL 86/96] pc: acpi-build: drop template patching and CPU hotplug objects dynamically, Michael S. Tsirkin, 2015/02/18
- [Qemu-devel] [PULL 87/96] pc: acpi-build: create CPU hotplug IO region dynamically, Michael S. Tsirkin, 2015/02/18
- [Qemu-devel] [PULL 88/96] acpi: add aml_reserved_field() term, Michael S. Tsirkin, 2015/02/18
- [Qemu-devel] [PULL 89/96] pc: acpi-build: drop template patching and memory hotplug objects dynamically, Michael S. Tsirkin, 2015/02/18
- [Qemu-devel] [PULL 90/96] pc: acpi-build: create memory hotplug IO region dynamically, Michael S. Tsirkin, 2015/02/18
- [Qemu-devel] [PULL 91/96] acpi: add aml_word_bus_number(), aml_word_io(), aml_dword_memory(), aml_qword_memory() terms, Michael S. Tsirkin, 2015/02/18
- [Qemu-devel] [PULL 92/96] pc: pcihp: expose MMIO base and len as properties, Michael S. Tsirkin, 2015/02/18
- [Qemu-devel] [PULL 93/96] pc: acpi-build: reserve PCIHP MMIO resources, Michael S. Tsirkin, 2015/02/18
- [Qemu-devel] [PULL 94/96] acpi: update generated hex files, Michael S. Tsirkin, 2015/02/18