Ignore:
Timestamp:
2007-11-16T16:24:05Z (17 years ago)
Author:
Jakub Jermar <jakub@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
9cc0d7c
Parents:
454889c
Message:

Support for six syscall arguments for sparc64.
There is a minor stability issue which needs to be fixed (kernel panics upon entering kconsole from the
console task).

File:
1 edited

Legend:

Unmodified
Added
Removed
  • kernel/arch/sparc64/src/trap/trap_table.S

    r454889c r05ae7081  
    644644 *
    645645 * Input registers:
    646  *      %g1             Address of function to call.
     646 *      %g1             Address of function to call if this is not a syscall.
    647647 *      %g2             First argument for the function.
    648648 *      %g6             Pre-set as kernel stack base if trap from userspace.
     
    698698         * Copy arguments for the syscall to the new window.
    699699         */
    700         mov %i0, %o2
    701         mov %i1, %o3
    702         mov %i2, %o4
    703         mov %i3, %o5
     700        mov %i0, %o0
     701        mov %i1, %o1
     702        mov %i2, %o2
     703        mov %i3, %o3
     704        mov %i4, %o4
     705        mov %i5, %o5
    704706.endif
    705707
     
    741743         */
    742744        mov %g1, %l0
     745.if NOT(\is_syscall)
    743746        mov %g2, %o0
     747.else
     748        ! store the syscall number on the stack as 7th argument
     749        stx %g2, [%sp + STACK_WINDOW_SAVE_AREA_SIZE + STACK_BIAS + STACK_ARG6]
     750.endif
    744751
    745752        /*
     
    768775        SAVE_GLOBALS
    769776       
     777.if NOT(\is_syscall)
    770778        /*
    771779         * Call the higher-level handler and pass istate as second parameter.
     
    773781        call %l0
    774782        add %sp, PREEMPTIBLE_HANDLER_STACK_FRAME_SIZE + STACK_BIAS + SAVED_TNPC, %o1
    775 
    776 .if \is_syscall
    777         /*
    778          * Copy the value returned by the syscall.
    779          */
    780         mov %o0, %i0
     783.else
     784        /*
     785         * Call the higher-level syscall handler.
     786         */
     787        call syscall_handler
     788        nop
     789        mov %o0, %i0                            ! copy the value returned by the syscall
    781790.endif
    782791
Note: See TracChangeset for help on using the changeset viewer.