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

Marcel Ziswiler marcel.ziswiler at toradex.com
Fri Apr 26 18:38:27 UTC 2019


Hi Peng and Stefano

Unfortunately, this seems to break Ethernet on Colibri iMX8X:

=> 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?

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://lists.denx.de/listinfo/u-boot


More information about the U-Boot mailing list