mirror of
https://github.com/AsahiLinux/u-boot
synced 2024-11-11 07:34:31 +00:00
imx: add lowlevel init for ARM64
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@nxp.com>
This commit is contained in:
parent
4eceb4bc8b
commit
7a0c9b0888
2 changed files with 23 additions and 1 deletions
|
@ -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/
|
||||
|
|
22
arch/arm/mach-imx/lowlevel.S
Normal file
22
arch/arm/mach-imx/lowlevel.S
Normal file
|
@ -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)
|
Loading…
Reference in a new issue