Ignore:
Timestamp:
Apr 14, 2014, 6:44:51 PM (11 years ago)
Author:
cfuguet
Message:

Bugfix for interrupt masking and demasking.

File:
1 edited

Legend:

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

    r263 r301  
    22* This function receives two arguments that are the current task context
    33* (virtual) addresses and the next task context (virtual) address.
     4*
     5* This function should be called in a critical section
    46*
    57* TODO (AG) Il semble possible de limiter le nombre de registres à sauver:
     
    1820
    1921_task_switch:
    20 
    21     /* enter critical section */
    22     li      $2,     0xFFFFFFFE 
    23     mfc0    $3,     $12       
    24     and     $3,     $3, $2   
    25     mtc0    $3,     $12   
    2622
    2723    /* save _current task context */
     
    123119    mtc2    $26,    $0          /* restore PTPR */
    124120
    125     /* exit critical section */
    126     li      $2,     0x00000001 
    127     mfc0    $3,     $12       
    128     or      $3,     $3, $2   
    129     mtc0    $3,     $12   
    130 
    131121    /* returns to caller */
    132122    jr      $31
Note: See TracChangeset for help on using the changeset viewer.