* [PATCH 1/1] armv8: Fix compilation error with SYS_DCACHE_OFF
@ 2023-08-11 5:42 Bhupesh Sharma
2023-08-11 14:01 ` Tom Rini
0 siblings, 1 reply; 3+ messages in thread
From: Bhupesh Sharma @ 2023-08-11 5:42 UTC (permalink / raw)
To: u-boot; +Cc: sjg, trini, bhupesh.sharma, bhupesh.linux, Peng Fan
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(-)
diff --git a/arch/arm/cpu/armv8/Makefile b/arch/arm/cpu/armv8/Makefile
index bba4f570db..6168032ffb 100644
--- a/arch/arm/cpu/armv8/Makefile
+++ b/arch/arm/cpu/armv8/Makefile
@@ -5,14 +5,12 @@
extra-y := start.o
+obj-y += cache_v8.o
+obj-y += cache.o
obj-y += cpu.o
ifndef CONFIG_$(SPL_TPL_)TIMER
obj-$(CONFIG_SYS_ARCH_TIMER) += generic_timer.o
endif
-ifndef CONFIG_$(SPL_)SYS_DCACHE_OFF
-obj-y += cache_v8.o
-obj-y += cache.o
-endif
ifdef CONFIG_SPL_BUILD
obj-$(CONFIG_ARMV8_SPL_EXCEPTION_VECTORS) += exceptions.o
else
--
2.38.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH 1/1] armv8: Fix compilation error with SYS_DCACHE_OFF
2023-08-11 5:42 [PATCH 1/1] armv8: Fix compilation error with SYS_DCACHE_OFF Bhupesh Sharma
@ 2023-08-11 14:01 ` Tom Rini
2023-08-22 7:51 ` bhupesh.sharma
0 siblings, 1 reply; 3+ messages in thread
From: Tom Rini @ 2023-08-11 14:01 UTC (permalink / raw)
To: Bhupesh Sharma; +Cc: u-boot, sjg, bhupesh.linux, Peng Fan
[-- Attachment #1: Type: text/plain, Size: 2425 bytes --]
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.
--
Tom
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 659 bytes --]
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH 1/1] armv8: Fix compilation error with SYS_DCACHE_OFF
2023-08-11 14:01 ` Tom Rini
@ 2023-08-22 7:51 ` bhupesh.sharma
0 siblings, 0 replies; 3+ messages in thread
From: bhupesh.sharma @ 2023-08-22 7:51 UTC (permalink / raw)
To: Tom Rini, u-boot, sjg, bhupesh.linux, Peng Fan
On 8/11/23 7:31 PM, Tom Rini <trini@konsulko.com> wrote:
> 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.
Ok, I have sent a v2 accordingly. Please help review the same.
Thanks,
Bhupesh
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2023-08-22 7:52 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-08-11 5:42 [PATCH 1/1] armv8: Fix compilation error with SYS_DCACHE_OFF Bhupesh Sharma
2023-08-11 14:01 ` Tom Rini
2023-08-22 7:51 ` bhupesh.sharma
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox