Changeset 996df189 in mainline
- Timestamp:
- 2014-08-28T18:16:13Z (10 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- ec07933
- Parents:
- 6c1c1f7
- Files:
-
- 3 added
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
kernel/arch/mips32/Makefile.inc
r6c1c1f7 r996df189 86 86 endif 87 87 88 ARCH_AUTOGENS_AG = \ 89 arch/$(KARCH)/include/arch/istate_struct.ag 90 -
kernel/arch/mips32/include/arch/istate.h
r6c1c1f7 r996df189 41 41 42 42 #include <arch/cp0.h> 43 #include <arch/istate_struct.h> 43 44 44 45 #else /* KERNEL */ 45 46 46 47 #include <libarch/cp0.h> 48 #include <libarch/istate_struct.h> 47 49 48 50 #endif /* KERNEL */ 49 50 typedef struct istate {51 /*52 * The first seven registers are arranged so that the istate structure53 * can be used both for exception handlers and for the syscall handler.54 */55 uint32_t a0; /* arg1 */56 uint32_t a1; /* arg2 */57 uint32_t a2; /* arg3 */58 uint32_t a3; /* arg4 */59 uint32_t t0; /* arg5 */60 uint32_t t1; /* arg6 */61 uint32_t v0; /* arg7 */62 uint32_t v1;63 uint32_t at;64 uint32_t t2;65 uint32_t t3;66 uint32_t t4;67 uint32_t t5;68 uint32_t t6;69 uint32_t t7;70 uint32_t s0;71 uint32_t s1;72 uint32_t s2;73 uint32_t s3;74 uint32_t s4;75 uint32_t s5;76 uint32_t s6;77 uint32_t s7;78 uint32_t t8;79 uint32_t t9;80 uint32_t kt0;81 uint32_t kt1; /* We use it as thread-local pointer */82 uint32_t gp;83 uint32_t sp;84 uint32_t s8;85 uint32_t ra;86 87 uint32_t lo;88 uint32_t hi;89 90 uint32_t status; /* cp0_status */91 uint32_t epc; /* cp0_epc */92 93 uint32_t alignment; /* to make sizeof(istate_t) a multiple of 8 */94 } istate_t;95 51 96 52 NO_TRACE static inline void istate_set_retaddr(istate_t *istate, -
kernel/arch/mips32/src/start.S
r6c1c1f7 r996df189 32 32 #include <arch/context_offset.h> 33 33 #include <arch/stack.h> 34 #include <arch/istate_struct.h> 34 35 35 36 .text … … 51 52 #define REG_SAVE_MASK 0x1f 52 53 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 92 54 /* 93 55 * The fake ABI prologue is never executed and may not be part of the … … 97 59 */ 98 60 .macro FAKE_ABI_PROLOGUE 99 sub $sp, ISTATE_S OFT_SIZE61 sub $sp, ISTATE_SIZE 100 62 sw $ra, ISTATE_OFFSET_EPC($sp) 101 63 .endm … … 265 227 KERNEL_STACK_TO_K0 266 228 267 sub $k0, ISTATE_S OFT_SIZE229 sub $k0, ISTATE_SIZE 268 230 sw $sp, ISTATE_OFFSET_SP($k0) 269 231 move $sp, $k0 … … 355 317 tlb_refill_handler: 356 318 KERNEL_STACK_TO_K0 357 sub $k0, ISTATE_S OFT_SIZE319 sub $k0, ISTATE_SIZE 358 320 REGISTERS_STORE_AND_EXC_RESET $k0 359 321 sw $sp, ISTATE_OFFSET_SP($k0) … … 371 333 cache_error_handler: 372 334 KERNEL_STACK_TO_K0 373 sub $k0, ISTATE_S OFT_SIZE335 sub $k0, ISTATE_SIZE 374 336 REGISTERS_STORE_AND_EXC_RESET $k0 375 337 sw $sp, ISTATE_OFFSET_SP($k0)
Note:
See TracChangeset
for help on using the changeset viewer.