[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH 06/13] acpi: use TYPE_AML_OBJECT for toplevel ACPI t
From: |
Igor Mammedov |
Subject: |
[Qemu-devel] [PATCH 06/13] acpi: use TYPE_AML_OBJECT for toplevel ACPI tables blob |
Date: |
Wed, 28 Jan 2015 10:03:30 +0000 |
it allows to use blob with AML API like the rest of
AML objects and use object_unref() to destroy it cleaning up
all child AML objects that we used for tables construction.
Signed-off-by: Igor Mammedov <address@hidden>
---
hw/i386/acpi-build.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/hw/i386/acpi-build.c b/hw/i386/acpi-build.c
index f24f92b..f456f53 100644
--- a/hw/i386/acpi-build.c
+++ b/hw/i386/acpi-build.c
@@ -1279,7 +1279,7 @@ struct AcpiBuildTables {
static inline void acpi_build_tables_init(AcpiBuildTables *tables)
{
tables->rsdp = g_array_new(false, true /* clear */, 1);
- tables->table_data->buf = g_array_new(false, true /* clear */, 1);
+ tables->table_data = AML_OBJECT(object_new(TYPE_AML_OBJECT));
tables->tcpalog = g_array_new(false, true /* clear */, 1);
tables->linker = bios_linker_loader_init();
tables->table_data->linker = tables->linker;
@@ -1290,7 +1290,7 @@ static inline void
acpi_build_tables_cleanup(AcpiBuildTables *tables, bool mfre)
void *linker_data = bios_linker_loader_cleanup(tables->linker);
g_free(linker_data);
g_array_free(tables->rsdp, mfre);
- g_array_free(tables->table_data->buf, true);
+ object_unref(OBJECT(tables->table_data));
g_array_free(tables->tcpalog, mfre);
}
--
1.8.3.1
- Re: [Qemu-devel] [PATCH 03/13] qom: add support for weak referenced object: aka UnownedObject, (continued)
- Re: [Qemu-devel] [PATCH 03/13] qom: add support for weak referenced object: aka UnownedObject, Igor Mammedov, 2015/01/28
- [Qemu-devel] [PATCH 05/13] acpi: use TYPE_AML_OBJECT inside of AML API, Igor Mammedov, 2015/01/28
- [Qemu-devel] [PATCH 09/13] acpi: add aml_blob() helper, Igor Mammedov, 2015/01/28
- [Qemu-devel] [PATCH 08/13] i386: acpi: hack not yet converted tables calls to deal with table_data being a pointer, Igor Mammedov, 2015/01/28
- [Qemu-devel] [PATCH 01/13] convert to passing AcpiAml by pointers, Igor Mammedov, 2015/01/28
- [Qemu-devel] [PATCH 10/13] i386: acpi: add DSDT table using AML API, Igor Mammedov, 2015/01/28
- [Qemu-devel] [PATCH 07/13] acpi: make toplevel ACPI tables blob a dedicated object, Igor Mammedov, 2015/01/28
- [Qemu-devel] [PATCH 11/13] acpi: acpi_add_table() to common cross target file, Igor Mammedov, 2015/01/28
- [Qemu-devel] [PATCH 12/13] acpi: prepare for API internal collection of RSDT entries, Igor Mammedov, 2015/01/28
- [Qemu-devel] [PATCH 13/13] i386: acpi: mark SSDT as RSDT entry so API would add entry to RSDT automatically, Igor Mammedov, 2015/01/28
- [Qemu-devel] [PATCH 06/13] acpi: use TYPE_AML_OBJECT for toplevel ACPI tables blob,
Igor Mammedov <=
- Re: [Qemu-devel] [PATCH 00/13] convert AML API to QOM, Andrew Jones, 2015/01/28
- Re: [Qemu-devel] [PATCH v2 01/47] acpi: introduce AML composer aml_append(), Michael S. Tsirkin, 2015/01/28
- Re: [Qemu-devel] [PATCH v2 01/47] acpi: introduce AML composer aml_append(), Igor Mammedov, 2015/01/28
- Re: [Qemu-devel] [PATCH v2 01/47] acpi: introduce AML composer aml_append(), Michael S. Tsirkin, 2015/01/28
- Re: [Qemu-devel] [PATCH v2 01/47] acpi: introduce AML composer aml_append(), Igor Mammedov, 2015/01/28
- Re: [Qemu-devel] [PATCH v2 01/47] acpi: introduce AML composer aml_append(), Michael S. Tsirkin, 2015/01/28
- Re: [Qemu-devel] [PATCH v2 01/47] acpi: introduce AML composer aml_append(), Claudio Fontana, 2015/01/28
- Re: [Qemu-devel] [PATCH v2 01/47] acpi: introduce AML composer aml_append(), Shannon Zhao, 2015/01/29
- Re: [Qemu-devel] [PATCH v2 01/47] acpi: introduce AML composer aml_append(), Igor Mammedov, 2015/01/29
- Re: [Qemu-devel] [PATCH v2 01/47] acpi: introduce AML composer aml_append(), Andrew Jones, 2015/01/28