[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PULL 79/96] acpi: add aml_local() term
From: |
Michael S. Tsirkin |
Subject: |
[Qemu-devel] [PULL 79/96] acpi: add aml_local() term |
Date: |
Wed, 18 Feb 2015 22:51:32 +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 | 1 +
hw/acpi/aml-build.c | 11 +++++++++++
2 files changed, 12 insertions(+)
diff --git a/include/hw/acpi/aml-build.h b/include/hw/acpi/aml-build.h
index 2bb5f39..de081d6 100644
--- a/include/hw/acpi/aml-build.h
+++ b/include/hw/acpi/aml-build.h
@@ -91,6 +91,7 @@ Aml *aml_io(AmlIODecode dec, uint16_t min_base, uint16_t
max_base,
Aml *aml_operation_region(const char *name, AmlRegionSpace rs,
uint32_t offset, uint32_t len);
Aml *aml_named_field(const char *name, unsigned length);
+Aml *aml_local(int num);
/* 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 b91141e..fabd0ad 100644
--- a/hw/acpi/aml-build.c
+++ b/hw/acpi/aml-build.c
@@ -596,3 +596,14 @@ Aml *aml_field(const char *name, AmlFieldFlags flags)
build_append_byte(var->buf, flags);
return var;
}
+
+/* ACPI 1.0b: 16.2.6.2 Local Objects Encoding */
+Aml *aml_local(int num)
+{
+ Aml *var;
+ uint8_t op = 0x60 /* Local0Op */ + num;
+
+ assert(num <= 7);
+ var = aml_opcode(op);
+ return var;
+}
--
MST
- [Qemu-devel] [PULL 70/96] acpi: add aml_call1(), aml_call2(), aml_call3(), aml_call4() helpers, (continued)
- [Qemu-devel] [PULL 70/96] acpi: add aml_call1(), aml_call2(), aml_call3(), aml_call4() helpers, Michael S. Tsirkin, 2015/02/18
- [Qemu-devel] [PULL 71/96] acpi: add aml_package() term, Michael S. Tsirkin, 2015/02/18
- [Qemu-devel] [PULL 72/96] pc: acpi-build: generate _S[345] packages dynamically, Michael S. Tsirkin, 2015/02/18
- [Qemu-devel] [PULL 73/96] acpi: add aml_buffer() term, Michael S. Tsirkin, 2015/02/18
- [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 <=
- [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, 2015/02/18
- [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