Changes in kernel/arch/mips32/src/start.S [36df4109:9d58539] in mainline
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
kernel/arch/mips32/src/start.S
r36df4109 r9d58539 27 27 # 28 28 29 #include <abi/asmtool.h>30 29 #include <arch/asm/regname.h> 31 30 #include <arch/mm/page.h> 32 31 #include <arch/asm/boot.h> 32 #include <arch/context_offset.h> 33 33 #include <arch/stack.h> 34 #include <arch/istate_struct.h>35 34 36 35 .text … … 40 39 .set nomacro 41 40 41 .global kernel_image_start 42 .global tlb_refill_entry 43 .global cache_error_entry 44 .global exception_entry 45 .global userspace_asm 46 42 47 /* 43 48 * Which status bits are thread-local: … … 45 50 */ 46 51 #define REG_SAVE_MASK 0x1f 52 53 #define ISTATE_OFFSET_A0 0 54 #define ISTATE_OFFSET_A1 4 55 #define ISTATE_OFFSET_A2 8 56 #define ISTATE_OFFSET_A3 12 57 #define ISTATE_OFFSET_T0 16 58 #define ISTATE_OFFSET_T1 20 59 #define ISTATE_OFFSET_V0 24 60 #define ISTATE_OFFSET_V1 28 61 #define ISTATE_OFFSET_AT 32 62 #define ISTATE_OFFSET_T2 36 63 #define ISTATE_OFFSET_T3 40 64 #define ISTATE_OFFSET_T4 44 65 #define ISTATE_OFFSET_T5 48 66 #define ISTATE_OFFSET_T6 52 67 #define ISTATE_OFFSET_T7 56 68 #define ISTATE_OFFSET_S0 60 69 #define ISTATE_OFFSET_S1 64 70 #define ISTATE_OFFSET_S2 68 71 #define ISTATE_OFFSET_S3 72 72 #define ISTATE_OFFSET_S4 76 73 #define ISTATE_OFFSET_S5 80 74 #define ISTATE_OFFSET_S6 84 75 #define ISTATE_OFFSET_S7 88 76 #define ISTATE_OFFSET_T8 92 77 #define ISTATE_OFFSET_T9 96 78 #define ISTATE_OFFSET_KT0 100 79 #define ISTATE_OFFSET_KT1 104 80 #define ISTATE_OFFSET_GP 108 81 #define ISTATE_OFFSET_SP 112 82 #define ISTATE_OFFSET_S8 116 83 #define ISTATE_OFFSET_RA 120 84 #define ISTATE_OFFSET_LO 124 85 #define ISTATE_OFFSET_HI 128 86 #define ISTATE_OFFSET_STATUS 132 87 #define ISTATE_OFFSET_EPC 136 88 #define ISTATE_OFFSET_ALIGNMENT 140 89 90 #define ISTATE_SOFT_SIZE 144 47 91 48 92 /* … … 53 97 */ 54 98 .macro FAKE_ABI_PROLOGUE 55 sub $sp, ISTATE_S IZE99 sub $sp, ISTATE_SOFT_SIZE 56 100 sw $ra, ISTATE_OFFSET_EPC($sp) 57 101 .endm … … 187 231 188 232 .org 0x0 189 SYMBOL(kernel_image_start) 233 kernel_image_start: 190 234 /* load temporary stack */ 191 235 lui $sp, %hi(end_stack) … … 196 240 197 241 /* $a1 contains physical address of bootinfo_t */ 198 jal mips32_pre_main242 jal arch_pre_main 199 243 addiu $sp, -ABI_STACK_FRAME 200 244 … … 205 249 end_stack: 206 250 207 SYMBOL(tlb_refill_entry) 251 tlb_refill_entry: 208 252 j tlb_refill_handler 209 253 nop 210 254 211 SYMBOL(cache_error_entry) 255 cache_error_entry: 212 256 j cache_error_handler 213 257 nop 214 258 215 SYMBOL(exception_entry) 259 exception_entry: 216 260 j exception_handler 217 261 nop … … 221 265 KERNEL_STACK_TO_K0 222 266 223 sub $k0, ISTATE_S IZE267 sub $k0, ISTATE_SOFT_SIZE 224 268 sw $sp, ISTATE_OFFSET_SP($k0) 225 269 move $sp, $k0 … … 311 355 tlb_refill_handler: 312 356 KERNEL_STACK_TO_K0 313 sub $k0, ISTATE_S IZE357 sub $k0, ISTATE_SOFT_SIZE 314 358 REGISTERS_STORE_AND_EXC_RESET $k0 315 359 sw $sp, ISTATE_OFFSET_SP($k0) … … 327 371 cache_error_handler: 328 372 KERNEL_STACK_TO_K0 329 sub $k0, ISTATE_S IZE373 sub $k0, ISTATE_SOFT_SIZE 330 374 REGISTERS_STORE_AND_EXC_RESET $k0 331 375 sw $sp, ISTATE_OFFSET_SP($k0) … … 340 384 eret 341 385 342 FUNCTION_BEGIN(userspace_asm) 386 userspace_asm: 343 387 move $sp, $a0 344 388 move $v0, $a1 … … 347 391 /* set it to 0 */ 348 392 eret 349 FUNCTION_END(userspace_asm)
Note:
See TracChangeset
for help on using the changeset viewer.