1
0

vector_gcc.S 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  1. /*
  2. * Copyright (c) 2006-2020, RT-Thread Development Team
  3. *
  4. * SPDX-License-Identifier: Apache-2.0
  5. *
  6. * Change Logs:
  7. * Date Author Notes
  8. * 2024-03-28 Shell Move vector handling codes from context_gcc.S
  9. */
  10. #ifndef __ASSEMBLY__
  11. #define __ASSEMBLY__
  12. #endif
  13. #include "../include/vector_gcc.h"
  14. #include "context_gcc.h"
  15. #include <rtconfig.h>
  16. #include <asm-generic.h>
  17. #include <asm-fpu.h>
  18. #include <armv8.h>
  19. .section .text
  20. vector_fiq:
  21. .align 8
  22. .globl vector_fiq
  23. SAVE_IRQ_CONTEXT
  24. bl rt_hw_trap_fiq
  25. b rt_hw_irq_exit
  26. .globl rt_thread_switch_interrupt_flag
  27. .globl rt_hw_context_switch_interrupt_do
  28. /**
  29. * void rt_hw_vector_irq_sched(void *eframe)
  30. * @brief do IRQ scheduling
  31. */
  32. rt_hw_vector_irq_sched:
  33. .globl rt_hw_vector_irq_sched
  34. .align 8
  35. /**
  36. * if rt_thread_switch_interrupt_flag set, jump to
  37. * rt_hw_context_switch_interrupt_do and don't return
  38. */
  39. ldr x1, =rt_thread_switch_interrupt_flag
  40. ldr x2, [x1]
  41. cmp x2, #1
  42. bne 1f
  43. /* clear flag */
  44. mov x2, #0
  45. str x2, [x1]
  46. bl rt_hw_context_switch_interrupt_do
  47. 1:
  48. b rt_hw_irq_exit