56static inline uint32_t
make_napot(uint32_t addr, uint32_t size)
59 return addr | ((size - 1) >> 1);
POSIX.1-2008 compliant version of the assert macro.
#define assert(cond)
abort the program if assertion is false
uint32_t read_pmpaddr(uint8_t reg_num)
Read a complete pmpaddr register.
void set_pmpcfg(uint8_t entry, uint8_t value)
Set's a single pmpcfg sub-register.
void print_pmpcfg(uint8_t entry)
Prints a single pmpcfg sub-register human readable.
uint8_t get_pmpcfg(uint8_t entry)
Read a single pmpcfg sub-register.
void write_pmpcfg(uint8_t reg_num, uint32_t value)
Writes a complete pmpcfg register.
void write_pmpaddr(uint8_t reg_num, uint32_t value)
Writes a complete pmpaddr register.
uint32_t read_pmpcfg(uint8_t reg_num)
Read a complete pmpcfg register.
static uint32_t make_napot(uint32_t addr, uint32_t size)
Create a NAPOT formatted address.