[PATCH v1 3/3] arm: npcm8xx: support dcache off

Jim Liu jim.t90615 at gmail.com
Wed Oct 4 03:56:05 CEST 2023


Hi Tom

Thanks for your reply.
I will create another thread for this topic.

Best regards,
Jim

On Mon, Oct 2, 2023 at 7:04 AM Tom Rini <trini at konsulko.com> wrote:
>
> On Mon, Oct 02, 2023 at 12:40:54AM -0700, Jim Liu wrote:
>
> > Hi Tom
> >
> > I followed your suggestion to modify the code.
> > but still have errors.
> > Should I use my workaround?
>
> No, please figure out the errors, or at least post what you've got,
> thanks.
>
> >
> > Best regards,
> > Jim
> >
> > On Thu, Sep 28, 2023 at 9:17 AM Tom Rini <trini at konsulko.com> wrote:
> > >
> > > On Thu, Sep 28, 2023 at 10:32:51PM +0800, Jim Liu wrote:
> > > > Hi  Tom
> > > >
> > > > Thanks for your understanding.
> > > > but  this patch  is an incomplete patch.
> > > > After I applied this patch  I had another error.
> > > >
> > > > arch/arm/cpu/armv8/cache_v8.c:773:2: error: #error Please describe
> > > > your MMU layout in CONFIG_SYS_MEM_MAP and enable dcache.
> > > >   773 | #error Please describe your MMU layout in CONFIG_SYS_MEM_MAP
> > > > and enable dcache.
> > > >
> > > > This error is the same as that link.
> > >
> > > Please use that patch as a starting point (and also possibly needing to
> > > grab
> > > https://patchwork.ozlabs.org/project/uboot/patch/20230822075112.717992-2-bhupesh.sharma@linaro.org/
> > > as that's how I'd like to proceed with addressing this generic armv8
> > > issue, thanks!
> > >
> > > >
> > > > Best regards,
> > > > Jim
> > > >
> > > > On Thu, Sep 28, 2023 at 8:23 PM Tom Rini <trini at konsulko.com> wrote:
> > > > >
> > > > > On Thu, Sep 28, 2023 at 08:49:23AM +0800, Jim Liu wrote:
> > > > > > Hi Tom
> > > > > >
> > > > > > Thanks for the quick review.
> > > > > >
> > > > > > if we set the CONFIG_SYS_DCACHE_OFF the  armv8 will build error.
> > > > > > So we added a workaround for our bmc uboot.
> > > > > >
> > > > > > the error message as below:
> > > > > >
> > > > > > CONFIG_SYS_DCACHE_OFF can't be enabled on armv8, or the following
> > > > > > build error would happen.
> > > > > >
> > > > > > arch/arm/cpu/armv8/cpu.o: in function `cleanup_before_linux':
> > > > > > arch/arm/cpu/armv8/cpu.c:60: undefined reference to `icache_disable'
> > > > > > arch/arm/cpu/armv8/cpu.c:68: undefined reference to `dcache_disable'
> > > > > > arch/arm/cpu/armv8/cpu.c:69: undefined reference to `invalidate_dcache_all'
> > > > >
> > > > > OK, so you need
> > > > > https://patchwork.ozlabs.org/project/uboot/patch/20230811054228.3721455-1-bhupesh.sharma@linaro.org/
> > > > > to be applied, as-is, yes? Thanks!
> > > > >
> > > > > >
> > > > > > Best regards,
> > > > > > Jim
> > > > > >
> > > > > > On Tue, Sep 26, 2023 at 9:48 PM Tom Rini <trini at konsulko.com> wrote:
> > > > > > >
> > > > > > > On Tue, Sep 26, 2023 at 04:56:50PM +0800, Jim Liu wrote:
> > > > > > >
> > > > > > > > do not enable dcache by setting CONFIG_SYS_NPCM_DCACHE_OFF=y
> > > > > > > >
> > > > > > > > Signed-off-by: Jim Liu <JJLIU0 at nuvoton.com>
> > > > > > > > ---
> > > > > > > >  arch/arm/mach-npcm/npcm8xx/Kconfig |  4 ++++
> > > > > > > >  arch/arm/mach-npcm/npcm8xx/cpu.c   | 12 +++++++++++-
> > > > > > > >  2 files changed, 15 insertions(+), 1 deletion(-)
> > > > > > > >
> > > > > > > > diff --git a/arch/arm/mach-npcm/npcm8xx/Kconfig b/arch/arm/mach-npcm/npcm8xx/Kconfig
> > > > > > > > index 5f4a0506dc..163e7e7d48 100644
> > > > > > > > --- a/arch/arm/mach-npcm/npcm8xx/Kconfig
> > > > > > > > +++ b/arch/arm/mach-npcm/npcm8xx/Kconfig
> > > > > > > > @@ -6,6 +6,10 @@ config SYS_CPU
> > > > > > > >  config SYS_SOC
> > > > > > > >       default "npcm8xx"
> > > > > > > >
> > > > > > > > +config SYS_NPCM_DCACHE_OFF
> > > > > > > > +     bool "Do not enable dcache"
> > > > > > > > +     default n
> > > > > > > > +
> > > > > > > >  config TARGET_ARBEL_EVB
> > > > > > > >       bool "Arbel Evaluation Board"
> > > > > > > >       help
> > > > > > >
> > > > > > > Why do we need a new Kconfig option here on top of the existing generic
> > > > > > > ones to control cache?
> > > > > > >
> > > > > > > --
> > > > > > > Tom
> > > > >
> > > > > --
> > > > > Tom
> > >
> > > --
> > > Tom
>
> --
> Tom


More information about the U-Boot mailing list