3 * David Feng <fenghua@phytium.com.cn>
5 * SPDX-License-Identifier: GPL-2.0+
8 #include <asm-offsets.h>
10 #include <asm/ptrace.h>
11 #include <asm/macro.h>
12 #include <linux/linkage.h>
20 .align 7 /* Current EL Synchronous Thread */
21 stp x29, x30, [sp, #-16]!
26 .align 7 /* Current EL IRQ Thread */
27 stp x29, x30, [sp, #-16]!
32 .align 7 /* Current EL FIQ Thread */
33 stp x29, x30, [sp, #-16]!
38 .align 7 /* Current EL Error Thread */
39 stp x29, x30, [sp, #-16]!
44 .align 7 /* Current EL Synchronous Handler */
45 stp x29, x30, [sp, #-16]!
50 .align 7 /* Current EL IRQ Handler */
51 stp x29, x30, [sp, #-16]!
56 .align 7 /* Current EL FIQ Handler */
57 stp x29, x30, [sp, #-16]!
62 .align 7 /* Current EL Error Handler */
63 stp x29, x30, [sp, #-16]!
70 * This will save the processor state that is ELR/X0~X30
74 stp x27, x28, [sp, #-16]!
75 stp x25, x26, [sp, #-16]!
76 stp x23, x24, [sp, #-16]!
77 stp x21, x22, [sp, #-16]!
78 stp x19, x20, [sp, #-16]!
79 stp x17, x18, [sp, #-16]!
80 stp x15, x16, [sp, #-16]!
81 stp x13, x14, [sp, #-16]!
82 stp x11, x12, [sp, #-16]!
83 stp x9, x10, [sp, #-16]!
84 stp x7, x8, [sp, #-16]!
85 stp x5, x6, [sp, #-16]!
86 stp x3, x4, [sp, #-16]!
87 stp x1, x2, [sp, #-16]!
89 /* Could be running at EL3/EL2/EL1 */
90 switch_el x11, 3f, 2f, 1f
100 stp x2, x0, [sp, #-16]!
107 switch_el x11, 3f, 2f, 1f
118 ldp x9, x10, [sp],#16
119 ldp x11, x12, [sp],#16
120 ldp x13, x14, [sp],#16
121 ldp x15, x16, [sp],#16
122 ldp x17, x18, [sp],#16
123 ldp x19, x20, [sp],#16
124 ldp x21, x22, [sp],#16
125 ldp x23, x24, [sp],#16
126 ldp x25, x26, [sp],#16
127 ldp x27, x28, [sp],#16
128 ldp x29, x30, [sp],#16