1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
|
ARM Macro Assembler Page 1
1 00000000 ;/*
2 00000000 ; * Copyright (c) 2006-2022, RT-Thread Development Team
3 00000000 ; *
4 00000000 ; * SPDX-License-Identifier: Apache-2.0
5 00000000 ; *
6 00000000 ; * Change Logs:
7 00000000 ; * Date Author Notes
8 00000000 ; * 2019-10-25 tyx first version
9 00000000 ; */
10 00000000
11 00000000 AREA |.text|, CODE, READONLY, ALIGN=
2
12 00000000 THUMB
13 00000000 REQUIRE8
14 00000000 PRESERVE8
15 00000000
16 00000000 IMPORT rt_secure_svc_handle
17 00000000
18 00000000 ;/*
19 00000000 ; * int tzcall(int id, rt_ubase_t arg0, rt_ubase_t arg1,
rt_ubase_t arg2);
20 00000000 ; */
21 00000000 tzcall PROC
22 00000000 EXPORT tzcall
23 00000000 DF01 SVC 1 ;call SVC 1
24 00000002 4770 BX LR
25 00000004
26 00000004 ENDP
27 00000004
28 00000004 tzcall_entry
PROC
29 00000004 B512 PUSH {R1, R4, LR}
30 00000006 460C MOV R4, R1 ; copy thread SP to
R4
31 00000008 CC0F LDMFD R4!, {r0 - r3} ; pop user stack
, get input arg0, a
rg1, arg2
32 0000000A E924 000F STMFD R4!, {r0 - r3} ; push stack, us
er stack recovery
33 0000000E F7FF FFFE BL rt_secure_svc_handle ; call fun
34 00000012 E8BD 4012 POP {R1, R4, LR}
35 00000016 6008 STR R0, [R1] ; update return val
ue
36 00000018 4770 BX LR ; return to thread
37 0000001A
38 0000001A ENDP
39 0000001A
40 0000001A syscall_entry
PROC
41 0000001A 4770 BX LR ; return to user ap
p
42 0000001C
43 0000001C ENDP
44 0000001C
45 0000001C ;/*
46 0000001C ; * void SVC_Handler(void);
47 0000001C ; */
48 0000001C SVC_Handler
ARM Macro Assembler Page 2
PROC
49 0000001C EXPORT SVC_Handler
50 0000001C
51 0000001C ; get SP, save to R1
52 0000001C F3EF 8108 MRS R1, MSP ;get fault context
from handler
53 00000020 F01E 0F04 TST LR, #0x04 ;if(!EXC_RETURN[2])
54 00000024 D001 BEQ get_sp_done
55 00000026 F3EF 8109 MRS R1, PSP ;get fault context
from thread
56 0000002A get_sp_done
57 0000002A
58 0000002A ; get svc index
59 0000002A 6988 LDR R0, [R1, #24]
60 0000002C F810 0C02 LDRB R0, [R0, #-2]
61 00000030
62 00000030 ;if svc == 0, do system call
63 00000030 2800 CMP R0, #0x0
64 00000032 D0FE BEQ syscall_entry
65 00000034
66 00000034 ;if svc == 1, do TrustZone call
67 00000034 2801 CMP R0, #0x1
68 00000036 D0FE BEQ tzcall_entry
69 00000038
70 00000038 ENDP
71 00000038
72 00000038 ALIGN
73 00000038
74 00000038 END
Command Line: --debug --xref --diag_suppress=9931 --cpu=Cortex-M33 --fpu=FPv5-S
P --depend=.\build\keil\obj\syscall_rvds.d -o.\build\keil\obj\syscall_rvds.o -I
D:\1_tool_prog\2_MDK\pack\Keil\STM32H5xx_DFP\1.1.0\Drivers\CMSIS\Device\ST\STM3
2H5xx\Include --predefine="__UVISION_VERSION SETA 536" --predefine="STM32H563xx
SETA 1" --list=syscall_rvds.lst ..\..\..\libcpu\arm\cortex-m33\syscall_rvds.S
ARM Macro Assembler Page 1 Alphabetic symbol ordering
Relocatable symbols
.text 00000000
Symbol: .text
Definitions
At line 11 in file ..\..\..\libcpu\arm\cortex-m33\syscall_rvds.S
Uses
None
Comment: .text unused
SVC_Handler 0000001C
Symbol: SVC_Handler
Definitions
At line 48 in file ..\..\..\libcpu\arm\cortex-m33\syscall_rvds.S
Uses
At line 49 in file ..\..\..\libcpu\arm\cortex-m33\syscall_rvds.S
Comment: SVC_Handler used once
get_sp_done 0000002A
Symbol: get_sp_done
Definitions
At line 56 in file ..\..\..\libcpu\arm\cortex-m33\syscall_rvds.S
Uses
At line 54 in file ..\..\..\libcpu\arm\cortex-m33\syscall_rvds.S
Comment: get_sp_done used once
syscall_entry 0000001A
Symbol: syscall_entry
Definitions
At line 40 in file ..\..\..\libcpu\arm\cortex-m33\syscall_rvds.S
Uses
At line 64 in file ..\..\..\libcpu\arm\cortex-m33\syscall_rvds.S
Comment: syscall_entry used once
tzcall 00000000
Symbol: tzcall
Definitions
At line 21 in file ..\..\..\libcpu\arm\cortex-m33\syscall_rvds.S
Uses
At line 22 in file ..\..\..\libcpu\arm\cortex-m33\syscall_rvds.S
Comment: tzcall used once
tzcall_entry 00000004
Symbol: tzcall_entry
Definitions
At line 28 in file ..\..\..\libcpu\arm\cortex-m33\syscall_rvds.S
Uses
At line 68 in file ..\..\..\libcpu\arm\cortex-m33\syscall_rvds.S
Comment: tzcall_entry used once
6 symbols
ARM Macro Assembler Page 1 Alphabetic symbol ordering
External symbols
rt_secure_svc_handle 00000000
Symbol: rt_secure_svc_handle
Definitions
At line 16 in file ..\..\..\libcpu\arm\cortex-m33\syscall_rvds.S
Uses
At line 33 in file ..\..\..\libcpu\arm\cortex-m33\syscall_rvds.S
Comment: rt_secure_svc_handle used once
1 symbol
340 symbols in table
|