Zephyr API Documentation
4.1.99
A Scalable Open Source RTOS
4.1.99
Toggle main menu visibility
Main Page
Related Pages
Topics
Data Structures
Data Structures
Data Structure Index
Data Fields
All
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Functions
Variables
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Enumerations
Enumerator
Files
File List
Globals
All
$
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
z
Functions
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
z
Variables
$
a
b
c
d
f
g
h
i
k
l
m
n
o
p
q
r
s
t
u
x
z
Typedefs
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
z
Enumerations
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
r
s
t
u
v
w
x
z
Enumerator
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
r
s
t
u
v
w
x
z
Macros
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
z
▼
Zephyr API Documentation
►
Introduction
Deprecated List
►
Topics
►
Data Structures
▼
Files
▼
File List
►
doc
►
kernel
►
lib
►
subsys
▼
zephyr
►
acpi
►
app_memory
▼
arch
▼
arc
►
asm-compat
▼
v2
►
dsp
▼
mpu
►
arc_core_mpu.h
►
arc_mpu.h
►
secureshield
►
vpx
►
arc_connect.h
arcv2_irq_unit.h
asm_inline.h
asm_inline_gcc.h
aux_regs.h
►
error.h
►
exception.h
►
irq.h
►
misc.h
►
sys_io.h
arc_addr_types.h
►
arch.h
►
arch_inlines.h
►
cluster.h
►
sys-io-common.h
►
syscall.h
thread.h
tool-compat.h
►
arm
►
arm64
►
common
►
mips
►
nios2
►
posix
►
riscv
►
sparc
►
x86
►
xtensa
arch_inlines.h
►
arch_interface.h
►
cache.h
cpu.h
exception.h
structs.h
syscall.h
►
audio
►
bluetooth
►
canbus
►
console
►
crypto
►
data
►
debug
►
devicetree
►
dfu
►
display
►
drivers
►
dsp
►
dt-bindings
►
fs
►
input
►
internal
►
ipc
►
kernel
►
linker
►
llext
►
logging
►
lorawan
►
math
►
mctp
►
mem_mgmt
►
mgmt
►
misc
►
modbus
►
modem
►
multi_heap
►
net
►
platform
►
pm
►
portability
►
posix
►
psa
►
random
►
retention
►
rtio
►
sd
►
sensing
►
settings
►
shell
►
sip_svc
►
stats
►
storage
►
sys
►
task_wdt
►
timing
►
toolchain
►
tracing
►
usb
►
usb_c
►
xen
►
zbus
►
zvfs
►
bindesc.h
►
cache.h
►
device.h
►
devicetree.h
►
fatal.h
►
fatal_types.h
►
init.h
►
irq.h
►
irq_multilevel.h
►
irq_nextlevel.h
►
irq_offload.h
►
kernel.h
kernel_includes.h
►
kernel_structs.h
►
kernel_version.h
►
net_buf.h
►
shared_irq.h
►
smf.h
►
spinlock.h
►
sw_isr_table.h
►
sys_clock.h
►
syscall.h
►
toolchain.h
types.h
►
Globals
•
All
Data Structures
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Macros
Modules
Pages
Loading...
Searching...
No Matches
arc_mpu.h
Go to the documentation of this file.
1
/*
2
* Copyright (c) 2017 Synopsys.
3
*
4
* SPDX-License-Identifier: Apache-2.0
5
*/
6
#ifndef ZEPHYR_INCLUDE_ARCH_ARC_V2_MPU_ARC_MPU_H_
7
#define ZEPHYR_INCLUDE_ARCH_ARC_V2_MPU_ARC_MPU_H_
8
9
10
11
#define AUX_MPU_ATTR_UE 0x008
/* allow user execution */
12
#define AUX_MPU_ATTR_UW 0x010
/* allow user write */
13
#define AUX_MPU_ATTR_UR 0x020
/* allow user read */
14
#define AUX_MPU_ATTR_KE 0x040
/* only allow kernel execution */
15
#define AUX_MPU_ATTR_KW 0x080
/* only allow kernel write */
16
#define AUX_MPU_ATTR_KR 0x100
/* only allow kernel read */
17
#define AUX_MPU_ATTR_S 0x8000
/* secure */
18
#define AUX_MPU_ATTR_N 0x0000
/* normal */
19
20
21
/*
22
* a region is dynamic means it can be split into sub regions.
23
* This attribute is meaningful for ARC MPUv3 which does not support mpu
24
* entry overlap. For ARC MPUv2, this attribute will be ignored as it
25
* supports mpu overlap in hardware.
26
*/
27
#define REGION_DYNAMIC 0x800
/* dynamic flag */
28
29
30
/* Some helper defines for common regions */
31
32
#define REGION_KERNEL_RAM_ATTR \
33
(AUX_MPU_ATTR_KW | AUX_MPU_ATTR_KR)
32
#define REGION_KERNEL_RAM_ATTR \
…
34
35
#define REGION_KERNEL_ROM_ATTR \
36
(AUX_MPU_ATTR_KE | AUX_MPU_ATTR_KR)
35
#define REGION_KERNEL_ROM_ATTR \
…
37
38
#define REGION_RAM_ATTR \
39
(AUX_MPU_ATTR_UW | AUX_MPU_ATTR_UR | \
40
AUX_MPU_ATTR_KW | AUX_MPU_ATTR_KR)
38
#define REGION_RAM_ATTR \
…
41
42
#define REGION_ROM_ATTR \
43
(AUX_MPU_ATTR_UE | AUX_MPU_ATTR_UR | \
44
AUX_MPU_ATTR_KE | AUX_MPU_ATTR_KR)
42
#define REGION_ROM_ATTR \
…
45
46
#define REGION_IO_ATTR \
47
(AUX_MPU_ATTR_UW | AUX_MPU_ATTR_UR | \
48
AUX_MPU_ATTR_KW | AUX_MPU_ATTR_KR)
46
#define REGION_IO_ATTR \
…
49
50
#define REGION_ALL_ATTR \
51
(AUX_MPU_ATTR_UW | AUX_MPU_ATTR_UR | \
52
AUX_MPU_ATTR_KW | AUX_MPU_ATTR_KR | \
53
AUX_MPU_ATTR_KE | AUX_MPU_ATTR_UE)
50
#define REGION_ALL_ATTR \
…
54
55
56
#define REGION_32B 0x200
57
#define REGION_64B 0x201
58
#define REGION_128B 0x202
59
#define REGION_256B 0x203
60
#define REGION_512B 0x400
61
#define REGION_1K 0x401
62
#define REGION_2K 0x402
63
#define REGION_4K 0x403
64
#define REGION_8K 0x600
65
#define REGION_16K 0x601
66
#define REGION_32K 0x602
67
#define REGION_64K 0x603
68
#define REGION_128K 0x800
69
#define REGION_256K 0x801
70
#define REGION_512K 0x802
71
#define REGION_1M 0x803
72
#define REGION_2M 0xA00
73
#define REGION_4M 0xA01
74
#define REGION_8M 0xA02
75
#define REGION_16M 0xA03
76
#define REGION_32M 0xC00
77
#define REGION_64M 0xC01
78
#define REGION_128M 0xC02
79
#define REGION_256M 0xC03
80
#define REGION_512M 0xE00
81
#define REGION_1G 0xE01
82
#define REGION_2G 0xE02
83
#define REGION_4G 0xE03
84
85
/* Region definition data structure */
86
struct
arc_mpu_region
{
87
/* Region Name */
88
const
char
*
name
;
89
/* Region Base Address */
90
uint32_t
base
;
91
uint32_t
size
;
92
/* Region Attributes */
93
uint32_t
attr
;
94
};
86
struct
arc_mpu_region
{
…
};
95
96
#define MPU_REGION_ENTRY(_name, _base, _size, _attr) \
97
{\
98
.name = _name, \
99
.base = _base, \
100
.size = _size, \
101
.attr = _attr, \
102
}
96
#define MPU_REGION_ENTRY(_name, _base, _size, _attr) \
…
103
104
/* MPU configuration data structure */
105
struct
arc_mpu_config
{
106
/* Number of regions */
107
uint32_t
num_regions
;
108
/* Regions */
109
struct
arc_mpu_region
*
mpu_regions
;
110
};
105
struct
arc_mpu_config
{
…
};
111
112
/* Reference to the MPU configuration */
113
extern
struct
arc_mpu_config
mpu_config
;
114
115
#endif
/* _ARC_CORE_MPU_H_ */
mpu_config
struct arc_mpu_config mpu_config
uint32_t
__UINT32_TYPE__ uint32_t
Definition
stdint.h:90
arc_mpu_config
Definition
arc_mpu.h:105
arc_mpu_config::num_regions
uint32_t num_regions
Definition
arc_mpu.h:107
arc_mpu_config::mpu_regions
struct arc_mpu_region * mpu_regions
Definition
arc_mpu.h:109
arc_mpu_region
Definition
arc_mpu.h:86
arc_mpu_region::size
uint32_t size
Definition
arc_mpu.h:91
arc_mpu_region::base
uint32_t base
Definition
arc_mpu.h:90
arc_mpu_region::name
const char * name
Definition
arc_mpu.h:88
arc_mpu_region::attr
uint32_t attr
Definition
arc_mpu.h:93
zephyr
arch
arc
v2
mpu
arc_mpu.h
Generated on Mon Mar 17 2025 00:05:48 for Zephyr API Documentation by
1.12.0