Changeset 021d471 in mainline for arch/mips32/src
- Timestamp:
- 2006-02-06T15:56:40Z (20 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 9b9f195
- Parents:
- f5935ed
- Location:
- arch/mips32/src
- Files:
-
- 2 edited
-
exception.c (modified) (3 diffs)
-
mips32.c (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
arch/mips32/src/exception.c
rf5935ed r021d471 41 41 #include <console/kconsole.h> 42 42 #include <arch/debugger.h> 43 #include <syscall/syscall.h> 43 44 44 45 static char * exctable[] = { … … 135 136 } 136 137 138 #include <debug.h> 139 /** Handle syscall userspace call */ 140 static void syscall_exception(int n, void *data) 141 { 142 struct exception_regdump *pstate = (struct exception_regdump *)data; 143 144 if (pstate->a3 < SYSCALL_END) 145 pstate->v0 = syscall_table[pstate->a3](pstate->a0, 146 pstate->a1, 147 pstate->a2); 148 else 149 panic("Undefined syscall %d", pstate->a3); 150 pstate->epc += 4; 151 } 152 137 153 138 154 void exception(struct exception_regdump *pstate) … … 191 207 exc_register(EXC_CpU, "cpunus", cpuns_exception); 192 208 #endif 193 } 209 exc_register(EXC_Sys, "syscall", syscall_exception); 210 } -
arch/mips32/src/mips32.c
rf5935ed r021d471 96 96 arc_print_memory_map(); 97 97 arc_print_devices(); 98 99 /* Setup usermode...*/ 100 config.init_addr = 0x20000000; 101 config.init_size = FRAME_SIZE; 98 102 } 99 103 … … 110 114 } 111 115 116 /* Stack pointer saved when entering user mode */ 117 /* TODO: How do we do it on SMP system???? */ 118 119 /* Why the hell moves the linker the variable 64K away in assembler 120 * when not in .text section ???????? 121 */ 122 __address supervisor_sp __attribute__ ((section (".text"))); 123 112 124 void userspace(void) 113 125 { … … 123 135 } 124 136 125 /* Stack pointer saved when entering user mode */126 /* TODO: How do we do it on SMP system???? */127 __address supervisor_sp;128 129 137 void before_thread_runs_arch(void) 130 138 {
Note:
See TracChangeset
for help on using the changeset viewer.
