Skip to content

Commit

Permalink
move the swi interrupt to tx_initialize_low_level.S.
Browse files Browse the repository at this point in the history
  • Loading branch information
yajunxiaMS committed Dec 12, 2023
1 parent 7653725 commit 220cb42
Show file tree
Hide file tree
Showing 16 changed files with 33 additions and 215 deletions.
13 changes: 0 additions & 13 deletions ports/cortex_a12/ac6/src/tx_thread_schedule.S
Original file line number Diff line number Diff line change
Expand Up @@ -40,19 +40,6 @@
#define IRQ_MODE 0x12 // IRQ mode
#define SVC_MODE 0x13 // SVC mode

/**************************************************************************/
/* SVC exception */
/**************************************************************************/
/* SVC is only used by the ModuleManager but the symbol is needed even if it is not used. */
#if defined(THUMB_MODE)
.thumb_func
#endif
.global __tx_swi_interrupt
__tx_swi_interrupt:
BKPT 0x0000
__tx_swi_interrupt_loop:
B __tx_swi_interrupt_loop

/**************************************************************************/
/* */
/* FUNCTION RELEASE */
Expand Down
13 changes: 0 additions & 13 deletions ports/cortex_a12/gnu/src/tx_thread_schedule.S
Original file line number Diff line number Diff line change
Expand Up @@ -40,19 +40,6 @@
#define IRQ_MODE 0x12 // IRQ mode
#define SVC_MODE 0x13 // SVC mode

/**************************************************************************/
/* SVC exception */
/**************************************************************************/
/* SVC is only used by the ModuleManager but the symbol is needed even if it is not used. */
#if defined(THUMB_MODE)
.thumb_func
#endif
.global __tx_swi_interrupt
__tx_swi_interrupt:
BKPT 0x0000
__tx_swi_interrupt_loop:
B __tx_swi_interrupt_loop

/**************************************************************************/
/* */
/* FUNCTION RELEASE */
Expand Down
13 changes: 0 additions & 13 deletions ports/cortex_a15/ac6/src/tx_thread_schedule.S
Original file line number Diff line number Diff line change
Expand Up @@ -40,19 +40,6 @@
#define IRQ_MODE 0x12 // IRQ mode
#define SVC_MODE 0x13 // SVC mode

/**************************************************************************/
/* SVC exception */
/**************************************************************************/
/* SVC is only used by the ModuleManager but the symbol is needed even if it is not used. */
#if defined(THUMB_MODE)
.thumb_func
#endif
.global __tx_swi_interrupt
__tx_swi_interrupt:
BKPT 0x0000
__tx_swi_interrupt_loop:
B __tx_swi_interrupt_loop

/**************************************************************************/
/* */
/* FUNCTION RELEASE */
Expand Down
13 changes: 0 additions & 13 deletions ports/cortex_a15/gnu/src/tx_thread_schedule.S
Original file line number Diff line number Diff line change
Expand Up @@ -40,19 +40,6 @@
#define IRQ_MODE 0x12 // IRQ mode
#define SVC_MODE 0x13 // SVC mode

/**************************************************************************/
/* SVC exception */
/**************************************************************************/
/* SVC is only used by the ModuleManager but the symbol is needed even if it is not used. */
#if defined(THUMB_MODE)
.thumb_func
#endif
.global __tx_swi_interrupt
__tx_swi_interrupt:
BKPT 0x0000
__tx_swi_interrupt_loop:
B __tx_swi_interrupt_loop

/**************************************************************************/
/* */
/* FUNCTION RELEASE */
Expand Down
13 changes: 0 additions & 13 deletions ports/cortex_a17/ac6/src/tx_thread_schedule.S
Original file line number Diff line number Diff line change
Expand Up @@ -40,19 +40,6 @@
#define IRQ_MODE 0x12 // IRQ mode
#define SVC_MODE 0x13 // SVC mode

/**************************************************************************/
/* SVC exception */
/**************************************************************************/
/* SVC is only used by the ModuleManager but the symbol is needed even if it is not used. */
#if defined(THUMB_MODE)
.thumb_func
#endif
.global __tx_swi_interrupt
__tx_swi_interrupt:
BKPT 0x0000
__tx_swi_interrupt_loop:
B __tx_swi_interrupt_loop

/**************************************************************************/
/* */
/* FUNCTION RELEASE */
Expand Down
13 changes: 0 additions & 13 deletions ports/cortex_a17/gnu/src/tx_thread_schedule.S
Original file line number Diff line number Diff line change
Expand Up @@ -40,19 +40,6 @@
#define IRQ_MODE 0x12 // IRQ mode
#define SVC_MODE 0x13 // SVC mode

/**************************************************************************/
/* SVC exception */
/**************************************************************************/
/* SVC is only used by the ModuleManager but the symbol is needed even if it is not used. */
#if defined(THUMB_MODE)
.thumb_func
#endif
.global __tx_swi_interrupt
__tx_swi_interrupt:
BKPT 0x0000
__tx_swi_interrupt_loop:
B __tx_swi_interrupt_loop

