
On Fri, Aug 11, 2023 at 11:12:28AM +0530, Bhupesh Sharma wrote:
If CONFIG_SYS_ICACHE_OFF and CONFIG_SYS_DCACHE_OFF are set, we see the following errors while compiling u-boot:
arch/arm/cpu/armv8/cpu.c:60: undefined reference to `icache_disable' aarch64-linux-gnu-ld.bfd: arch/arm/cpu/armv8/cpu.c:68: undefined reference to `dcache_disable' aarch64-linux-gnu-ld.bfd: arch/arm/cpu/armv8/cpu.c:69: undefined reference to `invalidate_dcache_all' aarch64-linux-gnu-ld.bfd: arch/arm/cpu/armv8/exception_level.o: in function `entry_non_secure': arch/arm/cpu/armv8/exception_level.c:29: undefined reference to `dcache_enable' aarch64-linux-gnu-ld.bfd: arch/arm/cpu/armv8/exception_level.o: in function `switch_to_non_secure_mode': arch/arm/cpu/armv8/exception_level.c:52: undefined reference to `dcache_disable' aarch64-linux-gnu-ld.bfd: arch/arm/lib/relocate_64.o: in function `relocate_done': arch/arm/lib/relocate_64.S:92: undefined reference to `__asm_flush_dcache_range' aarch64-linux-gnu-ld.bfd: arch/arm/lib/relocate_64.S:93: undefined reference to `__asm_flush_l3_dcache' aarch64-linux-gnu-ld.bfd: arch/arm/lib/bootm.o: in function `do_nonsec_virt_switch': arch/arm/lib/bootm.c:191: undefined reference to `dcache_disable' aarch64-linux-gnu-ld.bfd: boot/bootm_os.o: in function `do_bootm_qnxelf': boot/bootm_os.c:392: undefined reference to `dcache_status' aarch64-linux-gnu-ld.bfd: boot/bootm_os.c:394: undefined reference to `dcache_disable' aarch64-linux-gnu-ld.bfd: boot/bootm_os.c:399: undefined reference to `dcache_enable' aarch64-linux-gnu-ld.bfd: cmd/elf.o: in function `do_bootvx': cmd/elf.c:280: undefined reference to `dcache_disable'
While the following error message is expected when SYS_DCACHE_OFF is set: arch/arm/cpu/armv8/cache_v8.c:697:2: error: #error Please describe your MMU layout in CONFIG_SYS_MEM_MAP and enable dcache.
the rest of the compilation errors should be fixed.
Cc: Tom Rini trini@konsulko.com Cc: Simon Glass sjg@chromium.org Cc: Peng Fan peng.fan@nxp.com Signed-off-by: Bhupesh Sharma bhupesh.sharma@linaro.org
arch/arm/cpu/armv8/Makefile | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-)
We should disable SYS_DCACHE_OFF (and SYS_ICACHE_OFF?) for ARMv8, and then rework the Makefiles too.