@@ -926,6 +926,14 @@ AcpiAml *acpi_def_block(const char *signature, uint8_t revision,
return var;
}
+AcpiAml *aml_blob(const unsigned char *data, int size)
+{
+ AcpiAml *var = AML_OBJECT(object_new(TYPE_AML_OBJECT));
+
+ g_array_append_vals(var->buf, data, size);
+ return var;
+}
+
static void aml_object_initfn(Object *obj) {
AcpiAml *aml = AML_OBJECT(obj);
@@ -194,6 +194,8 @@ AcpiAml *acpi_field(const char *name, acpiFieldFlags flags);
AcpiAml *acpi_varpackage(uint32_t num_elements);
/* other helpers */
+AcpiAml *aml_blob(const unsigned char *data, int size);
+
GArray *build_alloc_array(void);
void build_free_array(GArray *array);
void build_prepend_byte(GArray *array, uint8_t val);
it will help to add external (user provided) tables into ACPI tables blob. Signed-off-by: Igor Mammedov <imammedo@redhat.com> --- hw/acpi/acpi-build-utils.c | 8 ++++++++ include/hw/acpi/acpi-build-utils.h | 2 ++ 2 files changed, 10 insertions(+)