zephyr/arch/arm
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Hongquan Li d52d4583f5 arch: arm: cortex_a_r: smp: flush boot parameters with arch cache ops
arch_cpu_start() published the boot parameters through
sys_cache_data_flush_range(), which returns -ENOTSUP when cache
management or d-cache support is disabled.  The return value was
discarded, so a secondary core could observe stale parameters.

The AArch32 MMU setup enabled the data cache unconditionally, even
with CONFIG_DCACHE disabled, so sys_cache_data_flush_range() could
silently skip the clean while the cache was live.  Gate the SCTLR.C
bit in z_arm_mmu_init() on CONFIG_DCACHE, like soc_reset_hook() in
soc/arm/fvp_aemv8r/aarch32/soc.c already does, so that CONFIG_DCACHE=n
does not enable the data cache.

Call arch_dcache_flush_range() and check its result before releasing
the secondary core, and build cache.c for CONFIG_ARCH_CACHE or
CONFIG_DCACHE so the operation exists without cache management.  The
flush is then only needed, and only compiled, when CONFIG_DCACHE is
enabled.

Keep the existing dsync barriers; they remain the ordering point when
the flush is compiled out.  Include zephyr/arch/cache.h directly
because zephyr/cache.h only exposes the arch cache interface when a
cache type is selected.

This only avoids setting SCTLR.C; a C bit left set by an earlier boot
stage is not cleared.

Fixes #119663

Signed-off-by: Hongquan Li <hongquan.li@processmission.com>
2026-10-30 12:48:58 -04:00
..
core arch: arm: cortex_a_r: smp: flush boot parameters with arch cache ops 2026-10-30 12:48:58 -04:00
include arch: arm: cortex_m: pend PendSV with a plain ICSR store 2026-09-26 00:44:46 +02:00
CMakeLists.txt arch: arm: cmake: Correct endian in output format 2024-07-04 18:01:51 -04:00
hardening.yaml scripts: kconfig: hardenconfig: switch to YAML hardening database 2026-09-29 10:40:32 +02:00
Kconfig llext: Add support for generating veneers for out-of-range branches. 2026-05-14 15:13:09 +02:00