Changeset 33add3a8 in mainline
- Timestamp:
- 2014-09-03T21:37:33Z (10 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- d5955a5
- Parents:
- 4b334fd6
- Location:
- kernel/arch/mips32
- Files:
-
- 1 added
- 1 deleted
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
kernel/arch/mips32/Makefile.inc
r4b334fd6 r33add3a8 86 86 87 87 ARCH_AUTOGENS_AG = \ 88 arch/$(KARCH)/include/arch/istate_struct.ag 88 arch/$(KARCH)/include/arch/istate_struct.ag \ 89 arch/$(KARCH)/include/arch/context_struct.ag 89 90 -
kernel/arch/mips32/include/arch/context.h
r4b334fd6 r33add3a8 38 38 #include <align.h> 39 39 #include <arch/stack.h> 40 #include <arch/context_struct.h> 41 #include <typedefs.h> 40 42 41 43 /* … … 44 46 #define SP_DELTA (ABI_STACK_FRAME + ALIGN_UP(STACK_ITEM_SIZE, STACK_ALIGNMENT)) 45 47 46 #ifndef __ASM__47 48 #include <typedefs.h>49 50 48 #define context_set(ctx, pc, stack, size) \ 51 49 context_set_generic(ctx, pc, stack, size) 52 53 /*54 * Only save registers that must be preserved across55 * function calls.56 */57 typedef struct {58 uintptr_t sp;59 uintptr_t pc;60 61 uint32_t s0;62 uint32_t s1;63 uint32_t s2;64 uint32_t s3;65 uint32_t s4;66 uint32_t s5;67 uint32_t s6;68 uint32_t s7;69 uint32_t s8;70 uint32_t gp;71 72 ipl_t ipl;73 } context_t;74 75 #endif /* __ASM__ */76 50 77 51 #endif -
kernel/arch/mips32/src/context.S
r4b334fd6 r33add3a8 27 27 # 28 28 29 #include <arch/context_ offset.h>29 #include <arch/context_struct.h> 30 30 31 31 .text … … 39 39 40 40 context_save_arch: 41 CONTEXT_SAVE_ARCH_CORE $a0 41 sw $s0, CONTEXT_OFFSET_S0($a0) 42 sw $s1, CONTEXT_OFFSET_S1($a0) 43 sw $s2, CONTEXT_OFFSET_S2($a0) 44 sw $s3, CONTEXT_OFFSET_S3($a0) 45 sw $s4, CONTEXT_OFFSET_S4($a0) 46 sw $s5, CONTEXT_OFFSET_S5($a0) 47 sw $s6, CONTEXT_OFFSET_S6($a0) 48 sw $s7, CONTEXT_OFFSET_S7($a0) 49 sw $s8, CONTEXT_OFFSET_S8($a0) 50 sw $gp, CONTEXT_OFFSET_GP($a0) 51 52 sw $ra, CONTEXT_OFFSET_PC($a0) 53 sw $sp, CONTEXT_OFFSET_SP($a0) 42 54 43 55 # context_save returns 1 … … 46 58 47 59 context_restore_arch: 48 CONTEXT_RESTORE_ARCH_CORE $a0 60 lw $s0, CONTEXT_OFFSET_S0($a0) 61 lw $s1, CONTEXT_OFFSET_S1($a0) 62 lw $s2, CONTEXT_OFFSET_S2($a0) 63 lw $s3, CONTEXT_OFFSET_S3($a0) 64 lw $s4, CONTEXT_OFFSET_S4($a0) 65 lw $s5, CONTEXT_OFFSET_S5($a0) 66 lw $s6, CONTEXT_OFFSET_S6($a0) 67 lw $s7, CONTEXT_OFFSET_S7($a0) 68 lw $s8, CONTEXT_OFFSET_S8($a0) 69 lw $gp, CONTEXT_OFFSET_GP($a0) 70 71 lw $ra, CONTEXT_OFFSET_PC($a0) 72 lw $sp, CONTEXT_OFFSET_SP($a0) 49 73 50 74 # context_restore returns 0 -
kernel/arch/mips32/src/start.S
r4b334fd6 r33add3a8 30 30 #include <arch/mm/page.h> 31 31 #include <arch/asm/boot.h> 32 #include <arch/context_offset.h>33 32 #include <arch/stack.h> 34 33 #include <arch/istate_struct.h>
Note:
See TracChangeset
for help on using the changeset viewer.