Changeset 0407636 in mainline
- Timestamp:
- 2016-04-24T07:30:53Z (9 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- b66cc97
- Parents:
- a52e2f4
- Files:
-
- 10 edited
Legend:
- Unmodified
- Added
- Removed
-
boot/arch/mips32/src/asm.S
ra52e2f4 r0407636 27 27 # 28 28 29 #include <abi/asmtool.h> 29 30 #include <arch/arch.h> 30 31 #include <arch/regname.h> … … 34 35 .set nomacro 35 36 36 .global start37 .global halt38 .global jump_to_kernel39 40 37 .section BOOTSTRAP 41 38 42 start: 39 SYMBOL(start) 43 40 /* 44 41 * Setup the CP0 configuration … … 145 142 .text 146 143 147 halt: 144 FUNCTION_BEGIN(halt) 148 145 j halt 149 146 nop 147 FUNCTION_END(halt) 150 148 151 jump_to_kernel: 149 FUNCTION_BEGIN(jump_to_kernel) 152 150 /* 153 151 * TODO: … … 158 156 j $a0 159 157 nop 158 FUNCTION_END(jump_to_kernel) -
kernel/arch/mips32/src/asm.S
ra52e2f4 r0407636 27 27 */ 28 28 29 #include <abi/asmtool.h> 29 30 #include <arch/asm/regname.h> 30 31 #include <arch/fpu_context_struct.h> … … 48 49 .set nomacro 49 50 50 .global asm_delay_loop 51 asm_delay_loop: 51 FUNCTION_BEGIN(asm_delay_loop) 52 52 j $31 53 53 nop 54 55 .global cpu_halt 56 cpu_halt: 54 FUNCTION_END(asm_delay_loop) 55 56 FUNCTION_BEGIN(cpu_halt) 57 57 j cpu_halt 58 58 nop 59 60 .global memcpy_from_uspace 61 .global memcpy_to_uspace 62 .global memcpy_from_uspace_failover_address 63 .global memcpy_to_uspace_failover_address 64 memcpy_from_uspace: 65 memcpy_to_uspace: 59 FUNCTION_END(cpu_halt) 60 61 FUNCTION_BEGIN(memcpy_from_uspace) 62 FUNCTION_BEGIN(memcpy_to_uspace) 66 63 move $t2, $a0 /* save dst */ 67 64 … … 129 126 jr $ra 130 127 move $v0, $t2 131 132 memcpy_from_uspace_failover_address: 133 memcpy_to_uspace_failover_address: 128 FUNCTION_END(memcpy_from_uspace) 129 FUNCTION_END(memcpy_to_uspace) 130 131 SYMBOL(memcpy_from_uspace_failover_address) 132 SYMBOL(memcpy_to_uspace_failover_address) 134 133 jr $ra 135 134 move $v0, $zero … … 155 154 .endm 156 155 157 .global fpu_context_save 158 fpu_context_save: 156 FUNCTION_BEGIN(fpu_context_save) 159 157 #ifdef CONFIG_FPU 160 158 fpu_gp_save 0, $a0 … … 225 223 j $ra 226 224 nop 227 228 .global fpu_context_restore 229 fpu_context_restore: 225 FUNCTION_END(fpu_context_save) 226 227 FUNCTION_BEGIN(fpu_context_restore) 230 228 #ifdef CONFIG_FPU 231 229 fpu_gp_restore 0, $a0 … … 296 294 j $ra 297 295 nop 298 299 .global early_putchar 300 early_putchar: 296 FUNCTION_END(fpu_context_restore) 297 298 FUNCTION_BEGIN(early_putchar) 301 299 j $ra 302 300 nop 301 FUNCTION_END(early_putchar) -
kernel/arch/mips32/src/context.S
ra52e2f4 r0407636 27 27 # 28 28 29 #include <abi/asmtool.h> 29 30 #include <arch/context_struct.h> 30 31 … … 35 36 .set nomacro 36 37 37 .global context_save_arch 38 .global context_restore_arch 39 40 context_save_arch: 38 FUNCTION_BEGIN(context_save_arch) 41 39 sw $s0, CONTEXT_OFFSET_S0($a0) 42 40 sw $s1, CONTEXT_OFFSET_S1($a0) … … 56 54 j $31 57 55 li $2, 1 56 FUNCTION_END(context_save_arch) 58 57 59 context_restore_arch: 58 FUNCTION_BEGIN(context_restore_arch) 60 59 lw $s0, CONTEXT_OFFSET_S0($a0) 61 60 lw $s1, CONTEXT_OFFSET_S1($a0) … … 75 74 j $31 76 75 xor $2, $2 76 FUNCTION_END(context_restore_arch) -
kernel/arch/mips32/src/debug/stacktrace_asm.S
ra52e2f4 r0407636 27 27 # 28 28 29 #include <abi/asmtool.h> 30 29 31 .text 30 32 … … 32 34 .set noreorder 33 35 34 .global frame_pointer_get 35 .global program_counter_get 36 37 frame_pointer_get: 36 FUNCTION_BEGIN(frame_pointer_get) 38 37 j $ra 39 38 move $v0, $sp 39 FUNCTION_END(frame_pointer_get) 40 40 41 program_counter_get: 41 FUNCTION_BEGIN(program_counter_get) 42 42 j $ra 43 43 move $v0, $ra 44 FUNCTION_END(program_counter_get) -
kernel/arch/mips32/src/start.S
ra52e2f4 r0407636 27 27 # 28 28 29 #include <abi/asmtool.h> 29 30 #include <arch/asm/regname.h> 30 31 #include <arch/mm/page.h> … … 38 39 .set noreorder 39 40 .set nomacro 40 41 .global kernel_image_start42 .global tlb_refill_entry43 .global cache_error_entry44 .global exception_entry45 .global userspace_asm46 41 47 42 /* … … 192 187 193 188 .org 0x0 194 kernel_image_start: 189 SYMBOL(kernel_image_start) 195 190 /* load temporary stack */ 196 191 lui $sp, %hi(end_stack) … … 210 205 end_stack: 211 206 212 tlb_refill_entry: 207 SYMBOL(tlb_refill_entry) 213 208 j tlb_refill_handler 214 209 nop 215 210 216 cache_error_entry: 211 SYMBOL(cache_error_entry) 217 212 j cache_error_handler 218 213 nop 219 214 220 exception_entry: 215 SYMBOL(exception_entry) 221 216 j exception_handler 222 217 nop … … 345 340 eret 346 341 347 userspace_asm: 342 FUNCTION_BEGIN(userspace_asm) 348 343 move $sp, $a0 349 344 move $v0, $a1 … … 352 347 /* set it to 0 */ 353 348 eret 349 FUNCTION_END(userspace_asm) -
uspace/lib/c/arch/mips32/src/entry.S
ra52e2f4 r0407636 27 27 # 28 28 29 #include <abi/asmtool.h> 29 30 #include <libarch/stack.h> 30 31 31 32 .text 32 33 .section .init, "ax" 33 34 .global __entry35 34 36 35 .set noreorder … … 41 40 # $a0 ($4) contains the PCB pointer 42 41 # 43 .ent __entry 44 __entry: 42 FUNCTION_BEGIN(__entry) 43 .ent __entry 45 44 .frame $sp, ABI_STACK_FRAME, $ra 46 45 .cpload $t9 … … 63 62 # 64 63 addiu $sp, ABI_STACK_FRAME 65 .end __entry 64 FUNCTION_END(__entry) -
uspace/lib/c/arch/mips32/src/entryjmp.S
ra52e2f4 r0407636 27 27 # 28 28 29 #include <abi/asmtool.h> 29 30 #include <libarch/stack.h> 30 31 31 32 .text 32 33 .section .text 33 .global entry_point_jmp34 34 .set noreorder 35 35 … … 40 40 # 41 41 # Jump to program entry point 42 .ent entry_point_jmp 43 entry_point_jmp: 42 FUNCTION_BEGIN(entry_point_jmp) 44 43 # tmp := entry_point 45 44 move $t9, $a0 … … 51 50 addiu $sp, -ABI_STACK_FRAME 52 51 addiu $sp, ABI_STACK_FRAME 53 .end entry_point_jmp 52 FUNCTION_END(entry_point_jmp) 53 -
uspace/lib/c/arch/mips32/src/fibril.S
ra52e2f4 r0407636 32 32 .set noreorder 33 33 34 #include <abi/asmtool.h> 34 35 #include <libarch/fibril_context.h> 35 36 36 .global context_save 37 .global context_restore 38 39 context_save: 37 FUNCTION_BEGIN(context_save) 40 38 sw $s0, CONTEXT_OFFSET_S0($a0) 41 39 sw $s1, CONTEXT_OFFSET_S1($a0) … … 92 90 j $ra 93 91 li $v0, 1 92 FUNCTION_END(context_save) 94 93 95 context_restore: 94 FUNCTION_BEGIN(context_restore) 96 95 lw $s0, CONTEXT_OFFSET_S0($a0) 97 96 lw $s1, CONTEXT_OFFSET_S1($a0) … … 151 150 j $ra 152 151 xor $v0, $v0 152 FUNCTION_END(context_restore) -
uspace/lib/c/arch/mips32/src/stacktrace_asm.S
ra52e2f4 r0407636 27 27 # 28 28 29 #include <abi/asmtool.h> 30 29 31 .text 30 32 … … 32 34 .set noreorder 33 35 34 .global stacktrace_prepare 35 .global stacktrace_fp_get 36 .global stacktrace_pc_get 37 38 stacktrace_prepare: 39 stacktrace_fp_get: 40 stacktrace_pc_get: 36 FUNCTION_BEGIN(stacktrace_prepare) 37 FUNCTION_BEGIN(stacktrace_fp_get) 38 FUNCTION_BEGIN(stacktrace_pc_get) 41 39 j $ra 42 40 xor $v0, $v0 41 FUNCTION_END(stacktrace_prepare) 42 FUNCTION_END(stacktrace_fp_get) 43 FUNCTION_END(stacktrace_pc_get) -
uspace/lib/c/arch/mips32/src/thread_entry.S
ra52e2f4 r0407636 27 27 # 28 28 29 #include <abi/asmtool.h> 29 30 #include <libarch/stack.h> 30 31 … … 35 36 .option pic2 36 37 37 .globl __thread_entry38 39 38 ## User-space thread entry point for all but the first threads. 40 39 # 41 40 # 42 .ent __thread_entry 43 __thread_entry: 41 SYMBOL(__thread_entry) 42 .ent __thread_entry 44 43 .frame $sp, ABI_STACK_FRAME, $ra 45 44 .cpload $t9 … … 63 62 # 64 63 addiu $sp, ABI_STACK_FRAME 65 .end __thread_entry
Note:
See TracChangeset
for help on using the changeset viewer.