Changeset 3d1956b in mainline


Ignore:
Timestamp:
2013-11-07T21:13:54Z (11 years ago)
Author:
Jakub Klama <jakub.klama@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
679dc0c
Parents:
dbf4417
Message:

Move fixes from preemtible_trap to syscall_trap handler, allowing
to at least get into syscall handling routine.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • kernel/arch/sparc32/src/trap_table.S

    rdbf4417 r3d1956b  
    556556        /* Load kernel stack pointer from invalid window */
    557557        switch_to_invalid %g5, %g6
    558         restore
    559         mov %l5, %g7            ! stack pointer
     558        /* set uspace window mark */
     559        mov %g6, %l7
     560        and %l7, 0x7, %l7
     561        inc %l7
     562        /* Save stack pointer */
     563        mov %l5, %g7
    560564        switch_back %g5, %g6
    561565        mov %g7, %sp
     
    565569        /* Save trap data on stack */
    566570        mov %psr, %l0
    567         st %l1, [%fp - 4]
    568         st %l2, [%fp - 8]
    569         st %l0, [%fp - 12]
     571        st %l1, [%sp + 92]
     572        st %l2, [%sp + 96]
     573        st %l0, [%sp + 100]
    570574
    571575        /* Enable traps */
     
    590594
    591595        /* Return from handler */
    592         ld [%fp - 4], %l1
    593         ld [%fp - 8], %l2
    594         ld [%fp - 12], %l0
     596        ld [%sp + 92], %l1
     597        ld [%sp + 96], %l2
     598        ld [%sp + 100], %l0
    595599        mov %l0, %psr
    596600        nop
     
    599603        nop
    600604        nop
     605
     606        /* If trap originated from uspace, clear uspace window mark and save uwb address for future use */
     607        if_from_kernel 6f
     608        switch_to_invalid %g5, %g6
     609        clr %l7
     610        mov %l6, %g7
     611        switch_back %g5, %g6
     612        mov %g7, %g1
    601613
    602614        /* If next window is invalid, do inline restore */
Note: See TracChangeset for help on using the changeset viewer.