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.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • 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.