Ignore:
Timestamp:
Jul 31, 2017, 1:59:52 PM (4 years ago)
Author:
alain
Message:

Several modifs in the generic scheduler and in the hal_context to
fix the context switch mechanism.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/hal/tsar_mips32/core/hal_kentry.S

    r279 r296  
    3030# or syscall for the TSAR_MIPS32 architecture. 
    3131#
    32 # When we enter the kernel, we test the ststus register:
     32# When we enter the kernel, we test the status register:
    3333# - If the core is in user mode, we desactivate the MMU, and we save
    3434#   the core context in the uzone of the calling thread descriptor.
     
    4242#---------------------------------------------------------------------------------
    4343
    44         .section   .kgiet, "ax", @progbits
     44        .section   .kentry, "ax", @progbits
    4545
    4646        .extern    hal_do_interrupt
     
    204204# The uzone pointer is saved in $19 to be used by kernel_exit.
    205205
    206         mfc0    $17,    $13                 # $1 <= CR
    207         andi    $1,     $1,   0x3F          # $1 <= XCODE
     206        mfc0    $17,    $13                 # $17 <= CR
     207        andi    $17,    $17,   0x3F         # $17 <= XCODE
    208208
    209209        mfc0    $4,     $4,   2             # $4 <= thread pointer (first arg)
     
    212212
    213213        ori         $8,     $0,   0x20          # $8 <= cause syscall
    214     beq     $8,     $1,   cause_sys
    215     nop
    216         beq     $1,     $0,       cause_int
     214    beq     $8,     $17,  cause_sys     # go to syscall handler
     215    nop
     216        beq     $17,    $0,       cause_int     # go to interrupt handler
    217217    nop
    218218
Note: See TracChangeset for help on using the changeset viewer.