aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorIgor Mammedov <imammedo@redhat.com>2016-05-19 15:19:26 +0200
committerMichael S. Tsirkin <mst@redhat.com>2016-06-07 15:39:27 +0300
commitad9671b8700ac491564d964f79ee9d1f106756ae (patch)
tree54b80ad692375caf6590a5045915bbe27b38a01b /include
parent0e9b9edae7bebfd31fdbead4ccbbce03876a7edd (diff)
downloadqemu-ad9671b8700ac491564d964f79ee9d1f106756ae.zip
qemu-ad9671b8700ac491564d964f79ee9d1f106756ae.tar.gz
qemu-ad9671b8700ac491564d964f79ee9d1f106756ae.tar.bz2
acpi: simplify bios_linker API by removing redundant 'table' argument
'table' argument in bios_linker_add_foo() commands is a data blob of one of files also passed to the same API. So instead of passing blob in every API call, add and keep file name association with related blob at bios_linker_loader_alloc() time. And find blob by name looking up allocated file entries inside of bios_linker_add_foo() commands. It will: - make API less confusing, - enforce calling bios_linker_loader_alloc() before calling any bios_linker_add_foo() - make sure that blob is the correct one, i.e. associated with the right file name 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/bios-linker-loader.h7
-rw-r--r--include/hw/mem/nvdimm.h2
2 files changed, 5 insertions, 4 deletions
diff --git a/include/hw/acpi/bios-linker-loader.h b/include/hw/acpi/bios-linker-loader.h
index 4145c569..bee6dee 100644
--- a/include/hw/acpi/bios-linker-loader.h
+++ b/include/hw/acpi/bios-linker-loader.h
@@ -5,24 +5,25 @@
typedef struct BIOSLinker {
GArray *cmd_blob;
+ GArray *file_list;
} BIOSLinker;
BIOSLinker *bios_linker_loader_init(void);
void bios_linker_loader_alloc(BIOSLinker *linker,
- const char *file,
+ const char *file_name,
+ GArray *file_blob,
uint32_t alloc_align,
bool alloc_fseg);
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(BIOSLinker *linker,
const char *dest_file,
const char *src_file,
- GArray *table, void *pointer,
+ void *pointer,
uint8_t pointer_size);
void *bios_linker_loader_cleanup(BIOSLinker *linker);
diff --git a/include/hw/mem/nvdimm.h b/include/hw/mem/nvdimm.h
index 32e1445..60ee92b 100644
--- a/include/hw/mem/nvdimm.h
+++ b/include/hw/mem/nvdimm.h
@@ -59,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,
- BIOSLinker *linker);
+ BIOSLinker *linker, GArray *dsm_dma_arrea);
#endif