[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH v9 19/24] hw/acpi/aml-build: Add aml_create_dword_fi
From: |
Shannon Zhao |
Subject: |
[Qemu-devel] [PATCH v9 19/24] hw/acpi/aml-build: Add aml_create_dword_field() term |
Date: |
Mon, 25 May 2015 10:55:15 +0800 |
From: Shannon Zhao <address@hidden>
Signed-off-by: Shannon Zhao <address@hidden>
Signed-off-by: Shannon Zhao <address@hidden>
Reviewed-by: Alex Bennée <address@hidden>
Reviewed-by: Igor Mammedov <address@hidden>
---
hw/acpi/aml-build.c | 11 +++++++++++
include/hw/acpi/aml-build.h | 1 +
2 files changed, 12 insertions(+)
diff --git a/hw/acpi/aml-build.c b/hw/acpi/aml-build.c
index cfe1b29..2927be1 100644
--- a/hw/acpi/aml-build.c
+++ b/hw/acpi/aml-build.c
@@ -738,6 +738,17 @@ Aml *aml_field(const char *name, AmlAccessType type,
AmlUpdateRule rule)
return var;
}
+/* ACPI 1.0b: 16.2.5.2 Named Objects Encoding: DefCreateDWordField */
+Aml *aml_create_dword_field(Aml *srcbuf, Aml *index, const char *name)
+{
+ Aml *var = aml_alloc();
+ build_append_byte(var->buf, 0x8A); /* CreateDWordFieldOp */
+ aml_append(var, srcbuf);
+ aml_append(var, index);
+ build_append_namestring(var->buf, "%s", name);
+ return var;
+}
+
/* ACPI 1.0b: 16.2.3 Data Objects Encoding: String */
Aml *aml_string(const char *name_format, ...)
{
diff --git a/include/hw/acpi/aml-build.h b/include/hw/acpi/aml-build.h
index c999ef1..ae62995 100644
--- a/include/hw/acpi/aml-build.h
+++ b/include/hw/acpi/aml-build.h
@@ -259,6 +259,7 @@ Aml *aml_package(uint8_t num_elements);
Aml *aml_buffer(int buffer_size, uint8_t *byte_list);
Aml *aml_resource_template(void);
Aml *aml_field(const char *name, AmlAccessType type, AmlUpdateRule rule);
+Aml *aml_create_dword_field(Aml *srcbuf, Aml *index, const char *name);
Aml *aml_varpackage(uint32_t num_elements);
Aml *aml_touuid(const char *uuid);
--
2.0.4
- [Qemu-devel] [PATCH v9 09/24] hw/arm/virt-acpi-build: Generate MADT table, (continued)
- [Qemu-devel] [PATCH v9 13/24] hw/arm/virt-acpi-build: Generate MCFG table, Shannon Zhao, 2015/05/24
- [Qemu-devel] [PATCH v9 17/24] hw/acpi/aml-build: Add aml_lnot() term, Shannon Zhao, 2015/05/24
- [Qemu-devel] [PATCH v9 18/24] hw/acpi/aml-build: Add aml_else() term, Shannon Zhao, 2015/05/24
- [Qemu-devel] [PATCH v9 15/24] hw/acpi/aml-build: Add ToUUID macro, Shannon Zhao, 2015/05/24
- [Qemu-devel] [PATCH v9 20/24] hw/acpi/aml-build: Add aml_dword_io() term, Shannon Zhao, 2015/05/24
- [Qemu-devel] [PATCH v9 19/24] hw/acpi/aml-build: Add aml_create_dword_field() term,
Shannon Zhao <=
- [Qemu-devel] [PATCH v9 14/24] hw/acpi/aml-build: Make aml_buffer() definition consistent with the spec, Shannon Zhao, 2015/05/24
- [Qemu-devel] [PATCH v9 12/24] hw/arm/virt-acpi-build: Generate RSDP table, Shannon Zhao, 2015/05/24
- [Qemu-devel] [PATCH v9 11/24] hw/arm/virt-acpi-build: Generate RSDT table, Shannon Zhao, 2015/05/24
- [Qemu-devel] [PATCH v9 10/24] hw/arm/virt-acpi-build: Generate GTDT table, Shannon Zhao, 2015/05/24
- [Qemu-devel] [PATCH v9 23/24] ACPI: split CONFIG_ACPI into 4 pieces, Shannon Zhao, 2015/05/24
- [Qemu-devel] [PATCH v9 22/24] hw/arm/virt-acpi-build: Add PCIe controller in ACPI DSDT table, Shannon Zhao, 2015/05/24
- [Qemu-devel] [PATCH v9 21/24] hw/acpi/aml-build: Add Unicode macro, Shannon Zhao, 2015/05/24