Ignore:
Timestamp:
Aug 7, 2012, 6:37:49 PM (12 years ago)
Author:
alain
Message:

Introducing a new release where all initialisation
is done in the boot code.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • soft/giet_vm/sys/switch.s

    r158 r189  
    11/******************************************************************************
    2 * This function receives two arguments representing addresses of task
    3 * contexts, respectively for the current running task to be descheduled and
    4 * for the next task to be scheduled.
     2* This function receives two arguments that are the current task context
     3* physical addresses and the next task context physical address.
    54******************************************************************************/
    65
     
    1110_task_switch:
    1211
     12    /* desactivate DTLB */
     13    ori         $27,    $0,             0xB
     14    mtc2        $27,    $1                      /* DTLB desactivated */
     15
    1316    /* save _current task context */
    14 
    1517    add     $27,    $4,     $0  /* $27 <= &context[curr_task_id] */
    1618
     
    5860    mfc2    $26,    $0
    5961    sw      $26,    35*4($27)   /* ctx[35] <= PTPR */
    60     mfc2    $26,    $1
    61     sw      $26,    36*4($27)   /* ctx[36] <= MODE */
    6262
    6363    /* restore next task context */
    64 
    6564    add     $27,    $5,     $0  /* $27<= &context[next_task_id] */
    6665
    6766    lw      $26,    35*4($27)
    6867    mtc2    $26,    $0          /* restore PTPR */
    69     lw      $26,    36*4($27)
    70     mtc2    $26,    $1          /* restore MODE */
    7168    lw      $26,    0*4($27)
    7269    mtc0    $26,    $12         /* restore SR */
     
    111108    mtc0    $26,    $13         /* restore CR */
    112109
    113     jr      $31                 /* returns to caller */
     110    /* activate DTLB */
     111    ori         $27,    $0,             0xF
     112    mtc2        $27,    $1     
     113
     114    /* returns to caller */
     115    jr      $31
    114116
    115117    .endfunc
Note: See TracChangeset for help on using the changeset viewer.