-
Couldn't load subscription status.
- Fork 8.1k
soc: xlnx: zynqmp: fix vectors and SRAM MPU region priority order #96689
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
Place the 'vectors' region configuration behind the 'sram' and 'rom_region' configurations so that the MPU region for the vectors takes precedence over the 'sram' region due to higher region index = higher priority when resolving memory properties / permissions for overlapping regions. This is required for the vectors to work properly if the SRAM base address is also at 0x0. Fixes zephyrproject-rtos#96688. Signed-off-by: Immo Birnbaum <[email protected]>
7c5ed7d to
3b51e58
Compare
|
|
i faced the same issue, i also configured the vectors after 'sram' and 'rom' region when i'm verifying on ZCU102. Additionally, I noticed that the file soc/xlnx/zynqmp/arm_mpu_regions.c includes |
Please create the patch on top of this one. |
@venodela @michalsimek There's no such file in the cortex_a_r directory. <zephyr/arch/arm/cortex_m/arm_mpu_mem_cfg.h> is merely a helper file that converts the KCONFIG values specifying the current RAM and FLASH sizes to region size masks. It includes the already Cortex-variant-neutral header file <zephyr/arch/arm/mpu/arm_mpu.h> which eventually resolves to the variant-specific implementation at an even lower level (seems like the main difference between the M-MPU and the R-MPU is memory-based register access vs. CP15-based register access). I'd rather move this to a more generic place like zephyr/arch/arm/mpu if possible instead of placing a 100% identical clone of this header file in the cortex_a_r directory. The current placement is a historical debt of the fact that MPU support was there for Cortex-M first and for Cortex-R later and therefore some MPU related stuff wasn't named in a Cortex-agnostic way. |



Place the 'vectors' region configuration behind the 'sram' and 'rom_region' configurations so that the MPU region for the vectors takes precedence over the 'sram' region due to higher region index = higher priority when resolving memory properties/permissions for overlapping regions. This is required for the vectors to work properly if the SRAM base address is also at 0x0.
Fixes #96688.