Changeset 3da35a18 in rtems


Ignore:
Timestamp:
Jul 23, 2009, 5:40:06 PM (10 years ago)
Author:
Joel Sherrill <joel.sherrill@…>
Branches:
4.10, 4.11, master
Children:
75fed1b
Parents:
4e4f06b
Message:

2009-07-23 Joel Sherrill <joel.sherrill@…>

  • cpu.c, cpu_asm.S: Unsuccessful attempt to fix.
Location:
cpukit/score/cpu/avr
Files:
3 edited

Legend:

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

    r4e4f06b r3da35a18  
     12009-07-23      Joel Sherrill <joel.sherrill@oarcorp.com>
     2
     3        * cpu.c, cpu_asm.S: Unsuccessful attempt to fix.
     4
    152009-07-17      Josh Switnicki  <josh.switnicki@utoronto.ca>
    26       
  • cpukit/score/cpu/avr/cpu.c

    r4e4f06b r3da35a18  
    7070)
    7171{
    72         uint16_t _stack; //declare helper variable
    73         _stack = (uint16_t) (stack_base) + (uint16_t) (size); //calc stack pointer
    74         the_context->stack_pointer = _stack - 2; //save stack pointer (- 2 bytes)
    75         _CPU_Push(_stack, (uint16_t)(entry_point)); //push entry point onto context stack
    76         the_context->status = 0; //init status to zero
    77         if (new_level == TRUE)  _CPU_ISR_Enable( 0 );
     72  uint16_t stack;
     73  uint16_t start;
     74  uint16_t *tmpsp;
     75
     76  /* calc stack high end */
     77  stack = (uint16_t) (stack_base) + (uint16_t) (size);
     78
     79  /* calc stack pointer initial value */
     80  stack -= 2;
     81
     82  the_context->stack_pointer = stack;
     83  tmpsp = (uint16_t *) stack;
     84  start = (uint16_t) entry_point;
     85  *tmpsp = start;
    7886#if 0
    79         printk("");
    80         printk("the_context = 0x%x\n", the_context);
    81         printk("sp = 0x%x\n\n",_stack);
     87  tmpsp[0] = start & 0xff;
     88  tmpsp[1] = (start >> 8) & 0xff;
     89#endif
     90
     91  /* FIXME on level */
     92  if (new_level) the_context->status = 0;
     93  else           the_context->status = 0;
     94
     95#if 1
     96  printk("");
     97  printk("the_context = 0x%x\n", the_context);
     98  printk("entry = 0x%x\n", entry_point);
     99  printk("sp = 0x%x\n\n",stack);
    82100#endif
    83101}
  • cpukit/score/cpu/avr/cpu_asm.S

    r4e4f06b r3da35a18  
    241241
    242242SYM(_CPU_Context_restore):
    243         mov     r26,r24
     243        mov     r26,r24         /* R26/27 are X */
    244244        mov     r27,r25
    245245        ld      r2, X+
Note: See TracChangeset for help on using the changeset viewer.