Peng Fan | fbf7f08 | 2019-04-15 05:20:43 +0000 | [diff] [blame] | 1 | /* SPDX-License-Identifier: GPL-2.0+ */ |
2 | /* | ||||
3 | * Copyright 2019 NXP | ||||
4 | */ | ||||
5 | |||||
6 | #include <linux/linkage.h> | ||||
7 | |||||
8 | ENTRY(lowlevel_init) | ||||
9 | mrs x0, CurrentEL | ||||
10 | cmp x0, #8 | ||||
11 | b.eq 1f | ||||
12 | ret | ||||
13 | 1: | ||||
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 | ||||
22 | ENDPROC(lowlevel_init) |