heavily restructured libpayload, more integrated with c8_remote now
This commit is contained in:
38
c8_remote/lib/payload/include/bootrom_func.h
Normal file
38
c8_remote/lib/payload/include/bootrom_func.h
Normal file
@@ -0,0 +1,38 @@
|
||||
#ifndef CHECKM8_TOOL_BOOTROM_FUNC_H
|
||||
#define CHECKM8_TOOL_BOOTROM_FUNC_H
|
||||
|
||||
#include "dev_util.h"
|
||||
|
||||
/* Crypto */
|
||||
int hardware_aes(unsigned long long cmd,
|
||||
unsigned char *src, unsigned char *dst,
|
||||
int len, unsigned long long opts,
|
||||
unsigned char *key, unsigned char *iv);
|
||||
|
||||
/* Timing */
|
||||
int clock_gate(int device, int power);
|
||||
unsigned long long get_time();
|
||||
void timer_register_int(unsigned long long dl);
|
||||
void wfi();
|
||||
|
||||
/* Tasking */
|
||||
void *task_new(char *name, BOOTROM_FUNC_I func, void *args, int ssize);
|
||||
void task_run(void *task);
|
||||
void task_pause(int usec);
|
||||
void task_resched();
|
||||
void task_free(void *task);
|
||||
|
||||
void event_new(void *dst, int flags, int state);
|
||||
void event_notify(void *ev);
|
||||
void event_wait(void *ev);
|
||||
|
||||
/* Heap */
|
||||
void calc_chksum(unsigned long long *dst, unsigned long long *src, int len, unsigned long long *cookie);
|
||||
void check_block_chksum(void *ptr);
|
||||
void check_all_chksums();
|
||||
|
||||
void *dev_malloc(int size);
|
||||
void *dev_memalign(int size, int constr);
|
||||
void dev_free(void *ptr);
|
||||
|
||||
#endif //CHECKM8_TOOL_BOOTROM_FUNC_H
|
||||
13
c8_remote/lib/payload/include/dev_util.h
Normal file
13
c8_remote/lib/payload/include/dev_util.h
Normal file
@@ -0,0 +1,13 @@
|
||||
#ifndef CHECKM8_TOOL_DEV_UTIL_H
|
||||
#define CHECKM8_TOOL_DEV_UTIL_H
|
||||
|
||||
typedef void (*BOOTROM_FUNC_V)();
|
||||
typedef int (*BOOTROM_FUNC_I)();
|
||||
typedef unsigned long long (*BOOTROM_FUNC_ULL)();
|
||||
typedef void (*(*BOOTROM_FUNC_PTR)());
|
||||
|
||||
#define PAYLOAD_SECTION __attribute__ ((section (".payload_text")))
|
||||
#define TEXT_SECTION __attribute__ ((section (".text")))
|
||||
#define BRLIB_SECTION(s) __attribute__ ((section (".bootrom_lib."s)))
|
||||
|
||||
#endif //CHECKM8_TOOL_DEV_UTIL_H
|
||||
Reference in New Issue
Block a user