blob: 158fdb7d87b54757c9744259cb3f8555955aac95 [file] [log] [blame]
Peng Fan7a0c9b02019-04-15 05:20:43 +00001/* SPDX-License-Identifier: GPL-2.0+ */
2/*
3 * Copyright 2019 NXP
4 */
5
6#include <linux/linkage.h>
7
8ENTRY(lowlevel_init)
9 mrs x0, CurrentEL
10 cmp x0, #8
11 b.eq 1f
12 ret
131:
14 msr daifclr, #4
15
16 /* set HCR_EL2.AMO to catch SERROR */
17 mrs x0, hcr_el2
18 orr x0, x0, #0x20
19 msr hcr_el2, x0
20 isb
21 ret
22ENDPROC(lowlevel_init)