[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [RFC 35/47] acpi: add acpi_reserved_field() term
From: |
Igor Mammedov |
Subject: |
[Qemu-devel] [RFC 35/47] acpi: add acpi_reserved_field() term |
Date: |
Fri, 19 Dec 2014 02:02:30 +0000 |
Signed-off-by: Igor Mammedov <address@hidden>
---
hw/acpi/acpi_gen_utils.c | 10 ++++++++++
include/hw/acpi/acpi_gen_utils.h | 6 ++++++
2 files changed, 16 insertions(+)
diff --git a/hw/acpi/acpi_gen_utils.c b/hw/acpi/acpi_gen_utils.c
index 68d1855..a77d18c 100644
--- a/hw/acpi/acpi_gen_utils.c
+++ b/hw/acpi/acpi_gen_utils.c
@@ -565,6 +565,16 @@ AcpiAml acpi_named_field(const char *name, unsigned length)
return var;
}
+/* ACPI 5.0: 20.2.5.2 Named Objects Encoding: ReservedField */
+AcpiAml acpi_reserved_field(unsigned length)
+{
+ AcpiAml var = aml_allocate_internal(0, NON_BLOCK);
+ /* ReservedField := 0x00 PkgLength */
+ build_append_byte(var.buf, 0x00);
+ build_append_pkg_length(var.buf, length, false);
+ return var;
+}
+
/* ACPI 5.0: 20.2.5.2 Named Objects Encoding: DefField */
AcpiAml acpi_field(const char *name, acpiFieldFlags flags)
{
diff --git a/include/hw/acpi/acpi_gen_utils.h b/include/hw/acpi/acpi_gen_utils.h
index 02d5aa8..048ed26 100644
--- a/include/hw/acpi/acpi_gen_utils.h
+++ b/include/hw/acpi/acpi_gen_utils.h
@@ -25,7 +25,12 @@ typedef enum {
} acpiIODecode;
typedef enum {
+ acpi_any_acc = 0,
acpi_byte_acc = 1,
+ acpi_word_acc = 2,
+ acpi_dword_acc = 3,
+ acpi_qword_acc = 4,
+ acpi_buffer_acc = 5,
} acpiFieldFlags;
typedef enum {
@@ -58,6 +63,7 @@ AcpiAml acpi_io(acpiIODecode dec, uint16_t min_base, uint16_t
max_base,
AcpiAml acpi_operation_region(const char *name, acpiRegionSpace rs,
uint32_t offset, uint32_t len);
AcpiAml acpi_named_field(const char *name, unsigned length);
+AcpiAml acpi_reserved_field(unsigned length);
AcpiAml GCC_FMT_ATTR(1, 2) acpi_string(const char *name_format, ...);
AcpiAml acpi_local0(void);
AcpiAml acpi_equal(AcpiAml arg1, AcpiAml arg2);
--
1.8.3.1
- [Qemu-devel] [RFC 26/47] acpi: add acpi_local0() term, (continued)
- [Qemu-devel] [RFC 26/47] acpi: add acpi_local0() term, Igor Mammedov, 2014/12/18
- [Qemu-devel] [RFC 28/47] pc: acpi-build: generate pvpanic device description dynamically, Igor Mammedov, 2014/12/18
- [Qemu-devel] [RFC 23/47] acpi: include PkgLength size only when requested, Igor Mammedov, 2014/12/18
- [Qemu-devel] [RFC 30/47] acpi: add acpi_equal() term, Igor Mammedov, 2014/12/18
- [Qemu-devel] [RFC 29/47] acpi: add acpi_varpackage() term, Igor Mammedov, 2014/12/18
- [Qemu-devel] [RFC 33/47] pc: acpi-build: drop template patching and CPU hotplug objects dynamically, Igor Mammedov, 2014/12/18
- [Qemu-devel] [RFC 31/47] acpi: add acpi_processor() term, Igor Mammedov, 2014/12/18
- [Qemu-devel] [RFC 32/47] acpi: add acpi_eisaid() term, Igor Mammedov, 2014/12/18
- [Qemu-devel] [RFC 27/47] acpi: add acpi_string() term, Igor Mammedov, 2014/12/18
- [Qemu-devel] [RFC 36/47] pc: acpi-build: drop template patching and memory hotplug objects dynamically, Igor Mammedov, 2014/12/18
- [Qemu-devel] [RFC 35/47] acpi: add acpi_reserved_field() term,
Igor Mammedov <=
- [Qemu-devel] [RFC 34/47] pc: acpi-build: create CPU hotplug IO region dynamically, Igor Mammedov, 2014/12/18
- [Qemu-devel] [RFC 37/47] pc: acpi-build: create memory hotplug IO region dynamically, Igor Mammedov, 2014/12/18
- [Qemu-devel] [RFC 39/47] pc: pcihp: expose MMIO base and len as properties, Igor Mammedov, 2014/12/18
- [Qemu-devel] [RFC 41/47] pc: acpi-build: create PCI0._CRS dynamically, Igor Mammedov, 2014/12/18
- [Qemu-devel] [RFC 40/47] pc: acpi-build: reserve PCIHP MMIO resources, Igor Mammedov, 2014/12/18
- [Qemu-devel] [RFC 38/47] acpi: add acpi_word_bus_number(), acpi_word_io(), acpi_dword_memory(), acpi_qword_memory() terms, Igor Mammedov, 2014/12/18
- [Qemu-devel] [RFC 42/47] acpi: make tables linker-loader available to other targets, Igor Mammedov, 2014/12/18
- [Qemu-devel] [RFC 43/47] acpi: add acpi_def_block() term, Igor Mammedov, 2014/12/18
- [Qemu-devel] [RFC 45/47] pc: acpi-build: drop remaining ssdt_misc template and use acpi_def_block(), Igor Mammedov, 2014/12/18
- [Qemu-devel] [RFC 44/47] pc: acpi-build: prepare to make ACPI tables blob opaque for table building functions, Igor Mammedov, 2014/12/18