added to the bootrom libraries

This commit is contained in:
2020-02-24 15:02:05 -05:00
parent db97653fc2
commit a66ff906bd
4 changed files with 36 additions and 5 deletions

View File

@@ -2,6 +2,7 @@
#define CHECKM8_TOOL_BOOTROM_FUNC_H
#include "bootrom_addr.h"
#include "bootrom_type.h"
#include "dev_util.h"
/* Crypto */
@@ -65,21 +66,26 @@ static inline void task_free(void *task)
((BOOTROM_FUNC_V) ADDR_TASK_FREE)(task);
}
static inline void event_new(void *dst, int flags, int state)
static inline void event_new(struct event *dst, int flags, int state)
{
((BOOTROM_FUNC_V) ADDR_EVENT_NEW)(dst, flags, state);
}
static inline void event_notify(void *ev)
static inline void event_notify(struct event *ev)
{
((BOOTROM_FUNC_V) ADDR_EVENT_NOTIFY)(ev);
}
static inline void event_wait(void *ev)
static inline void event_wait(struct event *ev)
{
((BOOTROM_FUNC_V) ADDR_EVENT_WAIT)(ev);
}
static inline int event_try(struct event *ev, int timeout)
{
return ((BOOTROM_FUNC_I) ADDR_EVENT_TRY)(ev, timeout);
}
/* Heap */
static inline void calc_chksum(unsigned long long *dst, unsigned long long *src,
int len, unsigned long long *cookie)

View File

@@ -48,13 +48,13 @@ static inline void clean_inv_l1_setway(unsigned int set, unsigned int way)
}
PAYLOAD_SECTION
static inline void inv_l1_va(unsigned long long *addr)
static inline void inv_va(void *addr)
{
__asm__ volatile ("dc ivac, %0"::"r" (addr));
}
PAYLOAD_SECTION
static inline void clean_inv_l1_va(unsigned long long *addr)
static inline void clean_inv_va(void *addr)
{
__asm__ volatile ("dc ivac, %0"::"r" (addr));
}