Nexus Embedded Platform 1.0.0
Statically assembled reusable embedded mechanisms
Loading...
Searching...
No Matches
mpu.h
Go to the documentation of this file.
1
8#ifndef NEXUS_ARCH_MPU_H
9#define NEXUS_ARCH_MPU_H
10#include "nexus/arch/features.h"
11#include <stdbool.h>
12#include <stdint.h>
13#ifdef __cplusplus
14extern "C" {
15#endif
16
18typedef struct {
19 uint32_t base;
20 uint32_t size_log2;
21 uint32_t access;
22 uint32_t tex;
29
31typedef struct {
32 uint32_t rbar;
33 uint32_t rasr;
35
37typedef struct {
38 uint32_t base;
39 uint32_t limit;
40 uint32_t access;
41 uint32_t shareability;
45
47typedef struct {
48 uint32_t rbar;
49 uint32_t rlar;
51
70
86
106 const nx_arch_mpu_v7_region_t* region);
107
122 const nx_arch_mpu_v8_region_t* region);
123
142 uint32_t attribute);
143#ifdef __cplusplus
144}
145#endif
146#endif
Reviewed CPU mechanisms and allocation-free result types.
nx_arch_result_t
Result of a validated local CPU mechanism operation.
Definition features.h:16
nx_arch_result_t nx_arch_mpu_v8_program(uint32_t index, const nx_arch_mpu_v8_region_t *region)
Program one disabled-MPU Armv8-M region in this world.
nx_arch_result_t nx_arch_mpu_v8_attribute_set(uint32_t index, uint32_t attribute)
Update one Armv8-M MAIR byte without changing its neighbors.
nx_arch_result_t nx_arch_mpu_v8_encode(const nx_arch_mpu_v8_region_t *region, nx_arch_mpu_v8_encoding_t *encoding)
Encode an exact Armv8-M region without accessing hardware.
nx_arch_result_t nx_arch_mpu_v7_encode(const nx_arch_mpu_v7_region_t *region, nx_arch_mpu_v7_encoding_t *encoding)
Encode an exact Armv7-M region without accessing hardware.
nx_arch_result_t nx_arch_mpu_v7_program(uint32_t index, const nx_arch_mpu_v7_region_t *region)
Program one disabled-MPU Armv7-M region in this world.
Armv7-M words targeting the caller-selected RNR, not RBAR.VALID.
Definition mpu.h:31
Armv7-M region fields, without an implicit memory policy.
Definition mpu.h:18
uint32_t access
Definition mpu.h:21
uint32_t size_log2
Definition mpu.h:20
uint32_t subregion_disable
Definition mpu.h:23
Armv8-M words retaining its separate MAIR indirection.
Definition mpu.h:47
Armv8-M fields; limit is the exact inclusive final byte.
Definition mpu.h:37
uint32_t access
Definition mpu.h:40
uint32_t attribute_index
Definition mpu.h:42
uint32_t shareability
Definition mpu.h:41