2024-06-28 00:23:09 +08:00
|
|
|
/*
|
|
|
|
* Copyright (c) 2006-2020, RT-Thread Development Team
|
|
|
|
*
|
|
|
|
* SPDX-License-Identifier: Apache-2.0
|
|
|
|
*
|
|
|
|
* Change Logs:
|
|
|
|
* Date Author Notes
|
|
|
|
* 2024-03-28 Shell Move vector handling codes from context_gcc.S
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef __ASSEMBLY__
|
|
|
|
#define __ASSEMBLY__
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#include "../include/vector_gcc.h"
|
|
|
|
#include "context_gcc.h"
|
|
|
|
|
|
|
|
#include <rtconfig.h>
|
|
|
|
#include <asm-generic.h>
|
|
|
|
#include <asm-fpu.h>
|
|
|
|
#include <armv8.h>
|
|
|
|
|
|
|
|
.section .text
|
|
|
|
|
2024-08-27 12:45:12 +08:00
|
|
|
vector_fiq:
|
2024-06-28 00:23:09 +08:00
|
|
|
.align 8
|
|
|
|
.globl vector_fiq
|
2024-08-27 12:45:12 +08:00
|
|
|
|
2024-06-28 00:23:09 +08:00
|
|
|
SAVE_IRQ_CONTEXT
|
|
|
|
bl rt_hw_trap_fiq
|
2024-09-14 10:52:46 +08:00
|
|
|
|
|
|
|
b rt_hw_irq_exit
|
2024-06-28 00:23:09 +08:00
|
|
|
|
|
|
|
.globl rt_thread_switch_interrupt_flag
|
2024-04-18 17:12:10 +08:00
|
|
|
.globl rt_hw_context_switch_interrupt_do
|
2024-06-28 00:23:09 +08:00
|
|
|
|
2024-08-27 12:45:12 +08:00
|
|
|
/**
|
|
|
|
* void rt_hw_vector_irq_sched(void *eframe)
|
|
|
|
* @brief do IRQ scheduling
|
|
|
|
*/
|
|
|
|
rt_hw_vector_irq_sched:
|
|
|
|
.globl rt_hw_vector_irq_sched
|
2024-06-28 00:23:09 +08:00
|
|
|
.align 8
|
|
|
|
|
|
|
|
/**
|
|
|
|
* if rt_thread_switch_interrupt_flag set, jump to
|
|
|
|
* rt_hw_context_switch_interrupt_do and don't return
|
|
|
|
*/
|
|
|
|
ldr x1, =rt_thread_switch_interrupt_flag
|
|
|
|
ldr x2, [x1]
|
|
|
|
cmp x2, #1
|
2024-08-27 12:45:12 +08:00
|
|
|
bne 1f
|
2024-06-28 00:23:09 +08:00
|
|
|
|
2024-08-27 12:45:12 +08:00
|
|
|
/* clear flag */
|
|
|
|
mov x2, #0
|
2024-06-28 00:23:09 +08:00
|
|
|
str x2, [x1]
|
|
|
|
|
2024-04-18 17:12:10 +08:00
|
|
|
bl rt_hw_context_switch_interrupt_do
|
2024-06-28 00:23:09 +08:00
|
|
|
|
2024-08-27 12:45:12 +08:00
|
|
|
1:
|
|
|
|
b rt_hw_irq_exit
|