Kevin O'Connor 8316d2f0af armcm_boot: Introduce application_check_valid()
Move application_check_valid() in bootentry.c to armcm_boot.c and make
the check specific to the ARM cortex-m.  On these ARM machines it is
easier to validate the application stack address.

Also rename jump_to_application() to application_jump().

Also rename flash_read_block() to application_read_flash() and move to
armcm_boot.c .

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2022-05-16 19:21:51 -04:00

30 lines
738 B
C

#ifndef __GENERIC_MISC_H
#define __GENERIC_MISC_H
#include <stdarg.h> // va_list
#include <stdint.h> // uint8_t
struct command_encoder;
void console_sendf(const struct command_encoder *ce, va_list args);
void *console_receive_buffer(void);
uint64_t get_bootup_code(void);
void set_bootup_code(uint64_t code);
void application_read_flash(uint32_t address, uint32_t *dest);
int application_check_valid(void);
void application_jump(void);
void timer_setup(void);
uint32_t timer_from_us(uint32_t us);
uint8_t timer_is_before(uint32_t time1, uint32_t time2);
uint32_t timer_read_time(void);
void timer_kick(void);
void *dynmem_start(void);
void *dynmem_end(void);
uint16_t crc16_ccitt(uint8_t *buf, uint_fast8_t len);
#endif // misc.h