Changeset dbf4417 in mainline


Ignore:
Timestamp:
2013-11-05T21:44:04Z (11 years ago)
Author:
Jakub Klama <jakub.klama@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
3d1956b
Parents:
9f9d725
Message:

Preemptible trap handler working.

File:
1 edited

Legend:

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

    r9f9d725 rdbf4417  
    118118.macro inline_restore_kernel
    119119        mov %wim, %l3
    120         sll %l3, 7, %l4
    121         srl %l3, 1, %l3
     120        srl %l3, 7, %l4
     121        sll %l3, 1, %l3
    122122        or  %l3, %l4, %l3
    123123        and %l3, 0xff, %l3
     
    149149.macro inline_restore_uspace uwb
    150150        mov %wim, %l3
    151         sll %l3, 7, %l4
    152         srl %l3, 1, %l3
     151        srl %l3, 7, %l4
     152        sll %l3, 1, %l3
    153153        or  %l3, %l4, %l3
    154154        and %l3, 0xff, %l3
     
    509509        nop
    510510        nop
    511         jmp %l1
     511
     512        /* If trap originated from uspace, clear uspace window mark and save uwb address for future use */
     513        if_from_kernel 6f
     514        switch_to_invalid %g5, %g6
     515        clr %l7
     516        mov %l6, %g7
     517        switch_back %g5, %g6
     518        mov %g7, %g1
     519
     520        /* If next window is invalid, do inline restore */
     5216:      get_wim_number %g6
     522        get_cwp %g7
     523        inc %g7
     524        cmp %g6, %g7
     525        bne 8f
     526
     527        if_from_kernel 7f
     528
     529        inline_restore_uspace %g1
     530        b 8f
     531        nop
     532
     5337:      inline_restore_kernel
     534
     5358:      jmp %l1
    512536        rett %l2
    513537
     
    575599        nop
    576600        nop
    577         jmp %l2
     601
     602        /* If next window is invalid, do inline restore */
     6036:      get_wim_number %g6
     604        get_cwp %g7
     605        inc %g7
     606        cmp %g6, %g7
     607        bne 8f
     608
     609        if_from_kernel 7f
     610
     611        inline_restore_uspace %g1
     612        b 8f
     613        nop
     614
     6157:      inline_restore_kernel
     616
     617
     6188:      jmp %l2
    578619        rett %l2 + 4
    579620
Note: See TracChangeset for help on using the changeset viewer.