diff options
Diffstat (limited to 'ports/rxv1/gnu/src')
| -rw-r--r-- | ports/rxv1/gnu/src/tx_initialize_low_level.S | 4 | ||||
| -rw-r--r-- | ports/rxv1/gnu/src/tx_thread_context_restore.S | 4 | ||||
| -rw-r--r-- | ports/rxv1/gnu/src/tx_thread_context_save.S | 4 | ||||
| -rw-r--r-- | ports/rxv1/gnu/src/tx_thread_interrupt_control.S | 4 | ||||
| -rw-r--r-- | ports/rxv1/gnu/src/tx_thread_schedule.S | 50 | ||||
| -rw-r--r-- | ports/rxv1/gnu/src/tx_thread_stack_build.S | 4 | ||||
| -rw-r--r-- | ports/rxv1/gnu/src/tx_thread_system_return.S | 4 | ||||
| -rw-r--r-- | ports/rxv1/gnu/src/tx_timer_interrupt.S | 4 |
8 files changed, 61 insertions, 17 deletions
diff --git a/ports/rxv1/gnu/src/tx_initialize_low_level.S b/ports/rxv1/gnu/src/tx_initialize_low_level.S index 738fb358..9433b2e8 100644 --- a/ports/rxv1/gnu/src/tx_initialize_low_level.S +++ b/ports/rxv1/gnu/src/tx_initialize_low_level.S @@ -29,7 +29,7 @@ ;/* FUNCTION RELEASE */ ;/* */ ;/* _tx_initialize_low_level RXv1/GNURX */ -;/* 6.1.10 */ +;/* 6.1.11 */ ;/* AUTHOR */ ;/* */ ;/* William E. Lamie, Microsoft Corporation */ @@ -67,6 +67,8 @@ ;/* resulting in version 6.1.9 */ ;/* 01-31-2022 William E. Lamie Modified comment(s), */ ;/* resulting in version 6.1.10 */ +;/* 04-25-2022 William E. Lamie Modified comment(s), */ +;/* resulting in version 6.1.11 */ ;/* */ ;/**************************************************************************/ .global __tx_initialize_low_level diff --git a/ports/rxv1/gnu/src/tx_thread_context_restore.S b/ports/rxv1/gnu/src/tx_thread_context_restore.S index abb8e0f9..5f46bdce 100644 --- a/ports/rxv1/gnu/src/tx_thread_context_restore.S +++ b/ports/rxv1/gnu/src/tx_thread_context_restore.S @@ -46,7 +46,7 @@ ;/* FUNCTION RELEASE */ ;/* */ ;/* _tx_thread_context_restore RXv1/GNURX */ -;/* 6.1.10 */ +;/* 6.1.11 */ ;/* AUTHOR */ ;/* */ ;/* William E. Lamie, Microsoft Corporation */ @@ -85,6 +85,8 @@ ;/* resulting in version 6.1.9 */ ;/* 01-31-2022 William E. Lamie Modified comment(s), */ ;/* resulting in version 6.1.10 */ +;/* 04-25-2022 William E. Lamie Modified comment(s), */ +;/* resulting in version 6.1.11 */ ;/* */ ;/**************************************************************************/ ;VOID _tx_thread_context_restore(VOID) diff --git a/ports/rxv1/gnu/src/tx_thread_context_save.S b/ports/rxv1/gnu/src/tx_thread_context_save.S index b15a9fb0..ab6e4a13 100644 --- a/ports/rxv1/gnu/src/tx_thread_context_save.S +++ b/ports/rxv1/gnu/src/tx_thread_context_save.S @@ -30,7 +30,7 @@ ;/* FUNCTION RELEASE */ ;/* */ ;/* _tx_thread_context_save RXv1/GNURX */ -;/* 6.1.10 */ +;/* 6.1.11 */ ;/* AUTHOR */ ;/* */ ;/* William E. Lamie, Microsoft Corporation */ @@ -66,6 +66,8 @@ ;/* resulting in version 6.1.9 */ ;/* 01-31-2022 William E. Lamie Modified comment(s), */ ;/* resulting in version 6.1.10 */ +;/* 04-25-2022 William E. Lamie Modified comment(s), */ +;/* resulting in version 6.1.11 */ ;/* */ ;/**************************************************************************/ ;VOID _tx_thread_context_save(VOID) diff --git a/ports/rxv1/gnu/src/tx_thread_interrupt_control.S b/ports/rxv1/gnu/src/tx_thread_interrupt_control.S index db3f59b4..0dbf5146 100644 --- a/ports/rxv1/gnu/src/tx_thread_interrupt_control.S +++ b/ports/rxv1/gnu/src/tx_thread_interrupt_control.S @@ -26,7 +26,7 @@ ;/* FUNCTION RELEASE */ ;/* */ ;/* _tx_thread_interrupt_control RXv1/GNURX */ -;/* 6.1.10 */ +;/* 6.1.11 */ ;/* AUTHOR */ ;/* */ ;/* William E. Lamie, Microsoft Corporation */ @@ -61,6 +61,8 @@ ;/* resulting in version 6.1.9 */ ;/* 01-31-2022 William E. Lamie Modified comment(s), */ ;/* resulting in version 6.1.10 */ +;/* 04-25-2022 William E. Lamie Modified comment(s), */ +;/* resulting in version 6.1.11 */ ;/* */ ;/**************************************************************************/ ;UINT _tx_thread_interrupt_control(UINT new_posture) diff --git a/ports/rxv1/gnu/src/tx_thread_schedule.S b/ports/rxv1/gnu/src/tx_thread_schedule.S index 4d3548be..98079de8 100644 --- a/ports/rxv1/gnu/src/tx_thread_schedule.S +++ b/ports/rxv1/gnu/src/tx_thread_schedule.S @@ -23,6 +23,11 @@ .global __tx_thread_execute_ptr .global __tx_thread_current_ptr .global __tx_timer_time_slice +#if (TX_LOW_POWER == 1) + .global _tx_low_power_enter + .global _tx_low_power_exit + .global __tx_thread_preempt_disable +#endif ; .text @@ -31,7 +36,7 @@ ;/* FUNCTION RELEASE */ ;/* */ ;/* _tx_thread_schedule RXv1/GNURX */ -;/* 6.1.10 */ +;/* 6.1.11 */ ;/* AUTHOR */ ;/* */ ;/* William E. Lamie, Microsoft Corporation */ @@ -71,6 +76,9 @@ ;/* resulting in version 6.1.9 */ ;/* 01-31-2022 William E. Lamie Modified comment(s), */ ;/* resulting in version 6.1.10 */ +;/* 04-25-2022 William E. Lamie Modified comment(s), and */ +;/* added low power support, */ +;/* resulting in version 6.1.11 */ ;/* */ ;/**************************************************************************/ ;VOID _tx_thread_schedule(VOID) @@ -78,26 +86,48 @@ .global __tx_thread_schedule __tx_thread_schedule: ; -; /* Enable interrupts. */ -; - SETPSW I ; ; /* Wait for a thread to execute. */ ; do ; { MOV.L #__tx_thread_execute_ptr, R1 ; Address of thread to executer ptr __tx_thread_schedule_loop: + SETPSW I ; Enable interrupts + CLRPSW I ; Disable interrupts MOV.L [R1],R2 ; Pickup next thread to execute CMP #0,R2 ; Is it NULL? - BEQ __tx_thread_schedule_loop ; Yes, idle system, keep checking + BNE __tx_thread_thread_ready ; Not NULL, schedule the thread + ; Idle system - no thread is ready +#if (TX_LOW_POWER == 1) + MOV.L #__tx_thread_preempt_disable, R1 ; Load prempt disable flag. + MOV.L [R1], R2 + ADD #1, R2 ; Disable preemption while enter/exit + MOV.L R2, [R1] + BSR _tx_low_power_enter ; Possibly enter low power mode +#endif + +#if (TX_ENABLE_WAIT == 1) + WAIT ; Wait for interrupt +#endif + +#if (TX_LOW_POWER == 1) + CLRPSW I ; Disable interrupts (because WAIT enables interrupts) + BSR _tx_low_power_exit ; Possibly exit low power mode + MOV.L #__tx_thread_preempt_disable, R1 ; Load prempt disable flag. + MOV.L [R1], R2 + SUB #1, R2 ; Enable preemption + MOV.L R2, [R1] + MOV.L #__tx_thread_execute_ptr, R1 ; Address of thread to executer ptr +#endif + + BRA __tx_thread_schedule_loop ; Idle system, keep checking + +__tx_thread_thread_ready: ; ; } ; while(_tx_thread_execute_ptr == TX_NULL); -; -; /* Yes! We have a thread to execute. Lockout interrupts and -; transfer control to it. */ -; - CLRPSW I ; Disable interrupts +; +; /* Yes! We have a thread to execute. Note that interrupts are locked out at this point. */ ; ; /* Setup the current thread pointer. */ ; _tx_thread_current_ptr = _tx_thread_execute_ptr; diff --git a/ports/rxv1/gnu/src/tx_thread_stack_build.S b/ports/rxv1/gnu/src/tx_thread_stack_build.S index e4313997..0b90e841 100644 --- a/ports/rxv1/gnu/src/tx_thread_stack_build.S +++ b/ports/rxv1/gnu/src/tx_thread_stack_build.S @@ -26,7 +26,7 @@ ;/* FUNCTION RELEASE */ ;/* */ ;/* _tx_thread_stack_build RXv1/GNURX */ -;/* 6.1.10 */ +;/* 6.1.11 */ ;/* AUTHOR */ ;/* */ ;/* William E. Lamie, Microsoft Corporation */ @@ -65,6 +65,8 @@ ;/* resulting in version 6.1.9 */ ;/* 01-31-2022 William E. Lamie Modified comment(s), */ ;/* resulting in version 6.1.10 */ +;/* 04-25-2022 William E. Lamie Modified comment(s), */ +;/* resulting in version 6.1.11 */ ;/* */ ;/**************************************************************************/ ;VOID _tx_thread_stack_build(TX_THREAD *thread_ptr, VOID (*function_ptr)(VOID)) diff --git a/ports/rxv1/gnu/src/tx_thread_system_return.S b/ports/rxv1/gnu/src/tx_thread_system_return.S index 3dd9dbd0..68ea2fec 100644 --- a/ports/rxv1/gnu/src/tx_thread_system_return.S +++ b/ports/rxv1/gnu/src/tx_thread_system_return.S @@ -30,7 +30,7 @@ ;/* FUNCTION RELEASE */ ;/* */ ;/* _tx_thread_system_return RXv1/GNURX */ -;/* 6.1.10 */ +;/* 6.1.11 */ ;/* AUTHOR */ ;/* */ ;/* William E. Lamie, Microsoft Corporation */ @@ -68,6 +68,8 @@ ;/* resulting in version 6.1.9 */ ;/* 01-31-2022 William E. Lamie Modified comment(s), */ ;/* resulting in version 6.1.10 */ +;/* 04-25-2022 William E. Lamie Modified comment(s), */ +;/* resulting in version 6.1.11 */ ;/* */ ;/**************************************************************************/ ;VOID _tx_thread_system_return(VOID) diff --git a/ports/rxv1/gnu/src/tx_timer_interrupt.S b/ports/rxv1/gnu/src/tx_timer_interrupt.S index 3f1045b1..cf2c64b5 100644 --- a/ports/rxv1/gnu/src/tx_timer_interrupt.S +++ b/ports/rxv1/gnu/src/tx_timer_interrupt.S @@ -42,7 +42,7 @@ ;/* FUNCTION RELEASE */ ;/* */ ;/* _tx_timer_interrupt RXv1/GNURX */ -;/* 6.1.10 */ +;/* 6.1.11 */ ;/* AUTHOR */ ;/* */ ;/* William E. Lamie, Microsoft Corporation */ @@ -85,6 +85,8 @@ ;/* added missing thread */ ;/* preemption logic, */ ;/* resulting in version 6.1.10 */ +;/* 04-25-2022 William E. Lamie Modified comment(s), */ +;/* resulting in version 6.1.11 */ ;/* */ ;/**************************************************************************/ ;VOID _tx_timer_interrupt(VOID) |
