Changeset 38ad239 in mainline
- Timestamp:
- 2016-04-24T08:42:07Z (8 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- bc41f3a3
- Parents:
- b66cc97
- Files:
-
- 7 edited
- 3 moved
Legend:
- Unmodified
- Added
- Removed
-
boot/arch/sparc32/src/asm.S
rb66cc97 r38ad239 27 27 # 28 28 29 #include <abi/asmtool.h> 29 30 #include <arch/arch.h> 30 31 31 32 .section BOOTSTRAP 32 33 33 .global start 34 .global boot_pt 35 .global boot_ctx_table 36 .global boot_stack 37 .global halt 38 .global jump_to_kernel 39 40 start: 34 SYMBOL(start) 41 35 b bootstrap 42 36 nop … … 44 38 .section BOOTPT 45 39 .align 4096 46 boot_pt: 40 SYMBOL(boot_pt) 47 41 .space PTL0_ENTRIES * PTL0_ENTRY_SIZE 48 42 49 boot_ctx_table: 43 SYMBOL(boot_ctx_table) 50 44 .space 4 51 45 52 46 .section BOOTSTACK 53 47 .space 4096 54 boot_stack: 48 SYMBOL(boot_stack) 55 49 56 50 .text 57 51 58 halt: 52 FUNCTION_BEGIN(halt) 59 53 b halt 60 54 nop 55 FUNCTION_END(halt) 61 56 62 jump_to_kernel: 57 FUNCTION_BEGIN(jump_to_kernel) 63 58 set 0x80a00000, %l0 64 59 mov %i1, %o0 65 60 jmp %l0 66 61 nop 62 FUNCTION_END(jump_to_kernel) -
kernel/arch/sparc32/src/context.S
rb66cc97 r38ad239 28 28 # 29 29 30 #include <abi/asmtool.h> 30 31 #include <arch/context_offset.h> 31 32 #include <arch/arch.h> … … 33 34 .text 34 35 35 .global context_save_arch36 .global context_restore_arch37 38 36 /* 39 37 * context_save_arch() is required not to create its own stack frame. See the 40 38 * generic context.h for explanation. 41 39 */ 42 context_save_arch: 40 FUNCTION_BEGIN(context_save_arch) 43 41 # 44 42 # Force all our active register windows to memory so that we can find … … 62 60 retl 63 61 mov 1, %o0 ! context_save_arch returns 1 62 FUNCTION_END(context_save_arch) 64 63 65 context_restore_arch: 64 FUNCTION_BEGIN(context_restore_arch) 66 65 # 67 66 # Forget all previous windows, they are not going to be needed again. … … 97 96 retl 98 97 xor %o0, %o0, %o0 ! context_restore_arch returns 0 98 FUNCTION_END(context_restore_arch) -
kernel/arch/sparc32/src/start.S
rb66cc97 r38ad239 27 27 # 28 28 29 #include <abi/asmtool.h> 30 29 31 .text 30 32 31 .global kernel_image_start 32 .global early_putchar 33 .global kernel_sp 34 .global uspace_wbuf 35 36 kernel_image_start: 33 SYMBOL(kernel_image_start) 37 34 # Install trap handlers 38 35 set trap_table, %g1 … … 68 65 nop 69 66 70 early_putchar: 67 FUNCTION_BEGIN(early_putchar) 71 68 set 0x80000100, %l0 72 69 cmp %o0, '\n' … … 80 77 retl 81 78 nop 79 FUNCTION_END(early_putchar) 82 80 83 kernel_sp: 81 SYMBOL(kernel_sp) 84 82 .space 4 85 83 86 uspace_wbuf: 84 SYMBOL(uspace_wbuf) 87 85 .space 4 88 86 -
kernel/arch/sparc32/src/trap_table.S
rb66cc97 r38ad239 27 27 # 28 28 29 #include <abi/asmtool.h> 29 30 #include <arch/trap.h> 30 31 #include <arch/regwin.h> 31 32 32 33 .text 33 34 .global trap_table35 .global reset_trap36 .global preemptible_trap37 .global interrupt_trap38 .global syscall_trap39 .global window_overflow_trap40 .global window_underflow_trap41 .global write_to_invalid42 .global read_from_invalid43 .global flush_windows44 34 45 35 .macro get_wim_number reg … … 218 208 .endm 219 209 220 write_to_invalid: 210 FUNCTION_BEGIN(write_to_invalid) 221 211 ! Write value 1 222 212 mov %o0, %g7 … … 236 226 retl 237 227 nop 238 239 read_from_invalid: 228 FUNCTION_END(write_to_invalid) 229 230 FUNCTION_BEGIN(read_from_invalid) 240 231 ! Read value 1 241 232 mov %o0, %g7 … … 255 246 retl 256 247 nop 257 258 reset_trap: 248 FUNCTION_END(read_from_invalid) 249 250 SYMBOL(reset_trap) 259 251 set 0x80000100, %l0 260 252 set 'r', %l1 … … 262 254 rett 263 255 264 window_overflow_trap: 256 SYMBOL(window_overflow_trap) 265 257 mov %g7, %l0 266 258 … … 393 385 rett %l2 394 386 395 window_underflow_trap: 387 SYMBOL(window_underflow_trap) 396 388 mov %g7, %l0 397 389 … … 479 471 rett %l2 480 472 481 flush_windows: 473 FUNCTION_BEGIN(flush_windows) 482 474 mov 7, %g1 483 475 1: … … 494 486 retl 495 487 nop 496 497 preemptible_trap: 488 FUNCTION_END(flush_windows) 489 490 SYMBOL(preemptible_trap) 498 491 /* Save %g7 */ 499 492 mov %g7, %l0 … … 670 663 rett %l2 671 664 672 interrupt_trap: 665 SYMBOL(interrupt_trap) 673 666 /* Save %g7 */ 674 667 mov %g7, %l0 … … 844 837 rett %l2 845 838 846 syscall_trap: 839 SYMBOL(syscall_trap) 847 840 /* Save %g7 */ 848 841 mov %g7, %l0 … … 1051 1044 1052 1045 .align TRAP_TABLE_SIZE 1053 trap_table: 1046 SYMBOL(trap_table) 1054 1047 STRAP(0x0, reset_trap) 1055 1048 TRAP(0x1, instruction_access_exception) -
uspace/lib/c/arch/sparc32/Makefile.inc
rb66cc97 r38ad239 28 28 29 29 ARCH_SOURCES = \ 30 arch/$(UARCH)/src/entry. s\31 arch/$(UARCH)/src/entryjmp. s\32 arch/$(UARCH)/src/thread_entry. s\30 arch/$(UARCH)/src/entry.S \ 31 arch/$(UARCH)/src/entryjmp.S \ 32 arch/$(UARCH)/src/thread_entry.S \ 33 33 arch/$(UARCH)/src/fibril.S \ 34 34 arch/$(UARCH)/src/tls.c \ -
uspace/lib/c/arch/sparc32/src/entry.S
rb66cc97 r38ad239 27 27 # 28 28 29 #include <abi/asmtool.h> 30 29 31 .section .init, "ax" 30 32 31 33 .org 0 32 33 .globl __entry34 34 35 35 ## User-space task entry point … … 38 38 # %o1 contains pcb_ptr 39 39 # 40 __entry: 40 SYMBOL(__entry) 41 41 # 42 42 # Create the first stack frame. -
uspace/lib/c/arch/sparc32/src/entryjmp.S
rb66cc97 r38ad239 27 27 # 28 28 29 .globl entry_point_jmp 29 #include <abi/asmtool.h> 30 30 31 31 ## void entry_point_jmp(void *entry_point, void *pcb); … … 35 35 # 36 36 # Jump to program entry point 37 entry_point_jmp: 37 FUNCTION_BEGIN(entry_point_jmp) 38 38 # Pass pcb pointer to entry point in %o1. As it is already 39 39 # there, no action is needed. … … 41 41 nop 42 42 # FIXME: use branch instead of call 43 FUNCTION_END(entry_point_jmp) -
uspace/lib/c/arch/sparc32/src/fibril.S
rb66cc97 r38ad239 27 27 # 28 28 29 #include <abi/asmtool.h> 29 30 #include <libarch/context_offset.h> 30 31 31 32 .text 32 33 33 .global flush_windows 34 .global context_save 35 .global context_restore 36 37 context_save: 34 FUNCTION_BEGIN(context_save) 38 35 # 39 36 # We rely on the kernel to flush our active register windows to memory … … 56 53 retl 57 54 mov 1, %o0 ! context_save_arch returns 1 55 FUNCTION_END(context_save) 58 56 59 context_restore: 57 FUNCTION_BEGIN(context_restore) 60 58 # 61 59 # Flush all active windows. … … 84 82 retl 85 83 xor %o0, %o0, %o0 ! context_restore_arch returns 0 84 FUNCTION_END(context_restore) -
uspace/lib/c/arch/sparc32/src/stacktrace_asm.S
rb66cc97 r38ad239 27 27 # 28 28 29 #include <abi/asmtool.h> 29 30 #include <libarch/stack.h> 30 31 31 32 .text 32 33 33 .global stacktrace_prepare 34 .global stacktrace_fp_get 35 .global stacktrace_pc_get 36 37 stacktrace_prepare: 34 FUNCTION_BEGIN(stacktrace_prepare) 38 35 save %sp, -(STACK_WINDOW_SAVE_AREA_SIZE+STACK_ARG_SAVE_AREA_SIZE), %sp 39 36 … … 53 50 ret 54 51 restore 52 FUNCTION_END(stacktrace_prepare) 55 53 56 stacktrace_fp_get: 54 FUNCTION_BEGIN(stacktrace_fp_get) 57 55 # Add the stack bias to %sp to get the actual address. 58 56 retl 59 57 mov %sp, %o0 58 FUNCTION_END(stacktrace_fp_get) 60 59 61 stacktrace_pc_get: 60 FUNCTION_BEGIN(stacktrace_pc_get) 62 61 retl 63 62 mov %o7, %o0 63 FUNCTION_END(stacktrace_pc_get) -
uspace/lib/c/arch/sparc32/src/thread_entry.S
rb66cc97 r38ad239 27 27 # 28 28 29 #include <abi/asmtool.h> 30 29 31 .text 30 31 .globl __thread_entry32 32 33 33 ## User-space thread entry point for all but the first threads. 34 34 # 35 35 # 36 __thread_entry: 36 SYMBOL(__thread_entry) 37 37 # 38 38 # Create the first stack frame. … … 66 66 67 67 ! not reached 68 69 .end __thread_entry
Note:
See TracChangeset
for help on using the changeset viewer.