syscall_rvds.lst 6.4 KB

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