Changeset 53f9821 in mainline for arch/mips32


Ignore:
Timestamp:
2006-03-20T20:32:17Z (20 years ago)
Author:
Ondrej Palkovsky <ondrap@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
018d957e
Parents:
9d3e185
Message:

Cleanup of spinlocks, now compiles both ia32 and amd64 with
and without DEBUG_SPINLOCKS. Made spinlocks inline.
Moved syscall_handler to generic (it was identical for ia32,amd64 & mips32).
Made slightly faster syscall for ia32.
Made better interrupt routines for ia32.
Allow not saving non-scratch registers during interrupt on ia32,amd64,mips32.
Aligned interrupt handlers on ia32,amd64, this should prevent problems
with different instruction lengths.

Location:
arch/mips32
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • arch/mips32/include/exception.h

    r9d3e185 r53f9821  
    9999extern void cache_error_entry(void);
    100100extern void exception_init(void);
    101 extern __native syscall_handler(__native a0, __native a1, __native a2,
    102                                 __native a3, __native sysnum);
     101
    103102#endif
  • arch/mips32/src/exception.c

    r9d3e185 r53f9821  
    4141#include <console/kconsole.h>
    4242#include <arch/debugger.h>
    43 #include <syscall/syscall.h>
    4443
    4544static char * exctable[] = {
     
    130129}
    131130
    132 __native syscall_handler(__native a0, __native a1, __native a2,
    133                          __native a3, __native sysnum)
    134 {
    135         if (sysnum < SYSCALL_END)
    136                 return syscall_table[sysnum](a0,a1,a2,a3);
    137         panic("Undefined syscall %d", sysnum);
    138 }
    139 
    140131/** Handle syscall userspace call */
    141132static void syscall_exception(int n, istate_t *istate)
  • arch/mips32/src/start.S

    r9d3e185 r53f9821  
    216216        sub $k1, 8            # 8=SYSCALL
    217217       
    218         beqz $k1, uspace_shortcut
     218        beqz $k1, syscall_shortcut
    219219        add $k1, 8            # Revert $k1 back to correct exc number
    220220       
     
    229229        # The $sp is automatically restored to former value
    230230        eret
    231         nop
    232231
    233232# it seems that mips reserves some space on stack for varfuncs???
     
    236235#define SS_STATUS 24
    237236#define SS_EPC    28
    238 uspace_shortcut:
     237syscall_shortcut:
    239238        # We have a lot of space on the stack, with free use
    240239        sw $sp, SS_SP($k0)
Note: See TracChangeset for help on using the changeset viewer.