Changeset b66cc97 in mainline
- Timestamp:
- 2016-04-24T08:00:09Z (9 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 38ad239
- Parents:
- 0407636
- Files:
-
- 11 edited
- 4 moved
Legend:
- Unmodified
- Added
- Removed
-
boot/arch/ppc32/src/asm.S
r0407636 rb66cc97 27 27 # 28 28 29 #include <abi/asmtool.h> 29 30 #include <arch/arch.h> 30 31 #include <arch/regname.h> … … 104 105 .endm 105 106 106 .global start107 .global halt108 .global jump_to_kernel109 .global real_mode110 111 107 .section BOOTSTRAP, "ax" 112 108 113 start: 109 SYMBOL(start) 114 110 lis r4, ofw_cif@ha 115 111 addi r4, r4, ofw_cif@l … … 121 117 .text 122 118 123 halt: 119 FUNCTION_BEGIN(halt) 124 120 b halt 125 126 jump_to_kernel: 127 121 FUNCTION_END(halt) 122 123 FUNCTION_BEGIN(jump_to_kernel) 128 124 # arguments: 129 125 # r3 = bootinfo (physical address) … … 153 149 isync 154 150 rfi 151 FUNCTION_END(jump_to_kernel) 155 152 156 153 .section REALMODE, "ax" 157 154 158 155 .align PAGE_WIDTH 159 real_mode: 156 SYMBOL(real_mode) 160 157 161 158 # arguments: -
kernel/arch/ppc32/Makefile.inc
r0407636 rb66cc97 45 45 arch/$(KARCH)/src/boot/boot.S \ 46 46 arch/$(KARCH)/src/ppc32.c \ 47 arch/$(KARCH)/src/dummy. s\47 arch/$(KARCH)/src/dummy.S \ 48 48 arch/$(KARCH)/src/exception.S \ 49 49 arch/$(KARCH)/src/interrupt.c \ -
kernel/arch/ppc32/src/asm.S
r0407636 rb66cc97 27 27 */ 28 28 29 #include <abi/asmtool.h> 29 30 #include <arch/asm/regname.h> 30 31 #include <arch/msr.h> … … 33 34 .text 34 35 35 .global userspace_asm 36 .global iret 37 .global iret_syscall 38 .global memcpy_from_uspace 39 .global memcpy_to_uspace 40 .global memcpy_from_uspace_failover_address 41 .global memcpy_to_uspace_failover_address 42 .global early_putchar 43 44 userspace_asm: 45 36 FUNCTION_BEGIN(userspace_asm) 46 37 /* 47 38 * r3 = uspace_uarg … … 78 69 79 70 rfi 80 81 iret: 82 71 FUNCTION_END(userspace_asm) 72 73 SYMBOL(iret) 83 74 /* Disable interrupts */ 84 75 … … 142 133 rfi 143 134 144 iret_syscall: 145 135 SYMBOL(iret_syscall) 146 136 /* Disable interrupts */ 147 137 … … 204 194 rfi 205 195 206 memcpy_from_uspace: 207 memcpy_to_uspace: 208 196 FUNCTION_BEGIN(memcpy_from_uspace) 197 FUNCTION_BEGIN(memcpy_to_uspace) 209 198 srwi. r7, r5, 3 210 199 addi r6, r3, -4 … … 267 256 mtctr r7 268 257 b 1b 269 270 memcpy_from_uspace_failover_address: 271 memcpy_to_uspace_failover_address: 258 FUNCTION_END(memcpy_from_uspace) 259 FUNCTION_END(memcpy_to_uspace) 260 261 SYMBOL(memcpy_from_uspace_failover_address) 262 SYMBOL(memcpy_to_uspace_failover_address) 272 263 /* Return zero, failure */ 273 264 xor r3, r3, r3 274 265 blr 275 266 276 early_putchar: 267 FUNCTION_BEGIN(early_putchar) 277 268 blr 269 FUNCTION_END(early_putchar) -
kernel/arch/ppc32/src/boot/boot.S
r0407636 rb66cc97 27 27 # 28 28 29 #include <abi/asmtool.h> 29 30 #include <arch/asm/regname.h> 30 31 #include <config.h> … … 32 33 .section K_TEXT_START, "ax" 33 34 34 .global kernel_image_start 35 kernel_image_start: 36 35 SYMBOL(kernel_image_start) 37 36 # load temporal kernel stack 38 37 -
kernel/arch/ppc32/src/context.S
r0407636 rb66cc97 27 27 # 28 28 29 #include <abi/asmtool.h> 29 30 #include <arch/context_struct.h> 30 31 #include <arch/asm/regname.h> … … 32 33 .text 33 34 34 .global context_save_arch 35 .global context_restore_arch 36 37 context_save_arch: 35 FUNCTION_BEGIN(context_save_arch) 38 36 stw sp, CONTEXT_OFFSET_SP(r3) 39 37 stw r2, CONTEXT_OFFSET_R2(r3) … … 67 65 li r3, 1 68 66 blr 67 FUNCTION_END(context_save_arch) 69 68 70 context_restore_arch: 69 FUNCTION_BEGIN(context_restore_arch) 71 70 lwz sp, CONTEXT_OFFSET_SP(r3) 72 71 lwz r2, CONTEXT_OFFSET_R2(r3) … … 100 99 li r3, 0 101 100 blr 101 FUNCTION_END(context_restore_arch) -
kernel/arch/ppc32/src/debug/stacktrace_asm.S
r0407636 rb66cc97 27 27 # 28 28 29 #include <abi/asmtool.h> 29 30 #include <arch/asm/regname.h> 30 31 31 32 .text 32 33 33 .global frame_pointer_get 34 .global program_counter_get 35 36 frame_pointer_get: 34 FUNCTION_BEGIN(frame_pointer_get) 37 35 mr r3, sp 38 36 blr 37 FUNCTION_END(frame_pointer_get) 39 38 40 program_counter_get: 39 FUNCTION_BEGIN(program_counter_get) 41 40 mflr r3 42 41 blr 42 FUNCTION_END(program_counter_get) -
kernel/arch/ppc32/src/dummy.S
r0407636 rb66cc97 27 27 # 28 28 29 #include <abi/asmtool.h> 30 29 31 .text 30 32 31 .global asm_delay_loop 32 .globalsys_tls_set33 .global cpu_halt 33 FUNCTION_BEGIN(sys_tls_set) 34 b sys_tls_set 35 FUNCTION_END(sys_tls_set) 34 36 35 sys_tls_set: 36 b sys_tls_set 37 FUNCTION_BEGIN(asm_delay_loop) 38 blr 39 FUNCTION_END(asm_delay_loop) 37 40 38 asm_delay_loop: 39 blr 40 41 cpu_halt: 41 FUNCTION_BEGIN(cpu_halt) 42 42 b cpu_halt 43 FUNCTION_END(cpu_halt) -
kernel/arch/ppc32/src/exception.S
r0407636 rb66cc97 27 27 # 28 28 29 #include <abi/asmtool.h> 29 30 #include <arch/asm/regname.h> 30 31 #include <arch/msr.h> … … 126 127 127 128 .org 0x100 128 .global exc_system_reset 129 exc_system_reset: 129 SYMBOL(exc_system_reset) 130 130 CONTEXT_STORE 131 131 … … 134 134 135 135 .org 0x200 136 .global exc_machine_check 137 exc_machine_check: 136 SYMBOL(exc_machine_check) 138 137 CONTEXT_STORE 139 138 … … 142 141 143 142 .org 0x300 144 .global exc_data_storage 145 exc_data_storage: 143 SYMBOL(exc_data_storage) 146 144 CONTEXT_STORE 147 145 … … 150 148 151 149 .org 0x400 152 .global exc_instruction_storage 153 exc_instruction_storage: 150 SYMBOL(exc_instruction_storage) 154 151 CONTEXT_STORE 155 152 … … 158 155 159 156 .org 0x500 160 .global exc_external 161 exc_external: 157 SYMBOL(exc_external) 162 158 CONTEXT_STORE 163 159 … … 166 162 167 163 .org 0x600 168 .global exc_alignment 169 exc_alignment: 164 SYMBOL(exc_alignment) 170 165 CONTEXT_STORE 171 166 … … 174 169 175 170 .org 0x700 176 .global exc_program 177 exc_program: 171 SYMBOL(exc_program) 178 172 CONTEXT_STORE 179 173 … … 182 176 183 177 .org 0x800 184 .global exc_fp_unavailable 185 exc_fp_unavailable: 178 SYMBOL(exc_fp_unavailable) 186 179 CONTEXT_STORE 187 180 … … 190 183 191 184 .org 0x900 192 .global exc_decrementer 193 exc_decrementer: 185 SYMBOL(exc_decrementer) 194 186 CONTEXT_STORE 195 187 … … 198 190 199 191 .org 0xa00 200 .global exc_reserved0 201 exc_reserved0: 192 SYMBOL(exc_reserved0) 202 193 CONTEXT_STORE 203 194 … … 206 197 207 198 .org 0xb00 208 .global exc_reserved1 209 exc_reserved1: 199 SYMBOL(exc_reserved1) 210 200 CONTEXT_STORE 211 201 … … 214 204 215 205 .org 0xc00 216 .global exc_syscall 217 exc_syscall: 206 SYMBOL(exc_syscall) 218 207 CONTEXT_STORE 219 208 … … 221 210 222 211 .org 0xd00 223 .global exc_trace 224 exc_trace: 212 SYMBOL(exc_trace) 225 213 CONTEXT_STORE 226 214 … … 229 217 230 218 .org 0x1000 231 .global exc_itlb_miss 232 exc_itlb_miss: 219 SYMBOL(exc_itlb_miss) 233 220 CONTEXT_STORE 234 221 … … 237 224 238 225 .org 0x1100 239 .global exc_dtlb_miss_load 240 exc_dtlb_miss_load: 226 SYMBOL(exc_dtlb_miss_load) 241 227 CONTEXT_STORE 242 228 … … 245 231 246 232 .org 0x1200 247 .global exc_dtlb_miss_store 248 exc_dtlb_miss_store: 233 SYMBOL(exc_dtlb_miss_store) 249 234 CONTEXT_STORE 250 235 -
kernel/arch/ppc32/src/fpu_context.S
r0407636 rb66cc97 27 27 # 28 28 29 #include <abi/asmtool.h> 29 30 #include <arch/asm/regname.h> 30 31 #include <arch/fpu_context_struct.h> … … 32 33 33 34 .text 34 35 .global fpu_context_save36 .global fpu_context_restore37 .global fpu_init38 .global fpu_enable39 .global fpu_disable40 35 41 36 .macro FPU_CONTEXT_STORE r … … 109 104 .endm 110 105 111 fpu_context_save: 106 FUNCTION_BEGIN(fpu_context_save) 112 107 FPU_CONTEXT_STORE r3 113 108 … … 116 111 117 112 blr 113 FUNCTION_END(fpu_context_save) 118 114 119 fpu_context_restore: 115 FUNCTION_BEGIN(fpu_context_restore) 120 116 lfd fr0, FPU_CONTEXT_OFFSET_FPSCR(r3) 121 117 mtfsf 0xff, fr0 … … 124 120 125 121 blr 122 FUNCTION_END(fpu_context_restore) 126 123 127 fpu_init: 124 FUNCTION_BEGIN(fpu_init) 128 125 mfmsr r0 129 126 ori r0, r0, MSR_FP … … 137 134 138 135 blr 136 FUNCTION_END(fpu_init) 139 137 140 fpu_enable: 138 FUNCTION_BEGIN(fpu_enable) 141 139 mfmsr r0 142 140 ori r0, r0, MSR_FP … … 144 142 isync 145 143 blr 144 FUNCTION_END(fpu_enable) 146 145 147 fpu_disable: 146 FUNCTION_BEGIN(fpu_disable) 148 147 mfmsr r0 149 148 li r3, MSR_FP … … 152 151 isync 153 152 blr 153 FUNCTION_END(fpu_disable) -
uspace/lib/c/arch/ppc32/Makefile.inc
r0407636 rb66cc97 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/syscall.c \ 34 34 arch/$(UARCH)/src/fibril.S \ -
uspace/lib/c/arch/ppc32/src/entry.S
r0407636 rb66cc97 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 … … 37 37 # r6 contains the PCB pointer 38 38 # 39 __entry: 39 SYMBOL(__entry) 40 40 # 41 41 # Create the first stack frame. -
uspace/lib/c/arch/ppc32/src/entryjmp.S
r0407636 rb66cc97 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 mtctr %r3 39 39 mr %r6, %r4 # Pass pcb to the entry point in %r6 40 40 bctr 41 FUNCTION_END(entry_point_jmp) -
uspace/lib/c/arch/ppc32/src/fibril.S
r0407636 rb66cc97 29 29 .text 30 30 31 .global context_save 32 .global context_restore 33 31 #include <abi/asmtool.h> 34 32 #include <libarch/regname.h> 35 33 #include <libarch/fibril_context.h> 36 34 37 context_save: 35 FUNCTION_BEGIN(context_save) 38 36 stw sp, CONTEXT_OFFSET_SP(r3) 39 37 stw r2, CONTEXT_OFFSET_TLS(r3) … … 67 65 li r3, 1 68 66 blr 67 FUNCTION_END(context_save) 69 68 70 71 context_restore: 69 FUNCTION_BEGIN(context_restore) 72 70 lwz sp, CONTEXT_OFFSET_SP(r3) 73 71 lwz r2, CONTEXT_OFFSET_TLS(r3) … … 101 99 li r3, 0 102 100 blr 101 FUNCTION_END(context_restore) -
uspace/lib/c/arch/ppc32/src/stacktrace_asm.S
r0407636 rb66cc97 29 29 .text 30 30 31 #include <abi/asmtool.h> 31 32 #include <libarch/regname.h> 32 33 33 .global stacktrace_prepare 34 .global stacktrace_fp_get 35 .global stacktrace_pc_get 34 FUNCTION_BEGIN(stacktrace_prepare) 35 blr 36 FUNCTION_END(stacktrace_prepare) 36 37 37 stacktrace_prepare: 38 blr 39 40 stacktrace_fp_get: 38 FUNCTION_BEGIN(stacktrace_fp_get) 41 39 mr r3, sp 42 40 blr 41 FUNCTION_END(stacktrace_fp_get) 43 42 44 stacktrace_pc_get: 43 FUNCTION_BEGIN(stacktrace_pc_get) 45 44 mflr r3 46 45 blr 46 FUNCTION_END(stacktrace_pc_get) -
uspace/lib/c/arch/ppc32/src/thread_entry.S
r0407636 rb66cc97 27 27 # 28 28 29 #include <abi/asmtool.h> 30 29 31 .text 30 32 31 .globl __thread_entry32 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. … … 44 44 b __thread_main 45 45 46 .end __thread_entry
Note:
See TracChangeset
for help on using the changeset viewer.