Changes in kernel/arch/mips32/src/start.S [9d58539:36df4109] in mainline
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
kernel/arch/mips32/src/start.S
r9d58539 r36df4109 27 27 # 28 28 29 #include <abi/asmtool.h> 29 30 #include <arch/asm/regname.h> 30 31 #include <arch/mm/page.h> 31 32 #include <arch/asm/boot.h> 32 #include <arch/context_offset.h>33 33 #include <arch/stack.h> 34 #include <arch/istate_struct.h> 34 35 35 36 .text … … 39 40 .set nomacro 40 41 41 .global kernel_image_start42 .global tlb_refill_entry43 .global cache_error_entry44 .global exception_entry45 .global userspace_asm46 47 42 /* 48 43 * Which status bits are thread-local: … … 50 45 */ 51 46 #define REG_SAVE_MASK 0x1f 52 53 #define ISTATE_OFFSET_A0 054 #define ISTATE_OFFSET_A1 455 #define ISTATE_OFFSET_A2 856 #define ISTATE_OFFSET_A3 1257 #define ISTATE_OFFSET_T0 1658 #define ISTATE_OFFSET_T1 2059 #define ISTATE_OFFSET_V0 2460 #define ISTATE_OFFSET_V1 2861 #define ISTATE_OFFSET_AT 3262 #define ISTATE_OFFSET_T2 3663 #define ISTATE_OFFSET_T3 4064 #define ISTATE_OFFSET_T4 4465 #define ISTATE_OFFSET_T5 4866 #define ISTATE_OFFSET_T6 5267 #define ISTATE_OFFSET_T7 5668 #define ISTATE_OFFSET_S0 6069 #define ISTATE_OFFSET_S1 6470 #define ISTATE_OFFSET_S2 6871 #define ISTATE_OFFSET_S3 7272 #define ISTATE_OFFSET_S4 7673 #define ISTATE_OFFSET_S5 8074 #define ISTATE_OFFSET_S6 8475 #define ISTATE_OFFSET_S7 8876 #define ISTATE_OFFSET_T8 9277 #define ISTATE_OFFSET_T9 9678 #define ISTATE_OFFSET_KT0 10079 #define ISTATE_OFFSET_KT1 10480 #define ISTATE_OFFSET_GP 10881 #define ISTATE_OFFSET_SP 11282 #define ISTATE_OFFSET_S8 11683 #define ISTATE_OFFSET_RA 12084 #define ISTATE_OFFSET_LO 12485 #define ISTATE_OFFSET_HI 12886 #define ISTATE_OFFSET_STATUS 13287 #define ISTATE_OFFSET_EPC 13688 #define ISTATE_OFFSET_ALIGNMENT 14089 90 #define ISTATE_SOFT_SIZE 14491 47 92 48 /* … … 97 53 */ 98 54 .macro FAKE_ABI_PROLOGUE 99 sub $sp, ISTATE_S OFT_SIZE55 sub $sp, ISTATE_SIZE 100 56 sw $ra, ISTATE_OFFSET_EPC($sp) 101 57 .endm … … 231 187 232 188 .org 0x0 233 kernel_image_start: 189 SYMBOL(kernel_image_start) 234 190 /* load temporary stack */ 235 191 lui $sp, %hi(end_stack) … … 240 196 241 197 /* $a1 contains physical address of bootinfo_t */ 242 jal arch_pre_main198 jal mips32_pre_main 243 199 addiu $sp, -ABI_STACK_FRAME 244 200 … … 249 205 end_stack: 250 206 251 tlb_refill_entry: 207 SYMBOL(tlb_refill_entry) 252 208 j tlb_refill_handler 253 209 nop 254 210 255 cache_error_entry: 211 SYMBOL(cache_error_entry) 256 212 j cache_error_handler 257 213 nop 258 214 259 exception_entry: 215 SYMBOL(exception_entry) 260 216 j exception_handler 261 217 nop … … 265 221 KERNEL_STACK_TO_K0 266 222 267 sub $k0, ISTATE_S OFT_SIZE223 sub $k0, ISTATE_SIZE 268 224 sw $sp, ISTATE_OFFSET_SP($k0) 269 225 move $sp, $k0 … … 355 311 tlb_refill_handler: 356 312 KERNEL_STACK_TO_K0 357 sub $k0, ISTATE_S OFT_SIZE313 sub $k0, ISTATE_SIZE 358 314 REGISTERS_STORE_AND_EXC_RESET $k0 359 315 sw $sp, ISTATE_OFFSET_SP($k0) … … 371 327 cache_error_handler: 372 328 KERNEL_STACK_TO_K0 373 sub $k0, ISTATE_S OFT_SIZE329 sub $k0, ISTATE_SIZE 374 330 REGISTERS_STORE_AND_EXC_RESET $k0 375 331 sw $sp, ISTATE_OFFSET_SP($k0) … … 384 340 eret 385 341 386 userspace_asm: 342 FUNCTION_BEGIN(userspace_asm) 387 343 move $sp, $a0 388 344 move $v0, $a1 … … 391 347 /* set it to 0 */ 392 348 eret 349 FUNCTION_END(userspace_asm)
Note:
See TracChangeset
for help on using the changeset viewer.