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>
This commit is contained in:
Igor Mammedov 2016-05-19 15:19:25 +02:00 committed by Michael S. Tsirkin
parent 0058c08238
commit 0e9b9edae7
8 changed files with 70 additions and 58 deletions

View file

@ -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