Changeset 656


Ignore:
Timestamp:
Jul 22, 2015, 5:33:47 PM (9 years ago)
Author:
guerin
Message:

always set CTX_EPC in task context initialization

all runnable tasks not scheduled at boot but scheduled later would
jump at a random address, including the idle task.

Location:
soft/giet_vm
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • soft/giet_vm/giet_boot/boot.c

    r646 r656  
    12761276                    psched->context[ltid][CTX_SR_ID]     = GIET_SR_INIT_VALUE;
    12771277                    psched->context[ltid][CTX_SP_ID]     = ctx_sp;
     1278                    psched->context[ltid][CTX_EPC_ID]    = ctx_entry;
    12781279                    psched->context[ltid][CTX_ENTRY_ID]  = ctx_entry;
    12791280                    psched->context[ltid][CTX_PTPR_ID]   = ctx_ptpr;
  • soft/giet_vm/giet_kernel/kernel_init.c

    r648 r656  
    317317    ////////////////////////////////////////////////////////////////////////////
    318318    // step 3 : - Each processor complete idle task context initialisation.
    319     //            Only CTX_SP, CTX_RA, CTX_EPC slots, because other slots
    320     //            have been initialised in boot code)
     319    //            Only CTX_SP, CTX_RA, CTX_EPC, CTX_ENTRY slots, because other
     320    //            slots have been initialised in boot code)
    321321    //            The 4 Kbytes idle stack is implemented in the scheduler itself.
    322322    //          - Each processor starts TICK timer, if at least one task.
     
    332332    _set_task_slot( x , y , p , IDLE_TASK_INDEX , CTX_SP_ID  , sp    );
    333333    _set_task_slot( x , y , p , IDLE_TASK_INDEX , CTX_RA_ID  , ra    );
     334    _set_task_slot( x , y , p , IDLE_TASK_INDEX , CTX_EPC_ID , entry );
    334335    _set_task_slot( x , y , p , IDLE_TASK_INDEX , CTX_ENTRY_ID , entry );
    335336
Note: See TracChangeset for help on using the changeset viewer.