aboutsummaryrefslogtreecommitdiff
path: root/include/kern/mpu/mpu_manager.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/kern/mpu/mpu_manager.h')
-rw-r--r--include/kern/mpu/mpu_manager.h26
1 files changed, 25 insertions, 1 deletions
diff --git a/include/kern/mpu/mpu_manager.h b/include/kern/mpu/mpu_manager.h
index 7c47722..5a0904c 100644
--- a/include/kern/mpu/mpu_manager.h
+++ b/include/kern/mpu/mpu_manager.h
@@ -55,7 +55,7 @@ typedef enum {
/* Both privileged and non-privileged users can access this memory, but only
as Read-only.*/
- ACCESS_PERMS_BOTH_RO = 5,
+ ACCESS_PERMS_BOTH_RO = 6,
} access_perms_t;
typedef struct {
@@ -81,4 +81,28 @@ void mpu_set_enabled(bool enabled);
*/
void mpu_configure_region(int region_number, memory_region_opts_t* opts);
+typedef enum {
+ PRIVILEGED,
+ NOT_PRIVILEGED,
+} privilege_t;
+
+
+/** Configure a peripheral region with default peripheral attributes. */
+void configure_peripheral_region(
+ void* peripheral_base,
+ region_size_t region_size,
+ privilege_t priv);
+
+/** Configure a flash region with default flash attributes. */
+void configure_flash_region(
+ void* flash_base,
+ region_size_t region_size,
+ privilege_t priv);
+
+/** Configure a ram region with default ram attributes. */
+void configure_ram_region(
+ void* ram_base,
+ region_size_t region_size,
+ privilege_t priv);
+
#endif /* KERN_MPU_MPU_MANAGER_H_ */