Zephyr Project API
4.4.99
A Scalable Open Source RTOS
Loading...
Searching...
No Matches
memory-attr-arm.h
Go to the documentation of this file.
1
/*
2
* Copyright (c) 2023 Carlo Caione <ccaione@baylibre.com>
3
* Copyright 2025 Arm Limited and/or its affiliates <open-source-office@arm.com>
4
*
5
* SPDX-License-Identifier: Apache-2.0
6
*/
7
13
14
#ifndef ZEPHYR_INCLUDE_DT_BINDINGS_MEM_ATTR_ARM_H_
15
#define ZEPHYR_INCLUDE_DT_BINDINGS_MEM_ATTR_ARM_H_
16
17
#include <
zephyr/sys/util_macro.h
>
18
#include <
zephyr/dt-bindings/memory-attr/memory-attr.h
>
19
28
29
/*
30
* Architecture specific ARM MPU related attributes.
31
*
32
* This list is to seamlessly support the MPU regions configuration using DT and
33
* the `zephyr,memory-attr` property.
34
*
35
* This is legacy and it should NOT be extended further. If new MPU region
36
* types must be added, these must rely on the generic memory attributes.
37
*/
38
40
#define DT_MEM_ARM_MASK DT_MEM_ARCH_ATTR_MASK
41
#define DT_MEM_ARM(x) ((x) << DT_MEM_ARCH_ATTR_SHIFT)
42
43
#define ATTR_MPU_RAM BIT(0)
44
#define ATTR_MPU_RAM_NOCACHE BIT(1)
45
#define ATTR_MPU_FLASH BIT(2)
46
#define ATTR_MPU_PPB BIT(3)
47
#define ATTR_MPU_IO BIT(4)
48
#define ATTR_MPU_EXTMEM BIT(5)
49
#define ATTR_MPU_RAM_PXN BIT(6)
50
#define ATTR_MPU_DEVICE BIT(7)
51
#define ATTR_MPU_RAM_WT BIT(8)
53
61
#define DT_MEM_ARM_GET(x) ((x) & DT_MEM_ARM_MASK)
62
64
#define DT_MEM_ARM_MPU_RAM DT_MEM_ARM(ATTR_MPU_RAM)
66
#define DT_MEM_ARM_MPU_RAM_NOCACHE DT_MEM_ARM(ATTR_MPU_RAM_NOCACHE)
68
#define DT_MEM_ARM_MPU_FLASH DT_MEM_ARM(ATTR_MPU_FLASH)
70
#define DT_MEM_ARM_MPU_PPB DT_MEM_ARM(ATTR_MPU_PPB)
72
#define DT_MEM_ARM_MPU_IO DT_MEM_ARM(ATTR_MPU_IO)
74
#define DT_MEM_ARM_MPU_EXTMEM DT_MEM_ARM(ATTR_MPU_EXTMEM)
76
#define DT_MEM_ARM_MPU_RAM_PXN DT_MEM_ARM(ATTR_MPU_RAM_PXN)
78
#define DT_MEM_ARM_MPU_DEVICE DT_MEM_ARM(ATTR_MPU_DEVICE)
80
#define DT_MEM_ARM_MPU_RAM_WT DT_MEM_ARM(ATTR_MPU_RAM_WT)
82
#define DT_MEM_ARM_MPU_UNKNOWN DT_MEM_ARCH_ATTR_UNKNOWN
83
85
86
#endif
/* ZEPHYR_INCLUDE_DT_BINDINGS_MEM_ATTR_ARM_H_ */
memory-attr.h
Generic devicetree memory attribute definitions.
util_macro.h
Macro utilities.
include
zephyr
dt-bindings
memory-attr
memory-attr-arm.h
Generated on
for Zephyr Project API by
1.16.1