Changeset 4177e70 in mainline
- Timestamp:
- 2018-07-17T22:09:50Z (7 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 58093d9
- Parents:
- db51219f
- Location:
- kernel/arch/mips32
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
kernel/arch/mips32/include/arch/context_struct.h
rdb51219f r4177e70 42 42 #define CONTEXT_OFFSET_S8 0x28 43 43 #define CONTEXT_OFFSET_GP 0x2c 44 #define CONTEXT_OFFSET_IPL 0x30 45 #define CONTEXT_SIZE 0x34 44 #define CONTEXT_OFFSET_TP 0x30 45 #define CONTEXT_OFFSET_IPL 0x34 46 #define CONTEXT_SIZE 0x38 46 47 47 48 #ifndef __ASSEMBLER__ … … 63 64 uint32_t s8; 64 65 uint32_t gp; 66 /* We use the K1 register for userspace thread pointer. */ 67 uint32_t tp; 65 68 ipl_t ipl; 66 69 } context_t; -
kernel/arch/mips32/src/context.S
rdb51219f r4177e70 47 47 sw $s8, CONTEXT_OFFSET_S8($a0) 48 48 sw $gp, CONTEXT_OFFSET_GP($a0) 49 sw $k1, CONTEXT_OFFSET_TP($a0) 49 50 50 51 sw $ra, CONTEXT_OFFSET_PC($a0) … … 67 68 lw $s8, CONTEXT_OFFSET_S8($a0) 68 69 lw $gp, CONTEXT_OFFSET_GP($a0) 70 lw $k1, CONTEXT_OFFSET_TP($a0) 69 71 70 72 lw $ra, CONTEXT_OFFSET_PC($a0) -
kernel/arch/mips32/src/start.S
rdb51219f r4177e70 264 264 mfc0 $t2, $status 265 265 sw $t3, ISTATE_OFFSET_EPC($sp) /* save EPC */ 266 sw $k1, ISTATE_OFFSET_KT1($sp) /* save $k1 not saved on context switch */267 266 268 267 and $t4, $t2, REG_SAVE_MASK /* save only KSU, EXL, ERL, IE */ … … 300 299 /* restore epc + 4 */ 301 300 lw $t2, ISTATE_OFFSET_EPC($sp) 302 lw $k1, ISTATE_OFFSET_KT1($sp)303 301 addi $t2, $t2, 4 304 302 mtc0 $t2, $epc
Note:
See TracChangeset
for help on using the changeset viewer.