[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PULL 88/96] acpi: add aml_reserved_field() term
From: |
Michael S. Tsirkin |
Subject: |
[Qemu-devel] [PULL 88/96] acpi: add aml_reserved_field() term |
Date: |
Wed, 18 Feb 2015 22:52:20 +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 | 6 ++++++
hw/acpi/aml-build.c | 10 ++++++++++
2 files changed, 16 insertions(+)
diff --git a/include/hw/acpi/aml-build.h b/include/hw/acpi/aml-build.h
index bf94155..ea3ece3 100644
--- a/include/hw/acpi/aml-build.h
+++ b/include/hw/acpi/aml-build.h
@@ -29,7 +29,12 @@ typedef enum {
} AmlIODecode;
typedef enum {
+ aml_any_acc = 0,
aml_byte_acc = 1,
+ aml_word_acc = 2,
+ aml_dword_acc = 3,
+ aml_qword_acc = 4,
+ aml_buffer_acc = 5,
} AmlFieldFlags;
typedef enum {
@@ -91,6 +96,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_reserved_field(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);
diff --git a/hw/acpi/aml-build.c b/hw/acpi/aml-build.c
index eeb006f..9d9b978 100644
--- a/hw/acpi/aml-build.c
+++ b/hw/acpi/aml-build.c
@@ -598,6 +598,16 @@ Aml *aml_named_field(const char *name, unsigned length)
return var;
}
+/* ACPI 1.0b: 16.2.5.2 Named Objects Encoding: ReservedField */
+Aml *aml_reserved_field(unsigned length)
+{
+ Aml *var = aml_alloc();
+ /* ReservedField := 0x00 PkgLength */
+ build_append_byte(var->buf, 0x00);
+ build_append_pkg_length(var->buf, length, false);
+ return var;
+}
+
/* ACPI 1.0b: 16.2.5.2 Named Objects Encoding: DefField */
Aml *aml_field(const char *name, AmlFieldFlags flags)
{
--
MST
- [Qemu-devel] [PULL 78/96] acpi: add aml_field() & aml_named_field() terms, (continued)
- [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, 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 <=
- [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
- [Qemu-devel] [PULL 95/96] acpi: drop unused generated files, Michael S. Tsirkin, 2015/02/18
- [Qemu-devel] [PULL 96/96] acpi-test: update expected files, Michael S. Tsirkin, 2015/02/18
- Re: [Qemu-devel] [PULL 00/96] pci, pc, virtio fixes and cleanups, Michael S. Tsirkin, 2015/02/24
- Re: [Qemu-devel] [PULL 00/96] pci, pc, virtio fixes and cleanups, Peter Maydell, 2015/02/26