soc: mpu hal fixes

This commit is contained in:
Renz Bagaporo 2020-03-06 10:15:05 +08:00
parent 604360b98c
commit ece80dbc8e
3 changed files with 6 additions and 3 deletions

View file

@ -22,7 +22,7 @@
extern "C" { extern "C" {
#endif #endif
static inline uint32_t cpu_ll_id_to_addr(int id) static inline uint32_t mpu_ll_id_to_addr(int id)
{ {
// vpn - id // vpn - id
// 0x00000000 = 0 // 0x00000000 = 0

View file

@ -22,7 +22,7 @@
extern "C" { extern "C" {
#endif #endif
static inline uint32_t cpu_ll_id_to_addr(int id) static inline uint32_t mpu_ll_id_to_addr(int id)
{ {
// vpn - id // vpn - id
// 0x00000000 = 0 // 0x00000000 = 0

View file

@ -25,7 +25,7 @@
void mpu_hal_set_region_access(int id, mpu_access_t access) void mpu_hal_set_region_access(int id, mpu_access_t access)
{ {
uint32_t addr = cpu_ll_id_to_addr(id); uint32_t addr = mpu_ll_id_to_addr(id);
switch (access) switch (access)
{ {
@ -48,6 +48,9 @@ void mpu_hal_set_region_access(int id, mpu_access_t access)
case MPU_REGION_RWX: case MPU_REGION_RWX:
mpu_ll_set_region_rwx(addr); mpu_ll_set_region_rwx(addr);
break; break;
case MPU_REGION_ILLEGAL:
mpu_ll_set_region_illegal(addr);
break;
default: default:
break; break;
} }