public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Tom Rini <trini@konsulko.com>
To: Bhupesh Sharma <bhupesh.sharma@linaro.org>
Cc: u-boot@lists.denx.de, sjg@chromium.org, bhupesh.linux@gmail.com,
	Peng Fan <peng.fan@nxp.com>
Subject: Re: [PATCH 1/1] armv8: Fix compilation error with SYS_DCACHE_OFF
Date: Fri, 11 Aug 2023 10:01:36 -0400	[thread overview]
Message-ID: <20230811140136.GD3630934@bill-the-cat> (raw)
In-Reply-To: <20230811054228.3721455-1-bhupesh.sharma@linaro.org>

[-- 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 --]

  reply	other threads:[~2023-08-11 14:01 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 [this message]
2023-08-22  7:51   ` bhupesh.sharma

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20230811140136.GD3630934@bill-the-cat \
    --to=trini@konsulko.com \
    --cc=bhupesh.linux@gmail.com \
    --cc=bhupesh.sharma@linaro.org \
    --cc=peng.fan@nxp.com \
    --cc=sjg@chromium.org \
    --cc=u-boot@lists.denx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox