T-EMU
2
The Terma Emulator
|
#include <stdint.h>
Go to the source code of this file.
Functions | |
int | temu_loadImage (void *mem, const char *file) |
Loads a binary image to the memory object. More... | |
int | temu_loadRelocatedImage (void *mem, const char *file, uint64_t pa) |
Loads a binary image to the memory object at the given address. More... | |
int | temu_loadBinaryImage (void *mem, const char *file, uint64_t pa) |
Loads a raw binary image to the memory object at the given address. More... | |
int | temu_loadElfImage (void *mem, const char *file, uint64_t pa) |
int | temu_loadSrecImage (void *mem, const char *file, uint64_t pa) |
int temu_loadBinaryImage | ( | void * | mem, |
const char * | file, | ||
uint64_t | pa | ||
) |
Loads a raw binary image to the memory object at the given address.
The function will assume that the file is a raw binary. This way you can load an ELF file as is to memory (e.g. where it is expected by the boot loader).
mem | Memory object, must conform to the mem interface. |
file | Path to file to load. |
pa | Physical address where to load the image. |
int temu_loadElfImage | ( | void * | mem, |
const char * | file, | ||
uint64_t | pa | ||
) |
int temu_loadImage | ( | void * | mem, |
const char * | file | ||
) |
Loads a binary image to the memory object.
The function will autodetect the file type (based on extensions and magic headers in the file).
Binary images will be placed at address 0.
The image can be one of the supported file formats.
mem | Memory object, must conform to the mem interface. |
file | Path to file to load. |
int temu_loadRelocatedImage | ( | void * | mem, |
const char * | file, | ||
uint64_t | pa | ||
) |
Loads a binary image to the memory object at the given address.
The function will autodetect the file type (based on extensions and magic headers in the file). The binary is loaded to the given physical address (relocated). The relocation semantics is file type specific:
ELF: The content is shifted by pa - start address. I.e. the start address ends up at pa. SREC: The content is loaded to pa - start address. BIN: The content is loaded to pa.
mem | Memory object, must conform to the mem interface. |
file | Path to file to load. |
pa | The physical address to where to load the file. |
int temu_loadSrecImage | ( | void * | mem, |
const char * | file, | ||
uint64_t | pa | ||
) |