The official Mbed 2 C/C++ SDK provides the software platform and libraries to build your applications.
Dependents: hello SerialTestv11 SerialTestv12 Sierpinski ... more
mbed 2
This is the mbed 2 library. If you'd like to learn about Mbed OS please see the mbed-os docs.
TARGET_NUCLEO_F446RE/core_ca_mmu.h@106:ba1f97679dad, 2015-09-02 (annotated)
- Committer:
- Kojto
- Date:
- Wed Sep 02 14:17:43 2015 +0100
- Revision:
- 106:ba1f97679dad
- Child:
- 108:34e6b704fe68
Release 106 of the mbed library
Changes:
- new platform - Nucleo F446RE
- STM32F4 Cube driver update v2.3.2
- ST cmsis driver v2.3.2
- nordic bugfix gcc linker start address
- lpc11u68 - bugfix for serial ports
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
Kojto | 106:ba1f97679dad | 1 | ;/**************************************************************************//** |
Kojto | 106:ba1f97679dad | 2 | ; * @file core_ca_mmu.h |
Kojto | 106:ba1f97679dad | 3 | ; * @brief MMU Startup File for |
Kojto | 106:ba1f97679dad | 4 | ; * VE_A9_MP Device Series |
Kojto | 106:ba1f97679dad | 5 | ; * @version V1.01 |
Kojto | 106:ba1f97679dad | 6 | ; * @date 25 March 2013 |
Kojto | 106:ba1f97679dad | 7 | ; * |
Kojto | 106:ba1f97679dad | 8 | ; * @note |
Kojto | 106:ba1f97679dad | 9 | ; * |
Kojto | 106:ba1f97679dad | 10 | ; ******************************************************************************/ |
Kojto | 106:ba1f97679dad | 11 | ;/* Copyright (c) 2012 ARM LIMITED |
Kojto | 106:ba1f97679dad | 12 | ; |
Kojto | 106:ba1f97679dad | 13 | ; All rights reserved. |
Kojto | 106:ba1f97679dad | 14 | ; Redistribution and use in source and binary forms, with or without |
Kojto | 106:ba1f97679dad | 15 | ; modification, are permitted provided that the following conditions are met: |
Kojto | 106:ba1f97679dad | 16 | ; - Redistributions of source code must retain the above copyright |
Kojto | 106:ba1f97679dad | 17 | ; notice, this list of conditions and the following disclaimer. |
Kojto | 106:ba1f97679dad | 18 | ; - Redistributions in binary form must reproduce the above copyright |
Kojto | 106:ba1f97679dad | 19 | ; notice, this list of conditions and the following disclaimer in the |
Kojto | 106:ba1f97679dad | 20 | ; documentation and/or other materials provided with the distribution. |
Kojto | 106:ba1f97679dad | 21 | ; - Neither the name of ARM nor the names of its contributors may be used |
Kojto | 106:ba1f97679dad | 22 | ; to endorse or promote products derived from this software without |
Kojto | 106:ba1f97679dad | 23 | ; specific prior written permission. |
Kojto | 106:ba1f97679dad | 24 | ; * |
Kojto | 106:ba1f97679dad | 25 | ; THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" |
Kojto | 106:ba1f97679dad | 26 | ; AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE |
Kojto | 106:ba1f97679dad | 27 | ; IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE |
Kojto | 106:ba1f97679dad | 28 | ; ARE DISCLAIMED. IN NO EVENT SHALL COPYRIGHT HOLDERS AND CONTRIBUTORS BE |
Kojto | 106:ba1f97679dad | 29 | ; LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR |
Kojto | 106:ba1f97679dad | 30 | ; CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF |
Kojto | 106:ba1f97679dad | 31 | ; SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS |
Kojto | 106:ba1f97679dad | 32 | ; INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN |
Kojto | 106:ba1f97679dad | 33 | ; CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) |
Kojto | 106:ba1f97679dad | 34 | ; ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE |
Kojto | 106:ba1f97679dad | 35 | ; POSSIBILITY OF SUCH DAMAGE. |
Kojto | 106:ba1f97679dad | 36 | ; ---------------------------------------------------------------------------*/ |
Kojto | 106:ba1f97679dad | 37 | |
Kojto | 106:ba1f97679dad | 38 | #ifdef __cplusplus |
Kojto | 106:ba1f97679dad | 39 | extern "C" { |
Kojto | 106:ba1f97679dad | 40 | #endif |
Kojto | 106:ba1f97679dad | 41 | |
Kojto | 106:ba1f97679dad | 42 | #ifndef _MMU_FUNC_H |
Kojto | 106:ba1f97679dad | 43 | #define _MMU_FUNC_H |
Kojto | 106:ba1f97679dad | 44 | |
Kojto | 106:ba1f97679dad | 45 | #define SECTION_DESCRIPTOR (0x2) |
Kojto | 106:ba1f97679dad | 46 | #define SECTION_MASK (0xFFFFFFFC) |
Kojto | 106:ba1f97679dad | 47 | |
Kojto | 106:ba1f97679dad | 48 | #define SECTION_TEXCB_MASK (0xFFFF8FF3) |
Kojto | 106:ba1f97679dad | 49 | #define SECTION_B_SHIFT (2) |
Kojto | 106:ba1f97679dad | 50 | #define SECTION_C_SHIFT (3) |
Kojto | 106:ba1f97679dad | 51 | #define SECTION_TEX0_SHIFT (12) |
Kojto | 106:ba1f97679dad | 52 | #define SECTION_TEX1_SHIFT (13) |
Kojto | 106:ba1f97679dad | 53 | #define SECTION_TEX2_SHIFT (14) |
Kojto | 106:ba1f97679dad | 54 | |
Kojto | 106:ba1f97679dad | 55 | #define SECTION_XN_MASK (0xFFFFFFEF) |
Kojto | 106:ba1f97679dad | 56 | #define SECTION_XN_SHIFT (4) |
Kojto | 106:ba1f97679dad | 57 | |
Kojto | 106:ba1f97679dad | 58 | #define SECTION_DOMAIN_MASK (0xFFFFFE1F) |
Kojto | 106:ba1f97679dad | 59 | #define SECTION_DOMAIN_SHIFT (5) |
Kojto | 106:ba1f97679dad | 60 | |
Kojto | 106:ba1f97679dad | 61 | #define SECTION_P_MASK (0xFFFFFDFF) |
Kojto | 106:ba1f97679dad | 62 | #define SECTION_P_SHIFT (9) |
Kojto | 106:ba1f97679dad | 63 | |
Kojto | 106:ba1f97679dad | 64 | #define SECTION_AP_MASK (0xFFFF73FF) |
Kojto | 106:ba1f97679dad | 65 | #define SECTION_AP_SHIFT (10) |
Kojto | 106:ba1f97679dad | 66 | #define SECTION_AP2_SHIFT (15) |
Kojto | 106:ba1f97679dad | 67 | |
Kojto | 106:ba1f97679dad | 68 | #define SECTION_S_MASK (0xFFFEFFFF) |
Kojto | 106:ba1f97679dad | 69 | #define SECTION_S_SHIFT (16) |
Kojto | 106:ba1f97679dad | 70 | |
Kojto | 106:ba1f97679dad | 71 | #define SECTION_NG_MASK (0xFFFDFFFF) |
Kojto | 106:ba1f97679dad | 72 | #define SECTION_NG_SHIFT (17) |
Kojto | 106:ba1f97679dad | 73 | |
Kojto | 106:ba1f97679dad | 74 | #define SECTION_NS_MASK (0xFFF7FFFF) |
Kojto | 106:ba1f97679dad | 75 | #define SECTION_NS_SHIFT (19) |
Kojto | 106:ba1f97679dad | 76 | |
Kojto | 106:ba1f97679dad | 77 | |
Kojto | 106:ba1f97679dad | 78 | #define PAGE_L1_DESCRIPTOR (0x1) |
Kojto | 106:ba1f97679dad | 79 | #define PAGE_L1_MASK (0xFFFFFFFC) |
Kojto | 106:ba1f97679dad | 80 | |
Kojto | 106:ba1f97679dad | 81 | #define PAGE_L2_4K_DESC (0x2) |
Kojto | 106:ba1f97679dad | 82 | #define PAGE_L2_4K_MASK (0xFFFFFFFD) |
Kojto | 106:ba1f97679dad | 83 | |
Kojto | 106:ba1f97679dad | 84 | #define PAGE_L2_64K_DESC (0x1) |
Kojto | 106:ba1f97679dad | 85 | #define PAGE_L2_64K_MASK (0xFFFFFFFC) |
Kojto | 106:ba1f97679dad | 86 | |
Kojto | 106:ba1f97679dad | 87 | #define PAGE_4K_TEXCB_MASK (0xFFFFFE33) |
Kojto | 106:ba1f97679dad | 88 | #define PAGE_4K_B_SHIFT (2) |
Kojto | 106:ba1f97679dad | 89 | #define PAGE_4K_C_SHIFT (3) |
Kojto | 106:ba1f97679dad | 90 | #define PAGE_4K_TEX0_SHIFT (6) |
Kojto | 106:ba1f97679dad | 91 | #define PAGE_4K_TEX1_SHIFT (7) |
Kojto | 106:ba1f97679dad | 92 | #define PAGE_4K_TEX2_SHIFT (8) |
Kojto | 106:ba1f97679dad | 93 | |
Kojto | 106:ba1f97679dad | 94 | #define PAGE_64K_TEXCB_MASK (0xFFFF8FF3) |
Kojto | 106:ba1f97679dad | 95 | #define PAGE_64K_B_SHIFT (2) |
Kojto | 106:ba1f97679dad | 96 | #define PAGE_64K_C_SHIFT (3) |
Kojto | 106:ba1f97679dad | 97 | #define PAGE_64K_TEX0_SHIFT (12) |
Kojto | 106:ba1f97679dad | 98 | #define PAGE_64K_TEX1_SHIFT (13) |
Kojto | 106:ba1f97679dad | 99 | #define PAGE_64K_TEX2_SHIFT (14) |
Kojto | 106:ba1f97679dad | 100 | |
Kojto | 106:ba1f97679dad | 101 | #define PAGE_TEXCB_MASK (0xFFFF8FF3) |
Kojto | 106:ba1f97679dad | 102 | #define PAGE_B_SHIFT (2) |
Kojto | 106:ba1f97679dad | 103 | #define PAGE_C_SHIFT (3) |
Kojto | 106:ba1f97679dad | 104 | #define PAGE_TEX_SHIFT (12) |
Kojto | 106:ba1f97679dad | 105 | |
Kojto | 106:ba1f97679dad | 106 | #define PAGE_XN_4K_MASK (0xFFFFFFFE) |
Kojto | 106:ba1f97679dad | 107 | #define PAGE_XN_4K_SHIFT (0) |
Kojto | 106:ba1f97679dad | 108 | #define PAGE_XN_64K_MASK (0xFFFF7FFF) |
Kojto | 106:ba1f97679dad | 109 | #define PAGE_XN_64K_SHIFT (15) |
Kojto | 106:ba1f97679dad | 110 | |
Kojto | 106:ba1f97679dad | 111 | |
Kojto | 106:ba1f97679dad | 112 | #define PAGE_DOMAIN_MASK (0xFFFFFE1F) |
Kojto | 106:ba1f97679dad | 113 | #define PAGE_DOMAIN_SHIFT (5) |
Kojto | 106:ba1f97679dad | 114 | |
Kojto | 106:ba1f97679dad | 115 | #define PAGE_P_MASK (0xFFFFFDFF) |
Kojto | 106:ba1f97679dad | 116 | #define PAGE_P_SHIFT (9) |
Kojto | 106:ba1f97679dad | 117 | |
Kojto | 106:ba1f97679dad | 118 | #define PAGE_AP_MASK (0xFFFFFDCF) |
Kojto | 106:ba1f97679dad | 119 | #define PAGE_AP_SHIFT (4) |
Kojto | 106:ba1f97679dad | 120 | #define PAGE_AP2_SHIFT (9) |
Kojto | 106:ba1f97679dad | 121 | |
Kojto | 106:ba1f97679dad | 122 | #define PAGE_S_MASK (0xFFFFFBFF) |
Kojto | 106:ba1f97679dad | 123 | #define PAGE_S_SHIFT (10) |
Kojto | 106:ba1f97679dad | 124 | |
Kojto | 106:ba1f97679dad | 125 | #define PAGE_NG_MASK (0xFFFFF7FF) |
Kojto | 106:ba1f97679dad | 126 | #define PAGE_NG_SHIFT (11) |
Kojto | 106:ba1f97679dad | 127 | |
Kojto | 106:ba1f97679dad | 128 | #define PAGE_NS_MASK (0xFFFFFFF7) |
Kojto | 106:ba1f97679dad | 129 | #define PAGE_NS_SHIFT (3) |
Kojto | 106:ba1f97679dad | 130 | |
Kojto | 106:ba1f97679dad | 131 | #define OFFSET_1M (0x00100000) |
Kojto | 106:ba1f97679dad | 132 | #define OFFSET_64K (0x00010000) |
Kojto | 106:ba1f97679dad | 133 | #define OFFSET_4K (0x00001000) |
Kojto | 106:ba1f97679dad | 134 | |
Kojto | 106:ba1f97679dad | 135 | #define DESCRIPTOR_FAULT (0x00000000) |
Kojto | 106:ba1f97679dad | 136 | |
Kojto | 106:ba1f97679dad | 137 | /* ########################### MMU Function Access ########################### */ |
Kojto | 106:ba1f97679dad | 138 | /** \ingroup MMU_FunctionInterface |
Kojto | 106:ba1f97679dad | 139 | \defgroup MMU_Functions MMU Functions Interface |
Kojto | 106:ba1f97679dad | 140 | @{ |
Kojto | 106:ba1f97679dad | 141 | */ |
Kojto | 106:ba1f97679dad | 142 | |
Kojto | 106:ba1f97679dad | 143 | /* Attributes enumerations */ |
Kojto | 106:ba1f97679dad | 144 | |
Kojto | 106:ba1f97679dad | 145 | /* Region size attributes */ |
Kojto | 106:ba1f97679dad | 146 | typedef enum |
Kojto | 106:ba1f97679dad | 147 | { |
Kojto | 106:ba1f97679dad | 148 | SECTION, |
Kojto | 106:ba1f97679dad | 149 | PAGE_4k, |
Kojto | 106:ba1f97679dad | 150 | PAGE_64k, |
Kojto | 106:ba1f97679dad | 151 | } mmu_region_size_Type; |
Kojto | 106:ba1f97679dad | 152 | |
Kojto | 106:ba1f97679dad | 153 | /* Region type attributes */ |
Kojto | 106:ba1f97679dad | 154 | typedef enum |
Kojto | 106:ba1f97679dad | 155 | { |
Kojto | 106:ba1f97679dad | 156 | NORMAL, |
Kojto | 106:ba1f97679dad | 157 | DEVICE, |
Kojto | 106:ba1f97679dad | 158 | SHARED_DEVICE, |
Kojto | 106:ba1f97679dad | 159 | NON_SHARED_DEVICE, |
Kojto | 106:ba1f97679dad | 160 | STRONGLY_ORDERED |
Kojto | 106:ba1f97679dad | 161 | } mmu_memory_Type; |
Kojto | 106:ba1f97679dad | 162 | |
Kojto | 106:ba1f97679dad | 163 | /* Region cacheability attributes */ |
Kojto | 106:ba1f97679dad | 164 | typedef enum |
Kojto | 106:ba1f97679dad | 165 | { |
Kojto | 106:ba1f97679dad | 166 | NON_CACHEABLE, |
Kojto | 106:ba1f97679dad | 167 | WB_WA, |
Kojto | 106:ba1f97679dad | 168 | WT, |
Kojto | 106:ba1f97679dad | 169 | WB_NO_WA, |
Kojto | 106:ba1f97679dad | 170 | } mmu_cacheability_Type; |
Kojto | 106:ba1f97679dad | 171 | |
Kojto | 106:ba1f97679dad | 172 | /* Region parity check attributes */ |
Kojto | 106:ba1f97679dad | 173 | typedef enum |
Kojto | 106:ba1f97679dad | 174 | { |
Kojto | 106:ba1f97679dad | 175 | ECC_DISABLED, |
Kojto | 106:ba1f97679dad | 176 | ECC_ENABLED, |
Kojto | 106:ba1f97679dad | 177 | } mmu_ecc_check_Type; |
Kojto | 106:ba1f97679dad | 178 | |
Kojto | 106:ba1f97679dad | 179 | /* Region execution attributes */ |
Kojto | 106:ba1f97679dad | 180 | typedef enum |
Kojto | 106:ba1f97679dad | 181 | { |
Kojto | 106:ba1f97679dad | 182 | EXECUTE, |
Kojto | 106:ba1f97679dad | 183 | NON_EXECUTE, |
Kojto | 106:ba1f97679dad | 184 | } mmu_execute_Type; |
Kojto | 106:ba1f97679dad | 185 | |
Kojto | 106:ba1f97679dad | 186 | /* Region global attributes */ |
Kojto | 106:ba1f97679dad | 187 | typedef enum |
Kojto | 106:ba1f97679dad | 188 | { |
Kojto | 106:ba1f97679dad | 189 | GLOBAL, |
Kojto | 106:ba1f97679dad | 190 | NON_GLOBAL, |
Kojto | 106:ba1f97679dad | 191 | } mmu_global_Type; |
Kojto | 106:ba1f97679dad | 192 | |
Kojto | 106:ba1f97679dad | 193 | /* Region shareability attributes */ |
Kojto | 106:ba1f97679dad | 194 | typedef enum |
Kojto | 106:ba1f97679dad | 195 | { |
Kojto | 106:ba1f97679dad | 196 | NON_SHARED, |
Kojto | 106:ba1f97679dad | 197 | SHARED, |
Kojto | 106:ba1f97679dad | 198 | } mmu_shared_Type; |
Kojto | 106:ba1f97679dad | 199 | |
Kojto | 106:ba1f97679dad | 200 | /* Region security attributes */ |
Kojto | 106:ba1f97679dad | 201 | typedef enum |
Kojto | 106:ba1f97679dad | 202 | { |
Kojto | 106:ba1f97679dad | 203 | SECURE, |
Kojto | 106:ba1f97679dad | 204 | NON_SECURE, |
Kojto | 106:ba1f97679dad | 205 | } mmu_secure_Type; |
Kojto | 106:ba1f97679dad | 206 | |
Kojto | 106:ba1f97679dad | 207 | /* Region access attributes */ |
Kojto | 106:ba1f97679dad | 208 | typedef enum |
Kojto | 106:ba1f97679dad | 209 | { |
Kojto | 106:ba1f97679dad | 210 | NO_ACCESS, |
Kojto | 106:ba1f97679dad | 211 | RW, |
Kojto | 106:ba1f97679dad | 212 | READ, |
Kojto | 106:ba1f97679dad | 213 | } mmu_access_Type; |
Kojto | 106:ba1f97679dad | 214 | |
Kojto | 106:ba1f97679dad | 215 | /* Memory Region definition */ |
Kojto | 106:ba1f97679dad | 216 | typedef struct RegionStruct { |
Kojto | 106:ba1f97679dad | 217 | mmu_region_size_Type rg_t; |
Kojto | 106:ba1f97679dad | 218 | mmu_memory_Type mem_t; |
Kojto | 106:ba1f97679dad | 219 | uint8_t domain; |
Kojto | 106:ba1f97679dad | 220 | mmu_cacheability_Type inner_norm_t; |
Kojto | 106:ba1f97679dad | 221 | mmu_cacheability_Type outer_norm_t; |
Kojto | 106:ba1f97679dad | 222 | mmu_ecc_check_Type e_t; |
Kojto | 106:ba1f97679dad | 223 | mmu_execute_Type xn_t; |
Kojto | 106:ba1f97679dad | 224 | mmu_global_Type g_t; |
Kojto | 106:ba1f97679dad | 225 | mmu_secure_Type sec_t; |
Kojto | 106:ba1f97679dad | 226 | mmu_access_Type priv_t; |
Kojto | 106:ba1f97679dad | 227 | mmu_access_Type user_t; |
Kojto | 106:ba1f97679dad | 228 | mmu_shared_Type sh_t; |
Kojto | 106:ba1f97679dad | 229 | |
Kojto | 106:ba1f97679dad | 230 | } mmu_region_attributes_Type; |
Kojto | 106:ba1f97679dad | 231 | |
Kojto | 106:ba1f97679dad | 232 | /** \brief Set section execution-never attribute |
Kojto | 106:ba1f97679dad | 233 | |
Kojto | 106:ba1f97679dad | 234 | The function sets section execution-never attribute |
Kojto | 106:ba1f97679dad | 235 | |
Kojto | 106:ba1f97679dad | 236 | \param [out] descriptor_l1 L1 descriptor. |
Kojto | 106:ba1f97679dad | 237 | \param [in] xn Section execution-never attribute : EXECUTE , NON_EXECUTE. |
Kojto | 106:ba1f97679dad | 238 | |
Kojto | 106:ba1f97679dad | 239 | \return 0 |
Kojto | 106:ba1f97679dad | 240 | */ |
Kojto | 106:ba1f97679dad | 241 | __STATIC_INLINE int __xn_section(uint32_t *descriptor_l1, mmu_execute_Type xn) |
Kojto | 106:ba1f97679dad | 242 | { |
Kojto | 106:ba1f97679dad | 243 | *descriptor_l1 &= SECTION_XN_MASK; |
Kojto | 106:ba1f97679dad | 244 | *descriptor_l1 |= ((xn & 0x1) << SECTION_XN_SHIFT); |
Kojto | 106:ba1f97679dad | 245 | return 0; |
Kojto | 106:ba1f97679dad | 246 | } |
Kojto | 106:ba1f97679dad | 247 | |
Kojto | 106:ba1f97679dad | 248 | /** \brief Set section domain |
Kojto | 106:ba1f97679dad | 249 | |
Kojto | 106:ba1f97679dad | 250 | The function sets section domain |
Kojto | 106:ba1f97679dad | 251 | |
Kojto | 106:ba1f97679dad | 252 | \param [out] descriptor_l1 L1 descriptor. |
Kojto | 106:ba1f97679dad | 253 | \param [in] domain Section domain |
Kojto | 106:ba1f97679dad | 254 | |
Kojto | 106:ba1f97679dad | 255 | \return 0 |
Kojto | 106:ba1f97679dad | 256 | */ |
Kojto | 106:ba1f97679dad | 257 | __STATIC_INLINE int __domain_section(uint32_t *descriptor_l1, uint8_t domain) |
Kojto | 106:ba1f97679dad | 258 | { |
Kojto | 106:ba1f97679dad | 259 | *descriptor_l1 &= SECTION_DOMAIN_MASK; |
Kojto | 106:ba1f97679dad | 260 | *descriptor_l1 |= ((domain & 0xF) << SECTION_DOMAIN_SHIFT); |
Kojto | 106:ba1f97679dad | 261 | return 0; |
Kojto | 106:ba1f97679dad | 262 | } |
Kojto | 106:ba1f97679dad | 263 | |
Kojto | 106:ba1f97679dad | 264 | /** \brief Set section parity check |
Kojto | 106:ba1f97679dad | 265 | |
Kojto | 106:ba1f97679dad | 266 | The function sets section parity check |
Kojto | 106:ba1f97679dad | 267 | |
Kojto | 106:ba1f97679dad | 268 | \param [out] descriptor_l1 L1 descriptor. |
Kojto | 106:ba1f97679dad | 269 | \param [in] p_bit Parity check: ECC_DISABLED, ECC_ENABLED |
Kojto | 106:ba1f97679dad | 270 | |
Kojto | 106:ba1f97679dad | 271 | \return 0 |
Kojto | 106:ba1f97679dad | 272 | */ |
Kojto | 106:ba1f97679dad | 273 | __STATIC_INLINE int __p_section(uint32_t *descriptor_l1, mmu_ecc_check_Type p_bit) |
Kojto | 106:ba1f97679dad | 274 | { |
Kojto | 106:ba1f97679dad | 275 | *descriptor_l1 &= SECTION_P_MASK; |
Kojto | 106:ba1f97679dad | 276 | *descriptor_l1 |= ((p_bit & 0x1) << SECTION_P_SHIFT); |
Kojto | 106:ba1f97679dad | 277 | return 0; |
Kojto | 106:ba1f97679dad | 278 | } |
Kojto | 106:ba1f97679dad | 279 | |
Kojto | 106:ba1f97679dad | 280 | /** \brief Set section access privileges |
Kojto | 106:ba1f97679dad | 281 | |
Kojto | 106:ba1f97679dad | 282 | The function sets section access privileges |
Kojto | 106:ba1f97679dad | 283 | |
Kojto | 106:ba1f97679dad | 284 | \param [out] descriptor_l1 L1 descriptor. |
Kojto | 106:ba1f97679dad | 285 | \param [in] user User Level Access: NO_ACCESS, RW, READ |
Kojto | 106:ba1f97679dad | 286 | \param [in] priv Privilege Level Access: NO_ACCESS, RW, READ |
Kojto | 106:ba1f97679dad | 287 | \param [in] afe Access flag enable |
Kojto | 106:ba1f97679dad | 288 | |
Kojto | 106:ba1f97679dad | 289 | \return 0 |
Kojto | 106:ba1f97679dad | 290 | */ |
Kojto | 106:ba1f97679dad | 291 | __STATIC_INLINE int __ap_section(uint32_t *descriptor_l1, mmu_access_Type user, mmu_access_Type priv, uint32_t afe) |
Kojto | 106:ba1f97679dad | 292 | { |
Kojto | 106:ba1f97679dad | 293 | uint32_t ap = 0; |
Kojto | 106:ba1f97679dad | 294 | |
Kojto | 106:ba1f97679dad | 295 | if (afe == 0) { //full access |
Kojto | 106:ba1f97679dad | 296 | if ((priv == NO_ACCESS) && (user == NO_ACCESS)) { ap = 0x0; } |
Kojto | 106:ba1f97679dad | 297 | else if ((priv == RW) && (user == NO_ACCESS)) { ap = 0x1; } |
Kojto | 106:ba1f97679dad | 298 | else if ((priv == RW) && (user == READ)) { ap = 0x2; } |
Kojto | 106:ba1f97679dad | 299 | else if ((priv == RW) && (user == RW)) { ap = 0x3; } |
Kojto | 106:ba1f97679dad | 300 | else if ((priv == READ) && (user == NO_ACCESS)) { ap = 0x5; } |
Kojto | 106:ba1f97679dad | 301 | else if ((priv == READ) && (user == READ)) { ap = 0x6; } |
Kojto | 106:ba1f97679dad | 302 | } |
Kojto | 106:ba1f97679dad | 303 | |
Kojto | 106:ba1f97679dad | 304 | else { //Simplified access |
Kojto | 106:ba1f97679dad | 305 | if ((priv == RW) && (user == NO_ACCESS)) { ap = 0x1; } |
Kojto | 106:ba1f97679dad | 306 | else if ((priv == RW) && (user == RW)) { ap = 0x3; } |
Kojto | 106:ba1f97679dad | 307 | else if ((priv == READ) && (user == NO_ACCESS)) { ap = 0x5; } |
Kojto | 106:ba1f97679dad | 308 | else if ((priv == READ) && (user == READ)) { ap = 0x7; } |
Kojto | 106:ba1f97679dad | 309 | } |
Kojto | 106:ba1f97679dad | 310 | |
Kojto | 106:ba1f97679dad | 311 | *descriptor_l1 &= SECTION_AP_MASK; |
Kojto | 106:ba1f97679dad | 312 | *descriptor_l1 |= (ap & 0x3) << SECTION_AP_SHIFT; |
Kojto | 106:ba1f97679dad | 313 | *descriptor_l1 |= ((ap & 0x4)>>2) << SECTION_AP2_SHIFT; |
Kojto | 106:ba1f97679dad | 314 | |
Kojto | 106:ba1f97679dad | 315 | return 0; |
Kojto | 106:ba1f97679dad | 316 | } |
Kojto | 106:ba1f97679dad | 317 | |
Kojto | 106:ba1f97679dad | 318 | /** \brief Set section shareability |
Kojto | 106:ba1f97679dad | 319 | |
Kojto | 106:ba1f97679dad | 320 | The function sets section shareability |
Kojto | 106:ba1f97679dad | 321 | |
Kojto | 106:ba1f97679dad | 322 | \param [out] descriptor_l1 L1 descriptor. |
Kojto | 106:ba1f97679dad | 323 | \param [in] s_bit Section shareability: NON_SHARED, SHARED |
Kojto | 106:ba1f97679dad | 324 | |
Kojto | 106:ba1f97679dad | 325 | \return 0 |
Kojto | 106:ba1f97679dad | 326 | */ |
Kojto | 106:ba1f97679dad | 327 | __STATIC_INLINE int __shared_section(uint32_t *descriptor_l1, mmu_shared_Type s_bit) |
Kojto | 106:ba1f97679dad | 328 | { |
Kojto | 106:ba1f97679dad | 329 | *descriptor_l1 &= SECTION_S_MASK; |
Kojto | 106:ba1f97679dad | 330 | *descriptor_l1 |= ((s_bit & 0x1) << SECTION_S_SHIFT); |
Kojto | 106:ba1f97679dad | 331 | return 0; |
Kojto | 106:ba1f97679dad | 332 | } |
Kojto | 106:ba1f97679dad | 333 | |
Kojto | 106:ba1f97679dad | 334 | /** \brief Set section Global attribute |
Kojto | 106:ba1f97679dad | 335 | |
Kojto | 106:ba1f97679dad | 336 | The function sets section Global attribute |
Kojto | 106:ba1f97679dad | 337 | |
Kojto | 106:ba1f97679dad | 338 | \param [out] descriptor_l1 L1 descriptor. |
Kojto | 106:ba1f97679dad | 339 | \param [in] g_bit Section attribute: GLOBAL, NON_GLOBAL |
Kojto | 106:ba1f97679dad | 340 | |
Kojto | 106:ba1f97679dad | 341 | \return 0 |
Kojto | 106:ba1f97679dad | 342 | */ |
Kojto | 106:ba1f97679dad | 343 | __STATIC_INLINE int __global_section(uint32_t *descriptor_l1, mmu_global_Type g_bit) |
Kojto | 106:ba1f97679dad | 344 | { |
Kojto | 106:ba1f97679dad | 345 | *descriptor_l1 &= SECTION_NG_MASK; |
Kojto | 106:ba1f97679dad | 346 | *descriptor_l1 |= ((g_bit & 0x1) << SECTION_NG_SHIFT); |
Kojto | 106:ba1f97679dad | 347 | return 0; |
Kojto | 106:ba1f97679dad | 348 | } |
Kojto | 106:ba1f97679dad | 349 | |
Kojto | 106:ba1f97679dad | 350 | /** \brief Set section Security attribute |
Kojto | 106:ba1f97679dad | 351 | |
Kojto | 106:ba1f97679dad | 352 | The function sets section Global attribute |
Kojto | 106:ba1f97679dad | 353 | |
Kojto | 106:ba1f97679dad | 354 | \param [out] descriptor_l1 L1 descriptor. |
Kojto | 106:ba1f97679dad | 355 | \param [in] s_bit Section Security attribute: SECURE, NON_SECURE |
Kojto | 106:ba1f97679dad | 356 | |
Kojto | 106:ba1f97679dad | 357 | \return 0 |
Kojto | 106:ba1f97679dad | 358 | */ |
Kojto | 106:ba1f97679dad | 359 | __STATIC_INLINE int __secure_section(uint32_t *descriptor_l1, mmu_secure_Type s_bit) |
Kojto | 106:ba1f97679dad | 360 | { |
Kojto | 106:ba1f97679dad | 361 | *descriptor_l1 &= SECTION_NS_MASK; |
Kojto | 106:ba1f97679dad | 362 | *descriptor_l1 |= ((s_bit & 0x1) << SECTION_NS_SHIFT); |
Kojto | 106:ba1f97679dad | 363 | return 0; |
Kojto | 106:ba1f97679dad | 364 | } |
Kojto | 106:ba1f97679dad | 365 | |
Kojto | 106:ba1f97679dad | 366 | /* Page 4k or 64k */ |
Kojto | 106:ba1f97679dad | 367 | /** \brief Set 4k/64k page execution-never attribute |
Kojto | 106:ba1f97679dad | 368 | |
Kojto | 106:ba1f97679dad | 369 | The function sets 4k/64k page execution-never attribute |
Kojto | 106:ba1f97679dad | 370 | |
Kojto | 106:ba1f97679dad | 371 | \param [out] descriptor_l2 L2 descriptor. |
Kojto | 106:ba1f97679dad | 372 | \param [in] xn Page execution-never attribute : EXECUTE , NON_EXECUTE. |
Kojto | 106:ba1f97679dad | 373 | \param [in] page Page size: PAGE_4k, PAGE_64k, |
Kojto | 106:ba1f97679dad | 374 | |
Kojto | 106:ba1f97679dad | 375 | \return 0 |
Kojto | 106:ba1f97679dad | 376 | */ |
Kojto | 106:ba1f97679dad | 377 | __STATIC_INLINE int __xn_page(uint32_t *descriptor_l2, mmu_execute_Type xn, mmu_region_size_Type page) |
Kojto | 106:ba1f97679dad | 378 | { |
Kojto | 106:ba1f97679dad | 379 | if (page == PAGE_4k) |
Kojto | 106:ba1f97679dad | 380 | { |
Kojto | 106:ba1f97679dad | 381 | *descriptor_l2 &= PAGE_XN_4K_MASK; |
Kojto | 106:ba1f97679dad | 382 | *descriptor_l2 |= ((xn & 0x1) << PAGE_XN_4K_SHIFT); |
Kojto | 106:ba1f97679dad | 383 | } |
Kojto | 106:ba1f97679dad | 384 | else |
Kojto | 106:ba1f97679dad | 385 | { |
Kojto | 106:ba1f97679dad | 386 | *descriptor_l2 &= PAGE_XN_64K_MASK; |
Kojto | 106:ba1f97679dad | 387 | *descriptor_l2 |= ((xn & 0x1) << PAGE_XN_64K_SHIFT); |
Kojto | 106:ba1f97679dad | 388 | } |
Kojto | 106:ba1f97679dad | 389 | return 0; |
Kojto | 106:ba1f97679dad | 390 | } |
Kojto | 106:ba1f97679dad | 391 | |
Kojto | 106:ba1f97679dad | 392 | /** \brief Set 4k/64k page domain |
Kojto | 106:ba1f97679dad | 393 | |
Kojto | 106:ba1f97679dad | 394 | The function sets 4k/64k page domain |
Kojto | 106:ba1f97679dad | 395 | |
Kojto | 106:ba1f97679dad | 396 | \param [out] descriptor_l1 L1 descriptor. |
Kojto | 106:ba1f97679dad | 397 | \param [in] domain Page domain |
Kojto | 106:ba1f97679dad | 398 | |
Kojto | 106:ba1f97679dad | 399 | \return 0 |
Kojto | 106:ba1f97679dad | 400 | */ |
Kojto | 106:ba1f97679dad | 401 | __STATIC_INLINE int __domain_page(uint32_t *descriptor_l1, uint8_t domain) |
Kojto | 106:ba1f97679dad | 402 | { |
Kojto | 106:ba1f97679dad | 403 | *descriptor_l1 &= PAGE_DOMAIN_MASK; |
Kojto | 106:ba1f97679dad | 404 | *descriptor_l1 |= ((domain & 0xf) << PAGE_DOMAIN_SHIFT); |
Kojto | 106:ba1f97679dad | 405 | return 0; |
Kojto | 106:ba1f97679dad | 406 | } |
Kojto | 106:ba1f97679dad | 407 | |
Kojto | 106:ba1f97679dad | 408 | /** \brief Set 4k/64k page parity check |
Kojto | 106:ba1f97679dad | 409 | |
Kojto | 106:ba1f97679dad | 410 | The function sets 4k/64k page parity check |
Kojto | 106:ba1f97679dad | 411 | |
Kojto | 106:ba1f97679dad | 412 | \param [out] descriptor_l1 L1 descriptor. |
Kojto | 106:ba1f97679dad | 413 | \param [in] p_bit Parity check: ECC_DISABLED, ECC_ENABLED |
Kojto | 106:ba1f97679dad | 414 | |
Kojto | 106:ba1f97679dad | 415 | \return 0 |
Kojto | 106:ba1f97679dad | 416 | */ |
Kojto | 106:ba1f97679dad | 417 | __STATIC_INLINE int __p_page(uint32_t *descriptor_l1, mmu_ecc_check_Type p_bit) |
Kojto | 106:ba1f97679dad | 418 | { |
Kojto | 106:ba1f97679dad | 419 | *descriptor_l1 &= SECTION_P_MASK; |
Kojto | 106:ba1f97679dad | 420 | *descriptor_l1 |= ((p_bit & 0x1) << SECTION_P_SHIFT); |
Kojto | 106:ba1f97679dad | 421 | return 0; |
Kojto | 106:ba1f97679dad | 422 | } |
Kojto | 106:ba1f97679dad | 423 | |
Kojto | 106:ba1f97679dad | 424 | /** \brief Set 4k/64k page access privileges |
Kojto | 106:ba1f97679dad | 425 | |
Kojto | 106:ba1f97679dad | 426 | The function sets 4k/64k page access privileges |
Kojto | 106:ba1f97679dad | 427 | |
Kojto | 106:ba1f97679dad | 428 | \param [out] descriptor_l2 L2 descriptor. |
Kojto | 106:ba1f97679dad | 429 | \param [in] user User Level Access: NO_ACCESS, RW, READ |
Kojto | 106:ba1f97679dad | 430 | \param [in] priv Privilege Level Access: NO_ACCESS, RW, READ |
Kojto | 106:ba1f97679dad | 431 | \param [in] afe Access flag enable |
Kojto | 106:ba1f97679dad | 432 | |
Kojto | 106:ba1f97679dad | 433 | \return 0 |
Kojto | 106:ba1f97679dad | 434 | */ |
Kojto | 106:ba1f97679dad | 435 | __STATIC_INLINE int __ap_page(uint32_t *descriptor_l2, mmu_access_Type user, mmu_access_Type priv, uint32_t afe) |
Kojto | 106:ba1f97679dad | 436 | { |
Kojto | 106:ba1f97679dad | 437 | uint32_t ap = 0; |
Kojto | 106:ba1f97679dad | 438 | |
Kojto | 106:ba1f97679dad | 439 | if (afe == 0) { //full access |
Kojto | 106:ba1f97679dad | 440 | if ((priv == NO_ACCESS) && (user == NO_ACCESS)) { ap = 0x0; } |
Kojto | 106:ba1f97679dad | 441 | else if ((priv == RW) && (user == NO_ACCESS)) { ap = 0x1; } |
Kojto | 106:ba1f97679dad | 442 | else if ((priv == RW) && (user == READ)) { ap = 0x2; } |
Kojto | 106:ba1f97679dad | 443 | else if ((priv == RW) && (user == RW)) { ap = 0x3; } |
Kojto | 106:ba1f97679dad | 444 | else if ((priv == READ) && (user == NO_ACCESS)) { ap = 0x5; } |
Kojto | 106:ba1f97679dad | 445 | else if ((priv == READ) && (user == READ)) { ap = 0x6; } |
Kojto | 106:ba1f97679dad | 446 | } |
Kojto | 106:ba1f97679dad | 447 | |
Kojto | 106:ba1f97679dad | 448 | else { //Simplified access |
Kojto | 106:ba1f97679dad | 449 | if ((priv == RW) && (user == NO_ACCESS)) { ap = 0x1; } |
Kojto | 106:ba1f97679dad | 450 | else if ((priv == RW) && (user == RW)) { ap = 0x3; } |
Kojto | 106:ba1f97679dad | 451 | else if ((priv == READ) && (user == NO_ACCESS)) { ap = 0x5; } |
Kojto | 106:ba1f97679dad | 452 | else if ((priv == READ) && (user == READ)) { ap = 0x7; } |
Kojto | 106:ba1f97679dad | 453 | } |
Kojto | 106:ba1f97679dad | 454 | |
Kojto | 106:ba1f97679dad | 455 | *descriptor_l2 &= PAGE_AP_MASK; |
Kojto | 106:ba1f97679dad | 456 | *descriptor_l2 |= (ap & 0x3) << PAGE_AP_SHIFT; |
Kojto | 106:ba1f97679dad | 457 | *descriptor_l2 |= ((ap & 0x4)>>2) << PAGE_AP2_SHIFT; |
Kojto | 106:ba1f97679dad | 458 | |
Kojto | 106:ba1f97679dad | 459 | return 0; |
Kojto | 106:ba1f97679dad | 460 | } |
Kojto | 106:ba1f97679dad | 461 | |
Kojto | 106:ba1f97679dad | 462 | /** \brief Set 4k/64k page shareability |
Kojto | 106:ba1f97679dad | 463 | |
Kojto | 106:ba1f97679dad | 464 | The function sets 4k/64k page shareability |
Kojto | 106:ba1f97679dad | 465 | |
Kojto | 106:ba1f97679dad | 466 | \param [out] descriptor_l2 L2 descriptor. |
Kojto | 106:ba1f97679dad | 467 | \param [in] s_bit 4k/64k page shareability: NON_SHARED, SHARED |
Kojto | 106:ba1f97679dad | 468 | |
Kojto | 106:ba1f97679dad | 469 | \return 0 |
Kojto | 106:ba1f97679dad | 470 | */ |
Kojto | 106:ba1f97679dad | 471 | __STATIC_INLINE int __shared_page(uint32_t *descriptor_l2, mmu_shared_Type s_bit) |
Kojto | 106:ba1f97679dad | 472 | { |
Kojto | 106:ba1f97679dad | 473 | *descriptor_l2 &= PAGE_S_MASK; |
Kojto | 106:ba1f97679dad | 474 | *descriptor_l2 |= ((s_bit & 0x1) << PAGE_S_SHIFT); |
Kojto | 106:ba1f97679dad | 475 | return 0; |
Kojto | 106:ba1f97679dad | 476 | } |
Kojto | 106:ba1f97679dad | 477 | |
Kojto | 106:ba1f97679dad | 478 | /** \brief Set 4k/64k page Global attribute |
Kojto | 106:ba1f97679dad | 479 | |
Kojto | 106:ba1f97679dad | 480 | The function sets 4k/64k page Global attribute |
Kojto | 106:ba1f97679dad | 481 | |
Kojto | 106:ba1f97679dad | 482 | \param [out] descriptor_l2 L2 descriptor. |
Kojto | 106:ba1f97679dad | 483 | \param [in] g_bit 4k/64k page attribute: GLOBAL, NON_GLOBAL |
Kojto | 106:ba1f97679dad | 484 | |
Kojto | 106:ba1f97679dad | 485 | \return 0 |
Kojto | 106:ba1f97679dad | 486 | */ |
Kojto | 106:ba1f97679dad | 487 | __STATIC_INLINE int __global_page(uint32_t *descriptor_l2, mmu_global_Type g_bit) |
Kojto | 106:ba1f97679dad | 488 | { |
Kojto | 106:ba1f97679dad | 489 | *descriptor_l2 &= PAGE_NG_MASK; |
Kojto | 106:ba1f97679dad | 490 | *descriptor_l2 |= ((g_bit & 0x1) << PAGE_NG_SHIFT); |
Kojto | 106:ba1f97679dad | 491 | return 0; |
Kojto | 106:ba1f97679dad | 492 | } |
Kojto | 106:ba1f97679dad | 493 | |
Kojto | 106:ba1f97679dad | 494 | /** \brief Set 4k/64k page Security attribute |
Kojto | 106:ba1f97679dad | 495 | |
Kojto | 106:ba1f97679dad | 496 | The function sets 4k/64k page Global attribute |
Kojto | 106:ba1f97679dad | 497 | |
Kojto | 106:ba1f97679dad | 498 | \param [out] descriptor_l1 L1 descriptor. |
Kojto | 106:ba1f97679dad | 499 | \param [in] s_bit 4k/64k page Security attribute: SECURE, NON_SECURE |
Kojto | 106:ba1f97679dad | 500 | |
Kojto | 106:ba1f97679dad | 501 | \return 0 |
Kojto | 106:ba1f97679dad | 502 | */ |
Kojto | 106:ba1f97679dad | 503 | __STATIC_INLINE int __secure_page(uint32_t *descriptor_l1, mmu_secure_Type s_bit) |
Kojto | 106:ba1f97679dad | 504 | { |
Kojto | 106:ba1f97679dad | 505 | *descriptor_l1 &= PAGE_NS_MASK; |
Kojto | 106:ba1f97679dad | 506 | *descriptor_l1 |= ((s_bit & 0x1) << PAGE_NS_SHIFT); |
Kojto | 106:ba1f97679dad | 507 | return 0; |
Kojto | 106:ba1f97679dad | 508 | } |
Kojto | 106:ba1f97679dad | 509 | |
Kojto | 106:ba1f97679dad | 510 | |
Kojto | 106:ba1f97679dad | 511 | /** \brief Set Section memory attributes |
Kojto | 106:ba1f97679dad | 512 | |
Kojto | 106:ba1f97679dad | 513 | The function sets section memory attributes |
Kojto | 106:ba1f97679dad | 514 | |
Kojto | 106:ba1f97679dad | 515 | \param [out] descriptor_l1 L1 descriptor. |
Kojto | 106:ba1f97679dad | 516 | \param [in] mem Section memory type: NORMAL, DEVICE, SHARED_DEVICE, NON_SHARED_DEVICE, STRONGLY_ORDERED |
Kojto | 106:ba1f97679dad | 517 | \param [in] outer Outer cacheability: NON_CACHEABLE, WB_WA, WT, WB_NO_WA, |
Kojto | 106:ba1f97679dad | 518 | \param [in] inner Inner cacheability: NON_CACHEABLE, WB_WA, WT, WB_NO_WA, |
Kojto | 106:ba1f97679dad | 519 | |
Kojto | 106:ba1f97679dad | 520 | \return 0 |
Kojto | 106:ba1f97679dad | 521 | */ |
Kojto | 106:ba1f97679dad | 522 | __STATIC_INLINE int __memory_section(uint32_t *descriptor_l1, mmu_memory_Type mem, mmu_cacheability_Type outer, mmu_cacheability_Type inner) |
Kojto | 106:ba1f97679dad | 523 | { |
Kojto | 106:ba1f97679dad | 524 | *descriptor_l1 &= SECTION_TEXCB_MASK; |
Kojto | 106:ba1f97679dad | 525 | |
Kojto | 106:ba1f97679dad | 526 | if (STRONGLY_ORDERED == mem) |
Kojto | 106:ba1f97679dad | 527 | { |
Kojto | 106:ba1f97679dad | 528 | return 0; |
Kojto | 106:ba1f97679dad | 529 | } |
Kojto | 106:ba1f97679dad | 530 | else if (SHARED_DEVICE == mem) |
Kojto | 106:ba1f97679dad | 531 | { |
Kojto | 106:ba1f97679dad | 532 | *descriptor_l1 |= (1 << SECTION_B_SHIFT); |
Kojto | 106:ba1f97679dad | 533 | } |
Kojto | 106:ba1f97679dad | 534 | else if (NON_SHARED_DEVICE == mem) |
Kojto | 106:ba1f97679dad | 535 | { |
Kojto | 106:ba1f97679dad | 536 | *descriptor_l1 |= (1 << SECTION_TEX1_SHIFT); |
Kojto | 106:ba1f97679dad | 537 | } |
Kojto | 106:ba1f97679dad | 538 | else if (NORMAL == mem) |
Kojto | 106:ba1f97679dad | 539 | { |
Kojto | 106:ba1f97679dad | 540 | *descriptor_l1 |= 1 << SECTION_TEX2_SHIFT; |
Kojto | 106:ba1f97679dad | 541 | switch(inner) |
Kojto | 106:ba1f97679dad | 542 | { |
Kojto | 106:ba1f97679dad | 543 | case NON_CACHEABLE: |
Kojto | 106:ba1f97679dad | 544 | break; |
Kojto | 106:ba1f97679dad | 545 | case WB_WA: |
Kojto | 106:ba1f97679dad | 546 | *descriptor_l1 |= (1 << SECTION_B_SHIFT); |
Kojto | 106:ba1f97679dad | 547 | break; |
Kojto | 106:ba1f97679dad | 548 | case WT: |
Kojto | 106:ba1f97679dad | 549 | *descriptor_l1 |= 1 << SECTION_C_SHIFT; |
Kojto | 106:ba1f97679dad | 550 | break; |
Kojto | 106:ba1f97679dad | 551 | case WB_NO_WA: |
Kojto | 106:ba1f97679dad | 552 | *descriptor_l1 |= (1 << SECTION_B_SHIFT) | (1 << SECTION_C_SHIFT); |
Kojto | 106:ba1f97679dad | 553 | break; |
Kojto | 106:ba1f97679dad | 554 | } |
Kojto | 106:ba1f97679dad | 555 | switch(outer) |
Kojto | 106:ba1f97679dad | 556 | { |
Kojto | 106:ba1f97679dad | 557 | case NON_CACHEABLE: |
Kojto | 106:ba1f97679dad | 558 | break; |
Kojto | 106:ba1f97679dad | 559 | case WB_WA: |
Kojto | 106:ba1f97679dad | 560 | *descriptor_l1 |= (1 << SECTION_TEX0_SHIFT); |
Kojto | 106:ba1f97679dad | 561 | break; |
Kojto | 106:ba1f97679dad | 562 | case WT: |
Kojto | 106:ba1f97679dad | 563 | *descriptor_l1 |= 1 << SECTION_TEX1_SHIFT; |
Kojto | 106:ba1f97679dad | 564 | break; |
Kojto | 106:ba1f97679dad | 565 | case WB_NO_WA: |
Kojto | 106:ba1f97679dad | 566 | *descriptor_l1 |= (1 << SECTION_TEX0_SHIFT) | (1 << SECTION_TEX0_SHIFT); |
Kojto | 106:ba1f97679dad | 567 | break; |
Kojto | 106:ba1f97679dad | 568 | } |
Kojto | 106:ba1f97679dad | 569 | } |
Kojto | 106:ba1f97679dad | 570 | |
Kojto | 106:ba1f97679dad | 571 | return 0; |
Kojto | 106:ba1f97679dad | 572 | } |
Kojto | 106:ba1f97679dad | 573 | |
Kojto | 106:ba1f97679dad | 574 | /** \brief Set 4k/64k page memory attributes |
Kojto | 106:ba1f97679dad | 575 | |
Kojto | 106:ba1f97679dad | 576 | The function sets 4k/64k page memory attributes |
Kojto | 106:ba1f97679dad | 577 | |
Kojto | 106:ba1f97679dad | 578 | \param [out] descriptor_l2 L2 descriptor. |
Kojto | 106:ba1f97679dad | 579 | \param [in] mem 4k/64k page memory type: NORMAL, DEVICE, SHARED_DEVICE, NON_SHARED_DEVICE, STRONGLY_ORDERED |
Kojto | 106:ba1f97679dad | 580 | \param [in] outer Outer cacheability: NON_CACHEABLE, WB_WA, WT, WB_NO_WA, |
Kojto | 106:ba1f97679dad | 581 | \param [in] inner Inner cacheability: NON_CACHEABLE, WB_WA, WT, WB_NO_WA, |
Kojto | 106:ba1f97679dad | 582 | |
Kojto | 106:ba1f97679dad | 583 | \return 0 |
Kojto | 106:ba1f97679dad | 584 | */ |
Kojto | 106:ba1f97679dad | 585 | __STATIC_INLINE int __memory_page(uint32_t *descriptor_l2, mmu_memory_Type mem, mmu_cacheability_Type outer, mmu_cacheability_Type inner, mmu_region_size_Type page) |
Kojto | 106:ba1f97679dad | 586 | { |
Kojto | 106:ba1f97679dad | 587 | *descriptor_l2 &= PAGE_4K_TEXCB_MASK; |
Kojto | 106:ba1f97679dad | 588 | |
Kojto | 106:ba1f97679dad | 589 | if (page == PAGE_64k) |
Kojto | 106:ba1f97679dad | 590 | { |
Kojto | 106:ba1f97679dad | 591 | //same as section |
Kojto | 106:ba1f97679dad | 592 | __memory_section(descriptor_l2, mem, outer, inner); |
Kojto | 106:ba1f97679dad | 593 | } |
Kojto | 106:ba1f97679dad | 594 | else |
Kojto | 106:ba1f97679dad | 595 | { |
Kojto | 106:ba1f97679dad | 596 | if (STRONGLY_ORDERED == mem) |
Kojto | 106:ba1f97679dad | 597 | { |
Kojto | 106:ba1f97679dad | 598 | return 0; |
Kojto | 106:ba1f97679dad | 599 | } |
Kojto | 106:ba1f97679dad | 600 | else if (SHARED_DEVICE == mem) |
Kojto | 106:ba1f97679dad | 601 | { |
Kojto | 106:ba1f97679dad | 602 | *descriptor_l2 |= (1 << PAGE_4K_B_SHIFT); |
Kojto | 106:ba1f97679dad | 603 | } |
Kojto | 106:ba1f97679dad | 604 | else if (NON_SHARED_DEVICE == mem) |
Kojto | 106:ba1f97679dad | 605 | { |
Kojto | 106:ba1f97679dad | 606 | *descriptor_l2 |= (1 << PAGE_4K_TEX1_SHIFT); |
Kojto | 106:ba1f97679dad | 607 | } |
Kojto | 106:ba1f97679dad | 608 | else if (NORMAL == mem) |
Kojto | 106:ba1f97679dad | 609 | { |
Kojto | 106:ba1f97679dad | 610 | *descriptor_l2 |= 1 << PAGE_4K_TEX2_SHIFT; |
Kojto | 106:ba1f97679dad | 611 | switch(inner) |
Kojto | 106:ba1f97679dad | 612 | { |
Kojto | 106:ba1f97679dad | 613 | case NON_CACHEABLE: |
Kojto | 106:ba1f97679dad | 614 | break; |
Kojto | 106:ba1f97679dad | 615 | case WB_WA: |
Kojto | 106:ba1f97679dad | 616 | *descriptor_l2 |= (1 << PAGE_4K_B_SHIFT); |
Kojto | 106:ba1f97679dad | 617 | break; |
Kojto | 106:ba1f97679dad | 618 | case WT: |
Kojto | 106:ba1f97679dad | 619 | *descriptor_l2 |= 1 << PAGE_4K_C_SHIFT; |
Kojto | 106:ba1f97679dad | 620 | break; |
Kojto | 106:ba1f97679dad | 621 | case WB_NO_WA: |
Kojto | 106:ba1f97679dad | 622 | *descriptor_l2 |= (1 << PAGE_4K_B_SHIFT) | (1 << PAGE_4K_C_SHIFT); |
Kojto | 106:ba1f97679dad | 623 | break; |
Kojto | 106:ba1f97679dad | 624 | } |
Kojto | 106:ba1f97679dad | 625 | switch(outer) |
Kojto | 106:ba1f97679dad | 626 | { |
Kojto | 106:ba1f97679dad | 627 | case NON_CACHEABLE: |
Kojto | 106:ba1f97679dad | 628 | break; |
Kojto | 106:ba1f97679dad | 629 | case WB_WA: |
Kojto | 106:ba1f97679dad | 630 | *descriptor_l2 |= (1 << PAGE_4K_TEX0_SHIFT); |
Kojto | 106:ba1f97679dad | 631 | break; |
Kojto | 106:ba1f97679dad | 632 | case WT: |
Kojto | 106:ba1f97679dad | 633 | *descriptor_l2 |= 1 << PAGE_4K_TEX1_SHIFT; |
Kojto | 106:ba1f97679dad | 634 | break; |
Kojto | 106:ba1f97679dad | 635 | case WB_NO_WA: |
Kojto | 106:ba1f97679dad | 636 | *descriptor_l2 |= (1 << PAGE_4K_TEX0_SHIFT) | (1 << PAGE_4K_TEX0_SHIFT); |
Kojto | 106:ba1f97679dad | 637 | break; |
Kojto | 106:ba1f97679dad | 638 | } |
Kojto | 106:ba1f97679dad | 639 | } |
Kojto | 106:ba1f97679dad | 640 | } |
Kojto | 106:ba1f97679dad | 641 | |
Kojto | 106:ba1f97679dad | 642 | return 0; |
Kojto | 106:ba1f97679dad | 643 | } |
Kojto | 106:ba1f97679dad | 644 | |
Kojto | 106:ba1f97679dad | 645 | /** \brief Create a L1 section descriptor |
Kojto | 106:ba1f97679dad | 646 | |
Kojto | 106:ba1f97679dad | 647 | The function creates a section descriptor. |
Kojto | 106:ba1f97679dad | 648 | |
Kojto | 106:ba1f97679dad | 649 | Assumptions: |
Kojto | 106:ba1f97679dad | 650 | - 16MB super sections not suported |
Kojto | 106:ba1f97679dad | 651 | - TEX remap disabled, so memory type and attributes are described directly by bits in the descriptor |
Kojto | 106:ba1f97679dad | 652 | - Functions always return 0 |
Kojto | 106:ba1f97679dad | 653 | |
Kojto | 106:ba1f97679dad | 654 | \param [out] descriptor L1 descriptor |
Kojto | 106:ba1f97679dad | 655 | \param [out] descriptor2 L2 descriptor |
Kojto | 106:ba1f97679dad | 656 | \param [in] reg Section attributes |
Kojto | 106:ba1f97679dad | 657 | |
Kojto | 106:ba1f97679dad | 658 | \return 0 |
Kojto | 106:ba1f97679dad | 659 | */ |
Kojto | 106:ba1f97679dad | 660 | __STATIC_INLINE int __get_section_descriptor(uint32_t *descriptor, mmu_region_attributes_Type reg) |
Kojto | 106:ba1f97679dad | 661 | { |
Kojto | 106:ba1f97679dad | 662 | *descriptor = 0; |
Kojto | 106:ba1f97679dad | 663 | |
Kojto | 106:ba1f97679dad | 664 | __memory_section(descriptor, reg.mem_t, reg.outer_norm_t, reg.inner_norm_t); |
Kojto | 106:ba1f97679dad | 665 | __xn_section(descriptor,reg.xn_t); |
Kojto | 106:ba1f97679dad | 666 | __domain_section(descriptor, reg.domain); |
Kojto | 106:ba1f97679dad | 667 | __p_section(descriptor, reg.e_t); |
Kojto | 106:ba1f97679dad | 668 | __ap_section(descriptor, reg.priv_t, reg.user_t, 1); |
Kojto | 106:ba1f97679dad | 669 | __shared_section(descriptor,reg.sh_t); |
Kojto | 106:ba1f97679dad | 670 | __global_section(descriptor,reg.g_t); |
Kojto | 106:ba1f97679dad | 671 | __secure_section(descriptor,reg.sec_t); |
Kojto | 106:ba1f97679dad | 672 | *descriptor &= SECTION_MASK; |
Kojto | 106:ba1f97679dad | 673 | *descriptor |= SECTION_DESCRIPTOR; |
Kojto | 106:ba1f97679dad | 674 | |
Kojto | 106:ba1f97679dad | 675 | return 0; |
Kojto | 106:ba1f97679dad | 676 | |
Kojto | 106:ba1f97679dad | 677 | } |
Kojto | 106:ba1f97679dad | 678 | |
Kojto | 106:ba1f97679dad | 679 | |
Kojto | 106:ba1f97679dad | 680 | /** \brief Create a L1 and L2 4k/64k page descriptor |
Kojto | 106:ba1f97679dad | 681 | |
Kojto | 106:ba1f97679dad | 682 | The function creates a 4k/64k page descriptor. |
Kojto | 106:ba1f97679dad | 683 | Assumptions: |
Kojto | 106:ba1f97679dad | 684 | - TEX remap disabled, so memory type and attributes are described directly by bits in the descriptor |
Kojto | 106:ba1f97679dad | 685 | - Functions always return 0 |
Kojto | 106:ba1f97679dad | 686 | |
Kojto | 106:ba1f97679dad | 687 | \param [out] descriptor L1 descriptor |
Kojto | 106:ba1f97679dad | 688 | \param [out] descriptor2 L2 descriptor |
Kojto | 106:ba1f97679dad | 689 | \param [in] reg 4k/64k page attributes |
Kojto | 106:ba1f97679dad | 690 | |
Kojto | 106:ba1f97679dad | 691 | \return 0 |
Kojto | 106:ba1f97679dad | 692 | */ |
Kojto | 106:ba1f97679dad | 693 | __STATIC_INLINE int __get_page_descriptor(uint32_t *descriptor, uint32_t *descriptor2, mmu_region_attributes_Type reg) |
Kojto | 106:ba1f97679dad | 694 | { |
Kojto | 106:ba1f97679dad | 695 | *descriptor = 0; |
Kojto | 106:ba1f97679dad | 696 | *descriptor2 = 0; |
Kojto | 106:ba1f97679dad | 697 | |
Kojto | 106:ba1f97679dad | 698 | switch (reg.rg_t) |
Kojto | 106:ba1f97679dad | 699 | { |
Kojto | 106:ba1f97679dad | 700 | case PAGE_4k: |
Kojto | 106:ba1f97679dad | 701 | __memory_page(descriptor2, reg.mem_t, reg.outer_norm_t, reg.inner_norm_t, PAGE_4k); |
Kojto | 106:ba1f97679dad | 702 | __xn_page(descriptor2, reg.xn_t, PAGE_4k); |
Kojto | 106:ba1f97679dad | 703 | __domain_page(descriptor, reg.domain); |
Kojto | 106:ba1f97679dad | 704 | __p_page(descriptor, reg.e_t); |
Kojto | 106:ba1f97679dad | 705 | __ap_page(descriptor2, reg.priv_t, reg.user_t, 1); |
Kojto | 106:ba1f97679dad | 706 | __shared_page(descriptor2,reg.sh_t); |
Kojto | 106:ba1f97679dad | 707 | __global_page(descriptor2,reg.g_t); |
Kojto | 106:ba1f97679dad | 708 | __secure_page(descriptor,reg.sec_t); |
Kojto | 106:ba1f97679dad | 709 | *descriptor &= PAGE_L1_MASK; |
Kojto | 106:ba1f97679dad | 710 | *descriptor |= PAGE_L1_DESCRIPTOR; |
Kojto | 106:ba1f97679dad | 711 | *descriptor2 &= PAGE_L2_4K_MASK; |
Kojto | 106:ba1f97679dad | 712 | *descriptor2 |= PAGE_L2_4K_DESC; |
Kojto | 106:ba1f97679dad | 713 | break; |
Kojto | 106:ba1f97679dad | 714 | |
Kojto | 106:ba1f97679dad | 715 | case PAGE_64k: |
Kojto | 106:ba1f97679dad | 716 | __memory_page(descriptor2, reg.mem_t, reg.outer_norm_t, reg.inner_norm_t, PAGE_64k); |
Kojto | 106:ba1f97679dad | 717 | __xn_page(descriptor2, reg.xn_t, PAGE_64k); |
Kojto | 106:ba1f97679dad | 718 | __domain_page(descriptor, reg.domain); |
Kojto | 106:ba1f97679dad | 719 | __p_page(descriptor, reg.e_t); |
Kojto | 106:ba1f97679dad | 720 | __ap_page(descriptor2, reg.priv_t, reg.user_t, 1); |
Kojto | 106:ba1f97679dad | 721 | __shared_page(descriptor2,reg.sh_t); |
Kojto | 106:ba1f97679dad | 722 | __global_page(descriptor2,reg.g_t); |
Kojto | 106:ba1f97679dad | 723 | __secure_page(descriptor,reg.sec_t); |
Kojto | 106:ba1f97679dad | 724 | *descriptor &= PAGE_L1_MASK; |
Kojto | 106:ba1f97679dad | 725 | *descriptor |= PAGE_L1_DESCRIPTOR; |
Kojto | 106:ba1f97679dad | 726 | *descriptor2 &= PAGE_L2_64K_MASK; |
Kojto | 106:ba1f97679dad | 727 | *descriptor2 |= PAGE_L2_64K_DESC; |
Kojto | 106:ba1f97679dad | 728 | break; |
Kojto | 106:ba1f97679dad | 729 | |
Kojto | 106:ba1f97679dad | 730 | case SECTION: |
Kojto | 106:ba1f97679dad | 731 | //error |
Kojto | 106:ba1f97679dad | 732 | break; |
Kojto | 106:ba1f97679dad | 733 | |
Kojto | 106:ba1f97679dad | 734 | } |
Kojto | 106:ba1f97679dad | 735 | |
Kojto | 106:ba1f97679dad | 736 | return 0; |
Kojto | 106:ba1f97679dad | 737 | |
Kojto | 106:ba1f97679dad | 738 | } |
Kojto | 106:ba1f97679dad | 739 | |
Kojto | 106:ba1f97679dad | 740 | /** \brief Create a 1MB Section |
Kojto | 106:ba1f97679dad | 741 | |
Kojto | 106:ba1f97679dad | 742 | \param [in] ttb Translation table base address |
Kojto | 106:ba1f97679dad | 743 | \param [in] base_address Section base address |
Kojto | 106:ba1f97679dad | 744 | \param [in] count Number of sections to create |
Kojto | 106:ba1f97679dad | 745 | \param [in] descriptor_l1 L1 descriptor (region attributes) |
Kojto | 106:ba1f97679dad | 746 | |
Kojto | 106:ba1f97679dad | 747 | */ |
Kojto | 106:ba1f97679dad | 748 | __STATIC_INLINE void __TTSection(uint32_t *ttb, uint32_t base_address, uint32_t count, uint32_t descriptor_l1) |
Kojto | 106:ba1f97679dad | 749 | { |
Kojto | 106:ba1f97679dad | 750 | uint32_t offset; |
Kojto | 106:ba1f97679dad | 751 | uint32_t entry; |
Kojto | 106:ba1f97679dad | 752 | uint32_t i; |
Kojto | 106:ba1f97679dad | 753 | |
Kojto | 106:ba1f97679dad | 754 | offset = base_address >> 20; |
Kojto | 106:ba1f97679dad | 755 | entry = (base_address & 0xFFF00000) | descriptor_l1; |
Kojto | 106:ba1f97679dad | 756 | |
Kojto | 106:ba1f97679dad | 757 | //4 bytes aligned |
Kojto | 106:ba1f97679dad | 758 | ttb = ttb + offset; |
Kojto | 106:ba1f97679dad | 759 | |
Kojto | 106:ba1f97679dad | 760 | for (i = 0; i < count; i++ ) |
Kojto | 106:ba1f97679dad | 761 | { |
Kojto | 106:ba1f97679dad | 762 | //4 bytes aligned |
Kojto | 106:ba1f97679dad | 763 | *ttb++ = entry; |
Kojto | 106:ba1f97679dad | 764 | entry += OFFSET_1M; |
Kojto | 106:ba1f97679dad | 765 | } |
Kojto | 106:ba1f97679dad | 766 | } |
Kojto | 106:ba1f97679dad | 767 | |
Kojto | 106:ba1f97679dad | 768 | /** \brief Create a 4k page entry |
Kojto | 106:ba1f97679dad | 769 | |
Kojto | 106:ba1f97679dad | 770 | \param [in] ttb L1 table base address |
Kojto | 106:ba1f97679dad | 771 | \param [in] base_address 4k base address |
Kojto | 106:ba1f97679dad | 772 | \param [in] count Number of 4k pages to create |
Kojto | 106:ba1f97679dad | 773 | \param [in] descriptor_l1 L1 descriptor (region attributes) |
Kojto | 106:ba1f97679dad | 774 | \param [in] ttb_l2 L2 table base address |
Kojto | 106:ba1f97679dad | 775 | \param [in] descriptor_l2 L2 descriptor (region attributes) |
Kojto | 106:ba1f97679dad | 776 | |
Kojto | 106:ba1f97679dad | 777 | */ |
Kojto | 106:ba1f97679dad | 778 | __STATIC_INLINE void __TTPage_4k(uint32_t *ttb, uint32_t base_address, uint32_t count, uint32_t descriptor_l1, uint32_t *ttb_l2, uint32_t descriptor_l2 ) |
Kojto | 106:ba1f97679dad | 779 | { |
Kojto | 106:ba1f97679dad | 780 | |
Kojto | 106:ba1f97679dad | 781 | uint32_t offset, offset2; |
Kojto | 106:ba1f97679dad | 782 | uint32_t entry, entry2; |
Kojto | 106:ba1f97679dad | 783 | uint32_t i; |
Kojto | 106:ba1f97679dad | 784 | |
Kojto | 106:ba1f97679dad | 785 | |
Kojto | 106:ba1f97679dad | 786 | offset = base_address >> 20; |
Kojto | 106:ba1f97679dad | 787 | entry = ((int)ttb_l2 & 0xFFFFFC00) | descriptor_l1; |
Kojto | 106:ba1f97679dad | 788 | |
Kojto | 106:ba1f97679dad | 789 | //4 bytes aligned |
Kojto | 106:ba1f97679dad | 790 | ttb += offset; |
Kojto | 106:ba1f97679dad | 791 | //create l1_entry |
Kojto | 106:ba1f97679dad | 792 | *ttb = entry; |
Kojto | 106:ba1f97679dad | 793 | |
Kojto | 106:ba1f97679dad | 794 | offset2 = (base_address & 0xff000) >> 12; |
Kojto | 106:ba1f97679dad | 795 | ttb_l2 += offset2; |
Kojto | 106:ba1f97679dad | 796 | entry2 = (base_address & 0xFFFFF000) | descriptor_l2; |
Kojto | 106:ba1f97679dad | 797 | for (i = 0; i < count; i++ ) |
Kojto | 106:ba1f97679dad | 798 | { |
Kojto | 106:ba1f97679dad | 799 | //4 bytes aligned |
Kojto | 106:ba1f97679dad | 800 | *ttb_l2++ = entry2; |
Kojto | 106:ba1f97679dad | 801 | entry2 += OFFSET_4K; |
Kojto | 106:ba1f97679dad | 802 | } |
Kojto | 106:ba1f97679dad | 803 | } |
Kojto | 106:ba1f97679dad | 804 | |
Kojto | 106:ba1f97679dad | 805 | /** \brief Create a 64k page entry |
Kojto | 106:ba1f97679dad | 806 | |
Kojto | 106:ba1f97679dad | 807 | \param [in] ttb L1 table base address |
Kojto | 106:ba1f97679dad | 808 | \param [in] base_address 64k base address |
Kojto | 106:ba1f97679dad | 809 | \param [in] count Number of 64k pages to create |
Kojto | 106:ba1f97679dad | 810 | \param [in] descriptor_l1 L1 descriptor (region attributes) |
Kojto | 106:ba1f97679dad | 811 | \param [in] ttb_l2 L2 table base address |
Kojto | 106:ba1f97679dad | 812 | \param [in] descriptor_l2 L2 descriptor (region attributes) |
Kojto | 106:ba1f97679dad | 813 | |
Kojto | 106:ba1f97679dad | 814 | */ |
Kojto | 106:ba1f97679dad | 815 | __STATIC_INLINE void __TTPage_64k(uint32_t *ttb, uint32_t base_address, uint32_t count, uint32_t descriptor_l1, uint32_t *ttb_l2, uint32_t descriptor_l2 ) |
Kojto | 106:ba1f97679dad | 816 | { |
Kojto | 106:ba1f97679dad | 817 | uint32_t offset, offset2; |
Kojto | 106:ba1f97679dad | 818 | uint32_t entry, entry2; |
Kojto | 106:ba1f97679dad | 819 | uint32_t i,j; |
Kojto | 106:ba1f97679dad | 820 | |
Kojto | 106:ba1f97679dad | 821 | |
Kojto | 106:ba1f97679dad | 822 | offset = base_address >> 20; |
Kojto | 106:ba1f97679dad | 823 | entry = ((int)ttb_l2 & 0xFFFFFC00) | descriptor_l1; |
Kojto | 106:ba1f97679dad | 824 | |
Kojto | 106:ba1f97679dad | 825 | //4 bytes aligned |
Kojto | 106:ba1f97679dad | 826 | ttb += offset; |
Kojto | 106:ba1f97679dad | 827 | //create l1_entry |
Kojto | 106:ba1f97679dad | 828 | *ttb = entry; |
Kojto | 106:ba1f97679dad | 829 | |
Kojto | 106:ba1f97679dad | 830 | offset2 = (base_address & 0xff000) >> 12; |
Kojto | 106:ba1f97679dad | 831 | ttb_l2 += offset2; |
Kojto | 106:ba1f97679dad | 832 | entry2 = (base_address & 0xFFFF0000) | descriptor_l2; |
Kojto | 106:ba1f97679dad | 833 | for (i = 0; i < count; i++ ) |
Kojto | 106:ba1f97679dad | 834 | { |
Kojto | 106:ba1f97679dad | 835 | //create 16 entries |
Kojto | 106:ba1f97679dad | 836 | for (j = 0; j < 16; j++) |
Kojto | 106:ba1f97679dad | 837 | //4 bytes aligned |
Kojto | 106:ba1f97679dad | 838 | *ttb_l2++ = entry2; |
Kojto | 106:ba1f97679dad | 839 | entry2 += OFFSET_64K; |
Kojto | 106:ba1f97679dad | 840 | } |
Kojto | 106:ba1f97679dad | 841 | } |
Kojto | 106:ba1f97679dad | 842 | |
Kojto | 106:ba1f97679dad | 843 | /*@} end of MMU_Functions */ |
Kojto | 106:ba1f97679dad | 844 | #endif |
Kojto | 106:ba1f97679dad | 845 | |
Kojto | 106:ba1f97679dad | 846 | #ifdef __cplusplus |
Kojto | 106:ba1f97679dad | 847 | } |
Kojto | 106:ba1f97679dad | 848 | #endif |