Changeset 53f9821 in mainline for arch/mips32
- Timestamp:
- 2006-03-20T20:32:17Z (20 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 018d957e
- Parents:
- 9d3e185
- Location:
- arch/mips32
- Files:
-
- 3 edited
-
include/exception.h (modified) (1 diff)
-
src/exception.c (modified) (2 diffs)
-
src/start.S (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
arch/mips32/include/exception.h
r9d3e185 r53f9821 99 99 extern void cache_error_entry(void); 100 100 extern void exception_init(void); 101 extern __native syscall_handler(__native a0, __native a1, __native a2, 102 __native a3, __native sysnum); 101 103 102 #endif -
arch/mips32/src/exception.c
r9d3e185 r53f9821 41 41 #include <console/kconsole.h> 42 42 #include <arch/debugger.h> 43 #include <syscall/syscall.h>44 43 45 44 static char * exctable[] = { … … 130 129 } 131 130 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 140 131 /** Handle syscall userspace call */ 141 132 static void syscall_exception(int n, istate_t *istate) -
arch/mips32/src/start.S
r9d3e185 r53f9821 216 216 sub $k1, 8 # 8=SYSCALL 217 217 218 beqz $k1, uspace_shortcut218 beqz $k1, syscall_shortcut 219 219 add $k1, 8 # Revert $k1 back to correct exc number 220 220 … … 229 229 # The $sp is automatically restored to former value 230 230 eret 231 nop232 231 233 232 # it seems that mips reserves some space on stack for varfuncs??? … … 236 235 #define SS_STATUS 24 237 236 #define SS_EPC 28 238 uspace_shortcut:237 syscall_shortcut: 239 238 # We have a lot of space on the stack, with free use 240 239 sw $sp, SS_SP($k0)
Note:
See TracChangeset
for help on using the changeset viewer.
