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
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
►
posix
►
riscv
►
rx
►
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
►
mem_mgmt
►
mgmt
►
misc
►
modbus
►
modem
►
multi_heap
►
net
►
platform
►
pm
►
pmci
►
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_core_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_CORE_MPU_H_
7
#define ZEPHYR_INCLUDE_ARCH_ARC_V2_MPU_ARC_CORE_MPU_H_
8
9
#ifdef __cplusplus
10
extern
"C"
{
11
#endif
12
13
/*
14
* The defines below represent the region types. The MPU driver is responsible
15
* to allocate the region accordingly to the type and set the correct
16
* attributes.
17
*
18
* Each MPU is different and has a different set of attributes, hence instead
19
* of having the attributes at this level the arc_mpu_core defines the intent
20
* types.
21
* An intent type (i.e. THREAD_STACK_GUARD) can correspond to a different set
22
* of operations and attributes for each MPU and it is responsibility of the
23
* MPU driver to select the correct ones.
24
*
25
* The intent based configuration can't fail hence at this level no error
26
* is returned by the configuration functions.
27
* If one of the operations corresponding to an intent fails the error has to
28
* be managed inside the MPU driver and not escalated.
29
*/
30
/* Thread Region Intent Type */
31
#define THREAD_STACK_USER_REGION 0x0
32
#define THREAD_STACK_REGION 0x1
33
#define THREAD_APP_DATA_REGION 0x2
34
#define THREAD_STACK_GUARD_REGION 0x3
35
#define THREAD_DOMAIN_PARTITION_REGION 0x4
36
37
#if defined(CONFIG_ARC_CORE_MPU)
38
/* ARC Core MPU Driver API */
39
40
/*
41
* This API has to be implemented by all the MPU drivers that have
42
* ARC_CORE_MPU support.
43
*/
44
48
void
arc_core_mpu_enable(
void
);
49
53
void
arc_core_mpu_disable(
void
);
54
60
void
arc_core_mpu_configure_thread(
struct
k_thread
*thread);
61
62
/*
63
* Before configure the MPU regions, MPU should be disabled
64
*/
70
void
arc_core_mpu_default(
uint32_t
region_attr);
71
80
int
arc_core_mpu_region(
uint32_t
index,
uint32_t
base,
uint32_t
size,
81
uint32_t
region_attr);
82
83
#endif
/* CONFIG_ARC_CORE_MPU */
84
85
#if defined(CONFIG_USERSPACE)
86
void
arc_core_mpu_configure_mem_domain
(
struct
k_thread
*thread);
87
void
arc_core_mpu_remove_mem_domain
(
struct
k_mem_domain
*mem_domain);
88
void
arc_core_mpu_remove_mem_partition
(
struct
k_mem_domain
*domain,
89
uint32_t
partition_id);
90
int
arc_core_mpu_get_max_domain_partition_regions
(
void
);
91
int
arc_core_mpu_buffer_validate
(
const
void
*addr,
size_t
size,
int
write);
92
93
#endif
94
95
void
configure_mpu_thread
(
struct
k_thread
*thread);
96
97
#ifdef __cplusplus
98
}
99
#endif
100
101
#endif
/* ZEPHYR_INCLUDE_ARCH_ARC_V2_MPU_ARC_CORE_MPU_H_ */
arc_core_mpu_remove_mem_partition
void arc_core_mpu_remove_mem_partition(struct k_mem_domain *domain, uint32_t partition_id)
configure_mpu_thread
void configure_mpu_thread(struct k_thread *thread)
arc_core_mpu_configure_mem_domain
void arc_core_mpu_configure_mem_domain(struct k_thread *thread)
arc_core_mpu_remove_mem_domain
void arc_core_mpu_remove_mem_domain(struct k_mem_domain *mem_domain)
arc_core_mpu_buffer_validate
int arc_core_mpu_buffer_validate(const void *addr, size_t size, int write)
arc_core_mpu_get_max_domain_partition_regions
int arc_core_mpu_get_max_domain_partition_regions(void)
uint32_t
__UINT32_TYPE__ uint32_t
Definition
stdint.h:90
k_mem_domain
Memory Domain.
Definition
mem_domain.h:80
k_thread
Thread Structure.
Definition
thread.h:262
zephyr
arch
arc
v2
mpu
arc_core_mpu.h
Generated on Sat May 17 2025 06:05:55 for Zephyr API Documentation by
1.12.0