Skip to content

Commit 84df9e0

Browse files
feat(locked): Add support for locked entried on the vmpu
1 parent 91c3efe commit 84df9e0

File tree

2 files changed

+9
-4
lines changed
  • src

2 files changed

+9
-4
lines changed

src/arch/armv8/armv8-r/mpu.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -180,7 +180,7 @@ static priv_t mpu_as_priv(struct addr_space *as)
180180
return priv;
181181
}
182182

183-
bool mpu_map(struct addr_space *as, struct mp_region* mpr)
183+
bool mpu_map(struct addr_space* as, struct mp_region* mpr, bool locked)
184184
{
185185
size_t size_left = mpr->size;
186186
bool failed = false;

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

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ struct addr_space {
3232
struct mpe {
3333
node_t node;
3434
enum { MPE_S_FREE, MPE_S_INVALID, MPE_S_VALID } state;
35+
bool lock;
3536
struct mp_region region;
3637
mpid_t mpid;
3738
} node[VMPU_NUM_ENTRIES];
@@ -46,7 +47,7 @@ static inline bool mem_regions_overlap(struct mp_region* reg1, struct mp_region*
4647
return range_in_range(reg1->base, reg1->size, reg2->base, reg2->size);
4748
}
4849

49-
bool mem_map(struct addr_space* as, struct mp_region* mpr, bool broadcast);
50+
bool mem_map(struct addr_space* as, struct mp_region* mpr, bool broadcast, bool locked);
5051

5152
/**
5253
* This functions must be defined for the physical MPU. The abstraction provided by the physical
@@ -57,7 +58,11 @@ bool mem_map(struct addr_space* as, struct mp_region* mpr, bool broadcast);
5758
*/
5859
void mpu_init(void);
5960
void mpu_enable(void);
60-
bool mpu_map(struct addr_space* as, struct mp_region* mem);
61+
bool mpu_map(struct addr_space* as, struct mp_region* mem, bool locked);
6162
bool mpu_unmap(struct addr_space* as, struct mp_region* mem);
62-
bool mpu_update(struct addr_space* as, struct mp_region* mem);
63+
64+
void mem_vmpu_coalesce_contiguous(struct addr_space* as, bool broadcast, bool locked);
65+
bool mem_update(struct addr_space* as, struct mp_region* mpr, bool broadcast, bool locked);
66+
bool mpu_update(struct addr_space* as, struct mp_region* mpr);
67+
6368
#endif /* __MEM_PROT_H__ */

0 commit comments

Comments
 (0)