/**************************************************************************/
/* */
/* FUNCTION RELEASE */
Expand Down
13 changes: 0 additions & 13 deletions ports/cortex_a5/ac6/src/tx_thread_schedule.S
Original file line number Diff line number Diff line change
Expand Up @@ -40,19 +40,6 @@
#define IRQ_MODE 0x12 // IRQ mode
#define SVC_MODE 0x13 // SVC mode

/**************************************************************************/
/* SVC exception */
/**************************************************************************/
/* SVC is only used by the ModuleManager but the symbol is needed even if it is not used. */
#if defined(THUMB_MODE)
.thumb_func
#endif
.global __tx_swi_interrupt
__tx_swi_interrupt:
BKPT 0x0000
__tx_swi_interrupt_loop:
B __tx_swi_interrupt_loop

/**************************************************************************/
/* */
/* FUNCTION RELEASE */
Expand Down
13 changes: 0 additions & 13 deletions ports/cortex_a5/gnu/src/tx_thread_schedule.S
Original file line number Diff line number Diff line change
Expand Up @@ -40,19 +40,6 @@
#define IRQ_MODE 0x12 // IRQ mode
#define SVC_MODE 0x13 // SVC mode

/**************************************************************************/
/* SVC exception */
/**************************************************************************/
/* SVC is only used by the ModuleManager but the symbol is needed even if it is not used. */
#if defined(THUMB_MODE)
.thumb_func
#endif
.global __tx_swi_interrupt
__tx_swi_interrupt:
BKPT 0x0000
__tx_swi_interrupt_loop:
B __tx_swi_interrupt_loop

/**************************************************************************/
/* */
/* FUNCTION RELEASE */
Expand Down
13 changes: 0 additions & 13 deletions ports/cortex_a7/ac6/src/tx_thread_schedule.S
Original file line number Diff line number Diff line change
Expand Up @@ -40,19 +40,6 @@
#define IRQ_MODE 0x12 // IRQ mode
#define SVC_MODE 0x13 // SVC mode

/**************************************************************************/
/* SVC exception */
/**************************************************************************/
/* SVC is only used by the ModuleManager but the symbol is needed even if it is not used. */
#if defined(THUMB_MODE)
.thumb_func
#endif
.global __tx_swi_interrupt
__tx_swi_interrupt:
BKPT 0x0000
__tx_swi_interrupt_loop:
B __tx_swi_interrupt_loop

/**************************************************************************/
/* */
/* FUNCTION RELEASE */
Expand Down
53 changes: 33 additions & 20 deletions ports/cortex_a7/gnu/example_build/tx_initialize_low_level.S
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,12 @@
#include "tx_user.h"
#endif

.syntax unified
#if defined(THUMB_MODE)
.thumb
#else
.arm
#endif

SVC_MODE = 0xD3 // Disable IRQ/FIQ SVC mode
IRQ_MODE = 0xD2 // Disable IRQ/FIQ IRQ mode
Expand All @@ -48,22 +53,6 @@ SYS_STACK_SIZE = 1024 // System stack size
.global enableCaches
.global init_private_timer
.global start_private_timer
/* Define the 16-bit Thumb mode veneer for _tx_initialize_low_level for
applications calling this function from to 16-bit Thumb mode. */

.text
.align 2
.thumb
.global $_tx_initialize_low_level
.type $_tx_initialize_low_level,function
$_tx_initialize_low_level:
BX pc // Switch to 32-bit mode
NOP //
.arm
STMFD sp!, {lr} // Save return address
BL _tx_initialize_low_level // Call _tx_initialize_low_level function
LDMFD sp!, {lr} // Recover saved return address
BX lr // Return to 16-bit caller

.text
.align 2
Expand Down Expand Up @@ -113,6 +102,9 @@ $_tx_initialize_low_level:
/* resulting in version 6.3.0 */
/* */
/**************************************************************************/
#if defined(THUMB_MODE)
.thumb_func
#endif
.global _tx_initialize_low_level
.type _tx_initialize_low_level,function
_tx_initialize_low_level:
Expand Down Expand Up @@ -201,34 +193,49 @@ _stack_error_loop:
BL start_private_timer

POP {lr}
#ifdef __THUMB_INTERWORK

BX lr // Return to caller
#else
MOV pc, lr // Return to caller
#endif

/* Define shells for each of the interrupt vectors. */

#if defined(THUMB_MODE)
.thumb_func
#endif
.global __tx_undefined
__tx_undefined:
B __tx_undefined // Undefined handler

#if defined(THUMB_MODE)
.thumb_func
#endif
.global __tx_swi_interrupt
__tx_swi_interrupt:
B __tx_swi_interrupt // Software interrupt handler

#if defined(THUMB_MODE)
.thumb_func
#endif
.global __tx_prefetch_handler
__tx_prefetch_handler:
B __tx_prefetch_handler // Prefetch exception handler

#if defined(THUMB_MODE)
.thumb_func
#endif
.global __tx_abort_handler
__tx_abort_handler:
B __tx_abort_handler // Abort exception handler

