Skip to content

Commit 0558bd5

Browse files
danielRepmiguelafsilva5
authored andcommitted
feat(mpu): add mpu enable api
Signed-off-by: Daniel Oliveira <[email protected]>
1 parent 8636568 commit 0558bd5

File tree

2 files changed

+2
-0
lines changed

2 files changed

+2
-0
lines changed

src/core/mpu/inc/mem_prot/mem.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,7 @@ bool mem_map(struct addr_space* as, struct mp_region* mpr, bool broadcast);
5656
* success value.
5757
*/
5858
void mpu_init(void);
59+
void mpu_enable(void);
5960
bool mpu_map(struct addr_space* as, struct mp_region* mem);
6061
bool mpu_unmap(struct addr_space* as, struct mp_region* mem);
6162

src/core/mpu/mem.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -204,6 +204,7 @@ void mem_prot_init()
204204
mpu_init();
205205
as_init(&cpu()->as, AS_HYP, HYP_ASID, BIT_MASK(0, PLAT_CPU_NUM), 0);
206206
as_init_boot_regions();
207+
mpu_enable();
207208
}
208209

209210
size_t mem_cpu_boot_alloc_size()

0 commit comments

Comments
 (0)