diff options
author | Igor Mammedov <imammedo@redhat.com> | 2016-05-19 15:19:25 +0200 |
---|---|---|
committer | Michael S. Tsirkin <mst@redhat.com> | 2016-06-07 15:36:54 +0300 |
commit | 0e9b9edae7bebfd31fdbead4ccbbce03876a7edd (patch) | |
tree | ff0dd9054ac993eb51faa4342acade3c29b80645 /include | |
parent | 0058c0823815d33c96f4f26106dbd713c76280e1 (diff) |
acpi: convert linker from GArray to BIOSLinker structure
Patch just changes type of of linker variables to
a structure, there aren't any functional changes.
Converting linker to a structure will allow to extend
it functionality in follow up patch adding sanity blob
checks.
Signed-off-by: Igor Mammedov <imammedo@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 | 7 | ||||
-rw-r--r-- | include/hw/acpi/bios-linker-loader.h | 14 | ||||
-rw-r--r-- | include/hw/mem/nvdimm.h | 3 |
3 files changed, 15 insertions, 9 deletions
diff --git a/include/hw/acpi/aml-build.h b/include/hw/acpi/aml-build.h index dd432d2450..3952f85eeb 100644 --- a/include/hw/acpi/aml-build.h +++ b/include/hw/acpi/aml-build.h @@ -3,6 +3,7 @@ #include <glib.h> #include "hw/acpi/acpi-defs.h" +#include "hw/acpi/bios-linker-loader.h" /* Reserve RAM space for tables: add another order of magnitude. */ #define ACPI_BUILD_TABLE_MAX_SIZE 0x200000 @@ -210,7 +211,7 @@ struct AcpiBuildTables { GArray *table_data; GArray *rsdp; GArray *tcpalog; - GArray *linker; + BIOSLinker *linker; } AcpiBuildTables; /** @@ -365,7 +366,7 @@ Aml *aml_sizeof(Aml *arg); Aml *aml_concatenate(Aml *source1, Aml *source2, Aml *target); void -build_header(GArray *linker, GArray *table_data, +build_header(BIOSLinker *linker, GArray *table_data, AcpiTableHeader *h, const char *sig, int len, uint8_t rev, const char *oem_id, const char *oem_table_id); void *acpi_data_push(GArray *table_data, unsigned size); @@ -374,7 +375,7 @@ void acpi_add_table(GArray *table_offsets, GArray *table_data); void acpi_build_tables_init(AcpiBuildTables *tables); void acpi_build_tables_cleanup(AcpiBuildTables *tables, bool mfre); void -build_rsdt(GArray *table_data, GArray *linker, GArray *table_offsets, +build_rsdt(GArray *table_data, BIOSLinker *linker, GArray *table_offsets, const char *oem_id, const char *oem_table_id); int diff --git a/include/hw/acpi/bios-linker-loader.h b/include/hw/acpi/bios-linker-loader.h index 82f1af6433..4145c56921 100644 --- a/include/hw/acpi/bios-linker-loader.h +++ b/include/hw/acpi/bios-linker-loader.h @@ -3,23 +3,27 @@ #include <glib.h> -GArray *bios_linker_loader_init(void); +typedef struct BIOSLinker { + GArray *cmd_blob; +} BIOSLinker; -void bios_linker_loader_alloc(GArray *linker, +BIOSLinker *bios_linker_loader_init(void); + +void bios_linker_loader_alloc(BIOSLinker *linker, const char *file, uint32_t alloc_align, bool alloc_fseg); -void bios_linker_loader_add_checksum(GArray *linker, const char *file, +void bios_linker_loader_add_checksum(BIOSLinker *linker, const char *file, GArray *table, void *start, unsigned size, uint8_t *checksum); -void bios_linker_loader_add_pointer(GArray *linker, +void bios_linker_loader_add_pointer(BIOSLinker *linker, const char *dest_file, const char *src_file, GArray *table, void *pointer, uint8_t pointer_size); -void *bios_linker_loader_cleanup(GArray *linker); +void *bios_linker_loader_cleanup(BIOSLinker *linker); #endif diff --git a/include/hw/mem/nvdimm.h b/include/hw/mem/nvdimm.h index 517de9c366..32e1445a37 100644 --- a/include/hw/mem/nvdimm.h +++ b/include/hw/mem/nvdimm.h @@ -24,6 +24,7 @@ #define QEMU_NVDIMM_H #include "hw/mem/pc-dimm.h" +#include "hw/acpi/bios-linker-loader.h" #define NVDIMM_DEBUG 0 #define nvdimm_debug(fmt, ...) \ @@ -58,5 +59,5 @@ typedef struct AcpiNVDIMMState AcpiNVDIMMState; void nvdimm_init_acpi_state(AcpiNVDIMMState *state, MemoryRegion *io, FWCfgState *fw_cfg, Object *owner); void nvdimm_build_acpi(GArray *table_offsets, GArray *table_data, - GArray *linker); + BIOSLinker *linker); #endif |