#if defined(THUMB_MODE)
.thumb_func
#endif
.global __tx_reserved_handler
__tx_reserved_handler:
B __tx_reserved_handler // Reserved exception handler

#if defined(THUMB_MODE)
.thumb_func
#endif
.global __tx_irq_handler
.global __tx_irq_processing_return
__tx_irq_handler:
Expand Down Expand Up @@ -302,6 +309,9 @@ by_pass_timer_interrupt:


#ifdef TX_ENABLE_FIQ_SUPPORT
#if defined(THUMB_MODE)
.thumb_func
#endif
.global __tx_fiq_handler
.global __tx_fiq_processing_return
__tx_fiq_handler:
Expand Down Expand Up @@ -336,6 +346,9 @@ __tx_fiq_processing_return:


#else
#if defined(THUMB_MODE)
.thumb_func
#endif
.global __tx_fiq_handler
__tx_fiq_handler:
B __tx_fiq_handler // FIQ interrupt handler
Expand Down
13 changes: 0 additions & 13 deletions ports/cortex_a7/gnu/src/tx_thread_schedule.S
Original file line number Diff line number Diff line change
Expand Up @@ -40,19 +40,6 @@
#define IRQ_MODE 0x12 // IRQ mode
#define SVC_MODE 0x13 // SVC mode

/**************************************************************************/
/* SVC exception */
/**************************************************************************/
/* SVC is only used by the ModuleManager but the symbol is needed even if it is not used. */
#if defined(THUMB_MODE)
.thumb_func
#endif
.global __tx_swi_interrupt
__tx_swi_interrupt:
BKPT 0x0000
__tx_swi_interrupt_loop:
B __tx_swi_interrupt_loop

/**************************************************************************/
/* */
/* FUNCTION RELEASE */
Expand Down
13 changes: 0 additions & 13 deletions ports/cortex_a8/ac6/src/tx_thread_schedule.S
Original file line number Diff line number Diff line change
Expand Up @@ -40,19 +40,6 @@
#define IRQ_MODE 0x12 // IRQ mode
#define SVC_MODE 0x13 // SVC mode

/**************************************************************************/
/* SVC exception */
/**************************************************************************/
/* SVC is only used by the ModuleManager but the symbol is needed even if it is not used. */
#if defined(THUMB_MODE)
.thumb_func
#endif
.global __tx_swi_interrupt
__tx_swi_interrupt:
BKPT 0x0000
__tx_swi_interrupt_loop:
B __tx_swi_interrupt_loop

/**************************************************************************/
/* */
/* FUNCTION RELEASE */
Expand Down
13 changes: 0 additions & 13 deletions ports/cortex_a8/gnu/src/tx_thread_schedule.S
Original file line number Diff line number Diff line change
Expand Up @@ -40,19 +40,6 @@
#define IRQ_MODE 0x12 // IRQ mode
#define SVC_MODE 0x13 // SVC mode

/**************************************************************************/
/* SVC exception */
/**************************************************************************/
/* SVC is only used by the ModuleManager but the symbol is needed even if it is not used. */
#if defined(THUMB_MODE)
.thumb_func
#endif
.global __tx_swi_interrupt
__tx_swi_interrupt:
BKPT 0x0000
__tx_swi_interrupt_loop:
B __tx_swi_interrupt_loop

/**************************************************************************/
/* */
/* FUNCTION RELEASE */
Expand Down
13 changes: 0 additions & 13 deletions ports/cortex_a9/ac6/src/tx_thread_schedule.S
Original file line number Diff line number Diff line change
Expand Up @@ -40,19 +40,6 @@
#define IRQ_MODE 0x12 // IRQ mode
#define SVC_MODE 0x13 // SVC mode

/**************************************************************************/
/* SVC exception */
/**************************************************************************/
/* SVC is only used by the ModuleManager but the symbol is needed even if it is not used. */
#if defined(THUMB_MODE)
.thumb_func
#endif
.global __tx_swi_interrupt
__tx_swi_interrupt:
BKPT 0x0000
__tx_swi_interrupt_loop:
B __tx_swi_interrupt_loop

/**************************************************************************/
/* */
/* FUNCTION RELEASE */
Expand Down
13 changes: 0 additions & 13 deletions ports/cortex_a9/gnu/src/tx_thread_schedule.S
Original file line number Diff line number Diff line change
Expand Up @@ -40,19 +40,6 @@
#define IRQ_MODE 0x12 // IRQ mode
#define SVC_MODE 0x13 // SVC mode

/**************************************************************************/
/* SVC exception */
/**************************************************************************/
/* SVC is only used by the ModuleManager but the symbol is needed even if it is not used. */
#if defined(THUMB_MODE)
.thumb_func
#endif
.global __tx_swi_interrupt
__tx_swi_interrupt:
BKPT 0x0000
__tx_swi_interrupt_loop:
B __tx_swi_interrupt_loop

/**************************************************************************/
/* */
/* FUNCTION RELEASE */
Expand Down
Loading

0 comments on commit 220cb42

Please sign in to comment.