Skip to content

Conversation

ibirnbaum
Copy link
Member

Result of a discussion in #96689.

Move the helper file arm_mpu_mem_cfg.h, which translates the values of the Kconfig symbols CONFIG_FLASH_SIZE and CONFIG_SRAM_SIZE to size definitions to be used during region MPU setup, from a Cortex-M-specific include directory to the Cortex-agnostic zephyr/arch/arm/mpu directory, as:

  • the contents of this header file are not dependent on the target being an ARMv7M, only ARMv8M is actively excluded, but the contents are identical for the ARMv7/8 Cortex-R MPU implementation,
  • the header file zephyr/arch/arm/mpu/arm_mpu.h, included within arm_mpu_mem_cfg.h, is also compatible with both Cortex-M and Cortex-R, the distinction between the two implementations takes place at an even lower level,
  • several ARMv7/8 Cortex-R targets now reference this header file in their MPU region setup (Xilinx ZynqMP, TI K3, Renode cortex_r8_virtual) while so far referencing it in an ARMv7 Cortex-M-specific include directory.

Includes updated includes for all SoCs/boards referencing this header file.

Move the helper file arm_mpu_mem_cfg.h, which translates the values
of the Kconfig symbols CONFIG_FLASH_SIZE and CONFIG_SRAM_SIZE to size
definitions to be used during MPU setup, from a Cortex-M-specific
include directory to the Cortex-agnostic zephyr/arch/arm/mpu directory,
as:

- the contents of this header file are not dependent on the target being
  an ARMv7M, only ARMv8M is excluded, but the contents are identical
  for the ARMv7/8 Cortex-R MPU implementation,
- the header file zephyr/arch/arm/mpu/arm_mpu.h, included within
  arm_mpu_mem_cfg.h, is also compatible with both Cortex-M and Cortex-R,
  the distinction between the two implementations takes place at an
  even lower level,
- several ARMv7/8 Cortex-R targets now reference this header file in their
  MPU region setup (Xilinx ZynqMP, TI K3, Renode cortex_r8_virtual) while
  so far referencing it in an ARMv7 Cortex-M-specific include directory.

Signed-off-by: Immo Birnbaum <[email protected]>
Update include of header file arm_mpu_mem_cfg.h which has been moved
to a Cortex-M/-R-agnostic include directory.

Signed-off-by: Immo Birnbaum <[email protected]>
Update include of header file arm_mpu_mem_cfg.h which has been moved
to a Cortex-M/-R-agnostic include directory.

Signed-off-by: Immo Birnbaum <[email protected]>
Update include of header file arm_mpu_mem_cfg.h which has been moved
to a Cortex-M/-R-agnostic include directory.

Signed-off-by: Immo Birnbaum <[email protected]>
Update include of header file arm_mpu_mem_cfg.h which has been moved
to a Cortex-M/-R-agnostic include directory.

Signed-off-by: Immo Birnbaum <[email protected]>
Update include of header file arm_mpu_mem_cfg.h which has been moved
to a Cortex-M/-R-agnostic include directory.

Signed-off-by: Immo Birnbaum <[email protected]>
Update include of header file arm_mpu_mem_cfg.h which has been moved
to a Cortex-M/-R-agnostic include directory.

Signed-off-by: Immo Birnbaum <[email protected]>
Update include of header file arm_mpu_mem_cfg.h which has been moved
to a Cortex-M/-R-agnostic include directory.

Signed-off-by: Immo Birnbaum <[email protected]>
Update include of header file arm_mpu_mem_cfg.h which has been moved
to a Cortex-M/-R-agnostic include directory.

Signed-off-by: Immo Birnbaum <[email protected]>
Update include of header file arm_mpu_mem_cfg.h which has been moved
to a Cortex-M/-R-agnostic include directory.

Signed-off-by: Immo Birnbaum <[email protected]>
Update include of header file arm_mpu_mem_cfg.h which has been moved
to a Cortex-M/-R-agnostic include directory.

Signed-off-by: Immo Birnbaum <[email protected]>
Update include of header file arm_mpu_mem_cfg.h which has been moved
to a Cortex-M/-R-agnostic include directory.

Signed-off-by: Immo Birnbaum <[email protected]>
Update include of header file arm_mpu_mem_cfg.h which has been moved
to a Cortex-M/-R-agnostic include directory.

Signed-off-by: Immo Birnbaum <[email protected]>
Update include of header file arm_mpu_mem_cfg.h which has been moved
to a Cortex-M/-R-agnostic include directory.

Signed-off-by: Immo Birnbaum <[email protected]>
Update include of header file arm_mpu_mem_cfg.h which has been moved
to a Cortex-M/-R-agnostic include directory.

Signed-off-by: Immo Birnbaum <[email protected]>
Update include of header file arm_mpu_mem_cfg.h which has been moved
to a Cortex-M/-R-agnostic include directory.

Signed-off-by: Immo Birnbaum <[email protected]>
Update include of header file arm_mpu_mem_cfg.h which has been moved
to a Cortex-M/-R-agnostic include directory.

Signed-off-by: Immo Birnbaum <[email protected]>
@ibirnbaum ibirnbaum force-pushed the arch_arm_mpu_mem_cfg_header branch from ca10cc7 to b362acf Compare October 20, 2025 17:17
Copy link

@JarmouniA JarmouniA added this to the v4.3.0 milestone Oct 21, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants