2 * Contains CPU specific branch predictor invalidation sequences
4 * Copyright (C) 2018 ARM Ltd.
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License version 2 as
8 * published by the Free Software Foundation.
10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
15 * You should have received a copy of the GNU General Public License
16 * along with this program. If not, see <http://www.gnu.org/licenses/>.
19 #include <linux/linkage.h>
20 #include <linux/arm-smccc.h>
30 ventry \target + 0x000
31 ventry \target + 0x080
32 ventry \target + 0x100
33 ventry \target + 0x180
35 ventry \target + 0x200
36 ventry \target + 0x280
37 ventry \target + 0x300
38 ventry \target + 0x380
40 ventry \target + 0x400
41 ventry \target + 0x480
42 ventry \target + 0x500
43 ventry \target + 0x580
45 ventry \target + 0x600
46 ventry \target + 0x680
47 ventry \target + 0x700
48 ventry \target + 0x780
52 ENTRY(__bp_harden_hyp_vecs_start)
54 vectors __kvm_hyp_vector
56 ENTRY(__bp_harden_hyp_vecs_end)
58 .macro smccc_workaround_1 inst
60 stp x2, x3, [sp, #(8 * 0)]
61 stp x0, x1, [sp, #(8 * 2)]
62 mov w0, #ARM_SMCCC_ARCH_WORKAROUND_1
64 ldp x2, x3, [sp, #(8 * 0)]
65 ldp x0, x1, [sp, #(8 * 2)]
69 ENTRY(__smccc_workaround_1_smc_start)
70 smccc_workaround_1 smc
71 ENTRY(__smccc_workaround_1_smc_end)
73 ENTRY(__smccc_workaround_1_hvc_start)
74 smccc_workaround_1 hvc
75 ENTRY(__smccc_workaround_1_hvc_end)
77 ENTRY(__smccc_workaround_3_smc_start)
79 stp x2, x3, [sp, #(8 * 0)]
80 stp x0, x1, [sp, #(8 * 2)]
81 mov w0, #ARM_SMCCC_ARCH_WORKAROUND_3
83 ldp x2, x3, [sp, #(8 * 0)]
84 ldp x0, x1, [sp, #(8 * 2)]
86 ENTRY(__smccc_workaround_3_smc_end)
88 ENTRY(__spectre_bhb_loop_k8_start)
90 stp x0, x1, [sp, #(8 * 0)]
97 ldp x0, x1, [sp, #(8 * 0)]
99 ENTRY(__spectre_bhb_loop_k8_end)
101 ENTRY(__spectre_bhb_loop_k24_start)
103 stp x0, x1, [sp, #(8 * 0)]
110 ldp x0, x1, [sp, #(8 * 0)]
112 ENTRY(__spectre_bhb_loop_k24_end)
114 ENTRY(__spectre_bhb_loop_k32_start)
116 stp x0, x1, [sp, #(8 * 0)]
123 ldp x0, x1, [sp, #(8 * 0)]
125 ENTRY(__spectre_bhb_loop_k32_end)
127 ENTRY(__spectre_bhb_clearbhb_start)
128 hint #22 /* aka clearbhb */
130 ENTRY(__spectre_bhb_clearbhb_end)