|
PebbleOS
|
#include <stdint.h>#include <stdbool.h>Data Structures | |
| struct | MpuRegion |
| MPU region, described by its real base and size. More... | |
Enumerations | |
| enum | MpuCachePolicy { MpuCachePolicy_NotCacheable , MpuCachePolicy_WriteThrough , MpuCachePolicy_WriteBackWriteAllocate , MpuCachePolicy_WriteBackNoWriteAllocate } |
| Cache policy of a region. More... | |
| enum | MpuPermissions { MpuPermissions_NoAccess , MpuPermissions_PrivRW , MpuPermissions_PrivRW_UserRO , MpuPermissions_PrivRW_UserRW , MpuPermissions_PrivRO , MpuPermissions_PrivRO_UserRO , MpuPermissionsCount } |
| Access permissions of a region. More... | |
Functions | |
| void | mpu_enable (void) |
| Enable the MPU. | |
| void | mpu_disable (void) |
| Disable the MPU. | |
| void | mpu_set_region (const MpuRegion *region) |
| Program a region. | |
| MpuRegion | mpu_get_region (int region_num) |
| Read back a programmed region. | |
| void | mpu_get_register_settings (const MpuRegion *region, uint32_t *base_address_reg, uint32_t *attributes_reg) |
| Compute the register values for a region without programming it. | |
| bool | mpu_memory_is_cachable (const void *addr) |
| Check whether an address may be cached. | |
| void | mpu_init_region_from_region (MpuRegion *copy, const MpuRegion *from, bool allow_user_access) |
| Copy a privileged read/write region, optionally granting unprivileged access. | |