Skip to content
Permalink
Browse files

arc: arm: fix support for MPUs on non-XIP systems

The size of the ROM region is now rounded up to the
nearest power of two; we no longer assume that RAM
is in a different part of memory.

Fixes: #15558

Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
  • Loading branch information...
andrewboie authored and nashif committed Apr 23, 2019
1 parent ecf2784 commit ff1952cc443107b8ea1e763a01364f30bcf42b0b
Showing with 3 additions and 1 deletion.
  1. +2 −1 include/arch/arc/v2/linker.ld
  2. +1 −0 include/arch/arm/cortex_m/scripts/linker.ld
@@ -51,6 +51,7 @@
#endif
#else
#define MPU_MIN_SIZE_ALIGN
#define MPU_ALIGN(region_size) . = ALIGN(4)
#endif

#if defined(CONFIG_XIP)
@@ -128,7 +129,7 @@ SECTIONS {
} GROUP_LINK_IN(ROMABLE_REGION)

_image_rodata_end = .;
MPU_MIN_SIZE_ALIGN
MPU_ALIGN(_image_rodata_end - _image_rom_start);
_image_rom_end = .;
_image_rom_size = _image_rom_end - _image_rom_start;

@@ -277,6 +277,7 @@ SECTIONS
#endif /* CONFIG_ARM_FIRMWARE_HAS_SECURE_ENTRY_FUNCS */

_image_rodata_end = .;
MPU_ALIGN(_image_rodata_end -_image_rom_start);
_image_rom_end = .;

GROUP_END(ROMABLE_REGION)

0 comments on commit ff1952c

Please sign in to comment.
You can’t perform that action at this time.