Changeset b4404843 in rtems


Ignore:
Timestamp:
Jul 17, 2009, 6:33:35 PM (10 years ago)
Author:
Joel Sherrill <joel.sherrill@…>
Branches:
4.10, 4.11, master
Children:
38df5015
Parents:
123f10a
Message:

2009-07-17 Josh Switnicki <josh.switnicki@…>

*cpu_asm.S: implemented _CPU_Context_Restore by adding tags to
restore section of context switch.
Fixed bug in _CPU_Context_Switch. The wrong registers were being
used for pointer to running task Context_Control struct.

Location:
cpukit/score/cpu/avr
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • cpukit/score/cpu/avr/ChangeLog

    r123f10a rb4404843  
     12009-07-17      Josh Switnicki  <josh.switnicki@utoronto.ca>
     2       
     3        *cpu_asm.S: implemented _CPU_Context_Restore by adding tags to
     4        restore section of context switch.
     5        Fixed bug in _CPU_Context_Switch. The wrong registers were being
     6        used for pointer to running task Context_Control struct.
     7
    182009-07-09      Josh Switnicki <josh.switnicki@utoronto.ca>
    29
  • cpukit/score/cpu/avr/cpu.c

    r123f10a rb4404843  
    7676        the_context->status = 0; //init status to zero
    7777        if (new_level == TRUE)  _CPU_ISR_Enable( 0 );
     78#if 0
     79        printk("");
     80        printk("the_context = 0x%x\n", the_context);
     81        printk("sp = 0x%x\n\n",_stack);
     82#endif
    7883}
    7984
  • cpukit/score/cpu/avr/cpu_asm.S

    r123f10a rb4404843  
    3434#define ret_lo          r24
    3535#define ret_hi          r25
    36 
    37 
    3836
    3937        PUBLIC( setjmp )
     
    128126
    129127
    130 
    131 
    132 
    133 
    134128/*
    135129 *  _CPU_Context_save_fp_context
     
    206200 *
    207201 *  XXX document implementation including references if appropriate
    208  
    209 */
    210 
    211 
    212 
    213 
     202 void _CPU_Context_switch(
     203  Context_Control  *run,
     204  Context_Control  *heir
     205);
     206
     207*/
    214208
    215209        PUBLIC(_CPU_Context_switch)
    216 
    217210SYM(_CPU_Context_switch):
    218211        mov     r26, r24
    219212        mov     r27, r25
     213        mov     r24, r22
     214        mov     r25, r23
    220215        st      X+, r2
    221216        st      X+, r3
     
    237232        st      X+, r29
    238233        st      X+, r29
    239         lds     r25,0x5f  /*load sreg*/
    240         st      X+, r25
    241         lds     r25,0x5d /*spl*/
    242         st      X+, r25
    243         lds     r25,0x5e /*sph*/
    244        
    245 
    246 restore:
    247         mov     r26,r22
    248         mov     r27,r23
     234        lds     r23,0x5f  /*load sreg*/
     235        st      X+, r23
     236        lds     r23,0x5d /*spl*/
     237        st      X+, r23
     238        lds     r23,0x5e /*sph*/
     239       
     240        PUBLIC(_CPU_Context_restore)
     241
     242SYM(_CPU_Context_restore):
     243        mov     r26,r24
     244        mov     r27,r25
    249245        ld      r2, X+
    250246        ld      r3, X+
     
    306302}
    307303*/
    308 
     304/*
    309305        PUBLIC(_CPU_Context_restore)
    310306
     
    313309        ret
    314310
    315 
     311*/
    316312
    317313/*  void __ISR_Handler()
     
    394390SYM(_ISR_Handler):
    395391        ret
    396 
Note: See TracChangeset for help on using the changeset viewer.