[U-Boot] [REGRESSION] [PATCH] imx: add lowlevel init for ARM64

Marcel Ziswiler marcel.ziswiler at toradex.com
Sun Apr 28 23:33:26 UTC 2019


On Sun, 2019-04-28 at 14:24 -0400, Joe Hershberger wrote:
> > On Apr 28, 2019, at 12:52 PM, Stefano Babic <sbabic at denx.de> wrote:
> > 
> > 
> > 
> > > On 27/04/19 01:58, Peng Fan wrote:
> > > Hi Marcel,
> > > 
> > > Please apply this patch, Joe has not pick it up.
> > > https://patchwork.ozlabs.org/patch/1085432/
> > > 
> > > Stefano,
> > > 
> > > Would you pick it up?
> > 
> > It is acked by Joe, i assign the patch to me in patchwork and I
> > pick it up.
> > 
> > Regards,
> > Stefano
> > 
> > > 
> > > > Subject: [REGRESSION] [PATCH] imx: add lowlevel init for ARM64
> > > > 
> > > > Hi Peng and Stefano
> > > > 
> > > > Unfortunately, this seems to break Ethernet on Colibri iMX8X:
> 
> Has this been addressed?

Yes, sorry. The following patch as suggested by Peng does fix it:

https://patchwork.ozlabs.org/patch/1085432/

Thanks!

> > > > => dhcp
> > > > "Error" handler, esr 0xbf000002
> > > > elr: 0000000080049664 lr : 000000008004964c (reloc)
> > > > elr: 00000000ffef6664 lr : 00000000ffef664c
> > > > x0 : 000000005b040288 x1 : 0000000000000001
> > > > x2 : 00000000fd6c5ff4 x3 : 0000000000000020
> > > > x4 : 00000000fd6c5ff0 x5 : 0000000000000020
> > > > x6 : 00000000ffef079c x7 : 00000000fd6f1600
> > > > x8 : 0000000000000044 x9 : 0000000000000008
> > > > x10: 00000000fd6d1620 x11: 00000000fd6d3a10
> > > > x12: 0000000000000000 x13: 0000000000000200
> > > > x14: 00000000fd6c62cc x15: 0000000000000002
> > > > x16: 0000000000002080 x17: 0000000000000000
> > > > x18: 00000000fd6cada8 x19: 00000000fd6d1160
> > > > x20: 0000000000000200 x21: 000000005b040300
> > > > x22: 00000000fd6f1000 x23: 00000000fd6cfdf0
> > > > x24: 00000000ffff8000 x25: 0000000000000000
> > > > x26: 0000000000000000 x27: 0000000000000000
> > > > x28: 00000000fd6d15c0 x29: 00000000fd6c6030
> > > > 
> > > > Resetting CPU ...
> > > > 
> > > > resetting ...
> > > > 
> > > > Reverting commit 5955c6eeb453 ("imx: add lowlevel init for
> > > > ARM64") makes
> > > > it work again.
> > > > 
> > > > Unfortunately, I don't have a MEK in my home office but will
> > > > check Ethernet
> > > > operation there on Monday as well.
> > > > 
> > > > Anyway, does anybody know what exactly is going on?
> > > 
> > > Regards,
> > > Peng.
> > > 
> > > > Cheers
> > > > 
> > > > Marcel
> > > > 
> > > > > On Mon, 2019-04-15 at 05:20 +0000, Peng Fan wrote:
> > > > > Sometimes we met SERROR, but only to catch it when Linux
> > > > > boots up.
> > > > > Let's enable catching in U-Boot to catch it ealier and ease
> > > > > debug.
> > > > > 
> > > > > Signed-off-by: Peng Fan <peng.fan at nxp.com>
> > > > > ---
> > > > > arch/arm/mach-imx/Makefile   |  2 +-
> > > > > arch/arm/mach-imx/lowlevel.S | 22 ++++++++++++++++++++++
> > > > > 2 files changed, 23 insertions(+), 1 deletion(-)  create mode
> > > > > 100644
> > > > > arch/arm/mach-imx/lowlevel.S
> > > > > 
> > > > > diff --git a/arch/arm/mach-imx/Makefile b/arch/arm/mach-
> > > > > imx/Makefile
> > > > > index c3ed62aed6..37675d0558 100644
> > > > > --- a/arch/arm/mach-imx/Makefile
> > > > > +++ b/arch/arm/mach-imx/Makefile
> > > > > @@ -204,7 +204,7 @@ endif
> > > > > 
> > > > > targets += $(addprefix ../../../,SPL spl/u-boot-spl.cfgout u-
> > > > > boot-
> > > > > dtb.cfgout u-boot.cfgout u-boot.uim spl/u-boot-nand-spl.imx)
> > > > > 
> > > > > -obj-$(CONFIG_ARM64) += sip.o
> > > > > +obj-$(CONFIG_ARM64) += lowlevel.o sip.o
> > > > > 
> > > > > obj-$(CONFIG_MX5) += mx5/
> > > > > obj-$(CONFIG_MX6) += mx6/
> > > > > diff --git a/arch/arm/mach-imx/lowlevel.S b/arch/arm/mach-
> > > > > imx/lowlevel.S new file mode 100644 index
> > > > > 0000000000..158fdb7d87
> > > > > --- /dev/null
> > > > > +++ b/arch/arm/mach-imx/lowlevel.S
> > > > > @@ -0,0 +1,22 @@
> > > > > +/* SPDX-License-Identifier: GPL-2.0+ */
> > > > > +/*
> > > > > + * Copyright 2019 NXP
> > > > > + */
> > > > > +
> > > > > +#include <linux/linkage.h>
> > > > > +
> > > > > +ENTRY(lowlevel_init)
> > > > > +    mrs    x0, CurrentEL
> > > > > +    cmp    x0, #8
> > > > > +    b.eq    1f
> > > > > +    ret
> > > > > +1:
> > > > > +    msr daifclr, #4
> > > > > +
> > > > > +    /* set HCR_EL2.AMO to catch SERROR */
> > > > > +    mrs    x0, hcr_el2
> > > > > +    orr    x0, x0, #0x20
> > > > > +    msr    hcr_el2, x0
> > > > > +    isb
> > > > > +    ret
> > > > > +ENDPROC(lowlevel_init)
> > > > > --
> > > > > 2.16.4
> > > > > 
> > > > > _______________________________________________
> > > > > U-Boot mailing list
> > > > > U-Boot at lists.denx.de
> > > > > https://eur01.safelinks.protection.outlook.com/?url=https%3A%2F%2Flist
> > > > > 
> > > > s.denx.de%2Flistinfo%2Fu-
> > > > boot&data=02%7C01%7Cpeng.fan%40nxp.co
> > > > m%7C
> > > > d671eca9f1cc4d06a7d008d6ca7661b1%7C686ea1d3bc2b4c6fa92cd99c5c30
> > > > 1635%7C
> > > > 0%7C0%7C636919007134459412&sdata=R6xBpoVJHL7meQkRkBi1I8vg
> > > > MgOTXlFEA
> > > > > QfMePrDdSc%3D&reserved=0
> > _______________________________________________
> > U-Boot mailing list
> > U-Boot at lists.denx.de
> > https://lists.denx.de/listinfo/u-boot


More information about the U-Boot mailing list