1 /*
2  * Copyright (c) 2024 Nordic Semiconductor ASA
3  * SPDX-License-Identifier: Apache-2.0
4  */
5 
6 #ifndef ZEPHYR_INCLUDE_DT_BINDINGS_RESERVED_MEMORY_NORDIC_OWNED_MEMORY_H_
7 #define ZEPHYR_INCLUDE_DT_BINDINGS_RESERVED_MEMORY_NORDIC_OWNED_MEMORY_H_
8 
9 #include <zephyr/dt-bindings/dt-util.h>
10 
11 /**
12  * @name Basic memory permission flags.
13  * @{
14  */
15 
16 /** Readable. */
17 #define NRF_PERM_R BIT(0)
18 /** Writable. */
19 #define NRF_PERM_W BIT(1)
20 /** Executable. */
21 #define NRF_PERM_X BIT(2)
22 /** Secure-only. */
23 #define NRF_PERM_S BIT(3)
24 /** Non-secure-callable. */
25 #define NRF_PERM_NSC BIT(4)
26 
27 /**
28  * @}
29  */
30 
31 /**
32  * @name Memory permission flag combinations.
33  * @note NRF_PERM_NSC overrides all other flags, so it is not included here.
34  * @{
35  */
36 
37 #define NRF_PERM_RW   (NRF_PERM_R | NRF_PERM_W)
38 #define NRF_PERM_RX   (NRF_PERM_R | NRF_PERM_X)
39 #define NRF_PERM_RS   (NRF_PERM_R | NRF_PERM_S)
40 #define NRF_PERM_WX   (NRF_PERM_W | NRF_PERM_X)
41 #define NRF_PERM_WS   (NRF_PERM_W | NRF_PERM_S)
42 #define NRF_PERM_XS   (NRF_PERM_X | NRF_PERM_S)
43 #define NRF_PERM_RWX  (NRF_PERM_R | NRF_PERM_W | NRF_PERM_X)
44 #define NRF_PERM_RWS  (NRF_PERM_R | NRF_PERM_W | NRF_PERM_S)
45 #define NRF_PERM_RXS  (NRF_PERM_R | NRF_PERM_X | NRF_PERM_S)
46 #define NRF_PERM_WXS  (NRF_PERM_W | NRF_PERM_X | NRF_PERM_S)
47 #define NRF_PERM_RWXS (NRF_PERM_R | NRF_PERM_W | NRF_PERM_X | NRF_PERM_S)
48 
49 /**
50  * @}
51  */
52 
53 #endif /* ZEPHYR_INCLUDE_DT_BINDINGS_RESERVED_MEMORY_NORDIC_OWNED_MEMORY_H_ */
54