diff options
author | Igor Mammedov <imammedo@redhat.com> | 2015-01-30 13:29:36 +0000 |
---|---|---|
committer | Michael S. Tsirkin <mst@redhat.com> | 2015-02-26 12:42:15 +0100 |
commit | 19934e0e3d0f70eefe8d9e51e71c1cb80f4659d0 (patch) | |
tree | 1411a658cc5ccc9410eea4be0320308df1911381 /include | |
parent | 12e63900f01ce54702745d83f985e26042adda9b (diff) | |
download | qemu-19934e0e3d0f70eefe8d9e51e71c1cb80f4659d0.zip |
acpi: move generic aml building helpers into dedictated file
the will be later used for composing AML primitives
and all that could be reused later for ARM machines
as well.
Signed-off-by: Igor Mammedov <imammedo@redhat.com>
Acked-by: Marcel Apfelbaum <marcel@redhat.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Diffstat (limited to 'include')
-rw-r--r-- | include/hw/acpi/aml-build.h | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/include/hw/acpi/aml-build.h b/include/hw/acpi/aml-build.h new file mode 100644 index 0000000000..e6a0b28990 --- /dev/null +++ b/include/hw/acpi/aml-build.h @@ -0,0 +1,23 @@ +#ifndef HW_ACPI_GEN_UTILS_H +#define HW_ACPI_GEN_UTILS_H + +#include <stdint.h> +#include <glib.h> +#include "qemu/compiler.h" + +GArray *build_alloc_array(void); +void build_free_array(GArray *array); +void build_prepend_byte(GArray *array, uint8_t val); +void build_append_byte(GArray *array, uint8_t val); +void build_append_array(GArray *array, GArray *val); + +void GCC_FMT_ATTR(2, 3) +build_append_nameseg(GArray *array, const char *format, ...); + +void build_prepend_package_length(GArray *package, unsigned min_bytes); +void build_package(GArray *package, uint8_t op, unsigned min_bytes); +void build_append_value(GArray *table, uint32_t value, int size); +void build_append_int(GArray *table, uint32_t value); +void build_extop_package(GArray *package, uint8_t op); + +#endif |