2018-04-07 22:43:54 +01:00
|
|
|
#ifndef FUSEE_LOADER_H
|
|
|
|
#define FUSEE_LOADER_H
|
|
|
|
|
2018-04-08 05:51:24 +01:00
|
|
|
typedef void (*entrypoint_t)(int argc, void **argv);
|
2018-04-07 22:43:54 +01:00
|
|
|
|
2018-04-08 12:51:57 +01:00
|
|
|
typedef struct {
|
|
|
|
char path[0x300];
|
|
|
|
const char *key;
|
|
|
|
uintptr_t load_address;
|
|
|
|
} load_file_t;
|
|
|
|
|
|
|
|
typedef struct {
|
|
|
|
entrypoint_t entrypoint;
|
|
|
|
} loader_ctx_t;
|
|
|
|
|
|
|
|
#define LOADER_ENTRYPOINT_KEY "entrypoint"
|
|
|
|
#define LOADER_LOADLIST_KEY "loadlist"
|
|
|
|
|
|
|
|
/* TODO: Should we allow files bigger than 16 MB? */
|
|
|
|
#define LOADER_FILESIZE_MAX 0x01000000
|
|
|
|
|
2018-04-08 12:13:15 +01:00
|
|
|
entrypoint_t load_payload(const char *bct0);
|
2018-04-07 22:43:54 +01:00
|
|
|
|
|
|
|
#endif
|