Zephyr Project API 4.1.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#ifndef ZEPHYR_INCLUDE_DT_BINDINGS_MEM_ATTR_ARM_H_
8#define ZEPHYR_INCLUDE_DT_BINDINGS_MEM_ATTR_ARM_H_
9
12
13/*
14 * Architecture specific ARM MPU related attributes.
15 *
16 * This list is to seamlessly support the MPU regions configuration using DT and
17 * the `zephyr,memory-attr` property.
18 *
19 * This is legacy and it should NOT be extended further. If new MPU region
20 * types must be added, these must rely on the generic memory attributes.
21 */
22#define DT_MEM_ARM_MASK DT_MEM_ARCH_ATTR_MASK
23#define DT_MEM_ARM_GET(x) ((x) & DT_MEM_ARM_MASK)
24#define DT_MEM_ARM(x) ((x) << DT_MEM_ARCH_ATTR_SHIFT)
25
26#define ATTR_MPU_RAM BIT(0)
27#define ATTR_MPU_RAM_NOCACHE BIT(1)
28#define ATTR_MPU_FLASH BIT(2)
29#define ATTR_MPU_PPB BIT(3)
30#define ATTR_MPU_IO BIT(4)
31#define ATTR_MPU_EXTMEM BIT(5)
32#define ATTR_MPU_RAM_PXN BIT(6)
33
34#define DT_MEM_ARM_MPU_RAM DT_MEM_ARM(ATTR_MPU_RAM)
35#define DT_MEM_ARM_MPU_RAM_NOCACHE DT_MEM_ARM(ATTR_MPU_RAM_NOCACHE)
36#define DT_MEM_ARM_MPU_FLASH DT_MEM_ARM(ATTR_MPU_FLASH)
37#define DT_MEM_ARM_MPU_PPB DT_MEM_ARM(ATTR_MPU_PPB)
38#define DT_MEM_ARM_MPU_IO DT_MEM_ARM(ATTR_MPU_IO)
39#define DT_MEM_ARM_MPU_EXTMEM DT_MEM_ARM(ATTR_MPU_EXTMEM)
40#define DT_MEM_ARM_MPU_RAM_PXN DT_MEM_ARM(ATTR_MPU_RAM_PXN)
41#define DT_MEM_ARM_MPU_UNKNOWN DT_MEM_ARCH_ATTR_UNKNOWN
42
43#endif /* ZEPHYR_INCLUDE_DT_BINDINGS_MEM_ATTR_ARM_H_ */
Macro utilities.