diff options
author | Peng Fan <peng.fan@nxp.com> | 2019-04-15 05:20:43 +0000 |
---|---|---|
committer | Stefano Babic <sbabic@denx.de> | 2019-04-25 19:16:24 +0200 |
commit | 7a0c9b08886e5dc7d50e640ed56eed0fe612161f (patch) | |
tree | 2639e475699ef705052c814d8fc0128da7ad03fc /arch/arm/mach-imx/lowlevel.S | |
parent | 4eceb4bc8bb996050e0b890819f5340c72da59aa (diff) |
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>
Diffstat (limited to 'arch/arm/mach-imx/lowlevel.S')
-rw-r--r-- | arch/arm/mach-imx/lowlevel.S | 22 |
1 files changed, 22 insertions, 0 deletions
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) |