Skip to content

Commit b27bca4

Browse files
carlocaionenashif
authored andcommitted
aarch64: mmu: Remove SRAM memory region
Now that the arch_mem_map() is actually working correctly we can remove the big SRAM region. Signed-off-by: Carlo Caione <[email protected]>
1 parent 85479d1 commit b27bca4

File tree

1 file changed

+4
-10
lines changed

1 file changed

+4
-10
lines changed

arch/arm/core/aarch64/mmu/arm_mmu.c

Lines changed: 4 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -271,32 +271,26 @@ static int add_map(struct arm_mmu_ptables *ptables, const char *name,
271271
/* zephyr execution regions with appropriate attributes */
272272
static const struct arm_mmu_region mmu_zephyr_regions[] = {
273273

274-
/* Mark the whole SRAM as read-write */
275-
MMU_REGION_FLAT_ENTRY("SRAM",
276-
(uintptr_t)CONFIG_SRAM_BASE_ADDRESS,
277-
(uintptr_t)KB(CONFIG_SRAM_SIZE),
278-
MT_NORMAL | MT_P_RW_U_NA | MT_DEFAULT_SECURE_STATE),
279-
280-
/* Mark rest of the zephyr execution regions (data, bss, noinit, etc.)
274+
/* Mark the zephyr execution regions (data, bss, noinit, etc.)
281275
* cacheable, read-write
282276
* Note: read-write region is marked execute-never internally
283277
*/
284278
MMU_REGION_FLAT_ENTRY("zephyr_data",
285279
(uintptr_t)__kernel_ram_start,
286280
(uintptr_t)__kernel_ram_size,
287-
MT_NORMAL | MT_P_RW_U_NA | MT_DEFAULT_SECURE_STATE | MT_OVERWRITE),
281+
MT_NORMAL | MT_P_RW_U_NA | MT_DEFAULT_SECURE_STATE),
288282

289283
/* Mark text segment cacheable,read only and executable */
290284
MMU_REGION_FLAT_ENTRY("zephyr_code",
291285
(uintptr_t)_image_text_start,
292286
(uintptr_t)_image_text_size,
293-
MT_NORMAL | MT_P_RX_U_NA | MT_DEFAULT_SECURE_STATE | MT_OVERWRITE),
287+
MT_NORMAL | MT_P_RX_U_NA | MT_DEFAULT_SECURE_STATE),
294288

295289
/* Mark rodata segment cacheable, read only and execute-never */
296290
MMU_REGION_FLAT_ENTRY("zephyr_rodata",
297291
(uintptr_t)_image_rodata_start,
298292
(uintptr_t)_image_rodata_size,
299-
MT_NORMAL | MT_P_RO_U_NA | MT_DEFAULT_SECURE_STATE | MT_OVERWRITE),
293+
MT_NORMAL | MT_P_RO_U_NA | MT_DEFAULT_SECURE_STATE),
300294
};
301295

302296
static inline void add_arm_mmu_region(struct arm_mmu_ptables *ptables,

0 commit comments

Comments
 (0)