xref: /openbmc/qemu/include/hw/acpi/aml-build.h (revision 661875e948ece4723ebe4e7628060c27cad06df1)
119934e0eSIgor Mammedov #ifndef HW_ACPI_GEN_UTILS_H
219934e0eSIgor Mammedov #define HW_ACPI_GEN_UTILS_H
319934e0eSIgor Mammedov 
419934e0eSIgor Mammedov #include <stdint.h>
519934e0eSIgor Mammedov #include <glib.h>
619934e0eSIgor Mammedov #include "qemu/compiler.h"
719934e0eSIgor Mammedov 
819934e0eSIgor Mammedov GArray *build_alloc_array(void);
919934e0eSIgor Mammedov void build_free_array(GArray *array);
1019934e0eSIgor Mammedov void build_prepend_byte(GArray *array, uint8_t val);
1119934e0eSIgor Mammedov void build_append_byte(GArray *array, uint8_t val);
1219934e0eSIgor Mammedov void build_append_array(GArray *array, GArray *val);
1319934e0eSIgor Mammedov 
1419934e0eSIgor Mammedov void GCC_FMT_ATTR(2, 3)
15eae8bdedSIgor Mammedov build_append_namestring(GArray *array, const char *format, ...);
1619934e0eSIgor Mammedov 
17*661875e9SIgor Mammedov void build_prepend_package_length(GArray *package);
18*661875e9SIgor Mammedov void build_package(GArray *package, uint8_t op);
1919934e0eSIgor Mammedov void build_append_value(GArray *table, uint32_t value, int size);
2019934e0eSIgor Mammedov void build_append_int(GArray *table, uint32_t value);
2119934e0eSIgor Mammedov void build_extop_package(GArray *package, uint8_t op);
2219934e0eSIgor Mammedov 
2319934e0eSIgor Mammedov #endif
24