Changeset e28175d in mainline for kernel/arch/arm64
- Timestamp:
- 2020-03-15T10:44:02Z (6 years ago)
- Parents:
- b401b33 (diff), 44dde42 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the(diff)links above to see all the changes relative to each parent. - git-author:
- heiducteam <tristanided@…> (2020-03-15 10:44:02)
- git-committer:
- GitHub <noreply@…> (2020-03-15 10:44:02)
- Location:
- kernel/arch/arm64
- Files:
-
- 1 deleted
- 2 edited
- 1 moved
-
Makefile.inc (deleted)
-
meson.build (moved) (moved from uspace/lib/c/arch/arm64/Makefile.inc ) (1 diff)
-
src/arm64.c (modified) (3 diffs)
-
src/debug/stacktrace.c (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
kernel/arch/arm64/meson.build
rb401b33 re28175d 27 27 # 28 28 29 ARCH_SOURCES = \ 30 arch/$(UARCH)/src/entryjmp.S \ 31 arch/$(UARCH)/src/fibril.S \ 32 arch/$(UARCH)/src/stacktrace.c \ 33 arch/$(UARCH)/src/stacktrace_asm.S \ 34 arch/$(UARCH)/src/syscall.c \ 35 arch/$(UARCH)/src/tls.c \ 36 arch/$(UARCH)/src/thread_entry.S 29 arch_src += files( 30 'src/arm64.c', 31 'src/asm.S', 32 'src/context.S', 33 'src/cpu/cpu.c', 34 'src/debug/stacktrace.c', 35 'src/debug/stacktrace_asm.S', 36 'src/exception.c', 37 'src/fpu.S', 38 'src/fpu_context.c', 39 'src/interrupt.c', 40 'src/machine_func.c', 41 'src/mm/as.c', 42 'src/mm/frame.c', 43 'src/mm/km.c', 44 'src/mm/page.c', 45 'src/mm/tlb.c', 46 'src/smc.c', 47 'src/smp/ipi.c', 48 'src/smp/smp.c', 49 'src/start.S', 50 ) 37 51 38 ARCH_AUTOCHECK_HEADERS = \ 39 arch/$(UARCH)/include/libarch/fibril_context.h 52 if MACHINE == 'virt' 53 arch_src += files('src/mach/virt/virt.c') 54 endif 55 56 _check_headers = [ 57 'include/arch/context_struct.h', 58 'include/arch/fpu_context_struct.h', 59 'include/arch/istate_struct.h', 60 ] 61 62 foreach h : _check_headers 63 arch_src += [ autocheck.process(h) ] 64 endforeach -
kernel/arch/arm64/src/arm64.c
rb401b33 re28175d 156 156 157 157 /* Set program entry. */ 158 ELR_EL1_write( (uint64_t)kernel_uarg->uspace_entry);158 ELR_EL1_write(kernel_uarg->uspace_entry); 159 159 160 160 /* Set user stack. */ 161 SP_EL0_write( ((uint64_t)kernel_uarg->uspace_stack +162 kernel_uarg->uspace_stack_size) );161 SP_EL0_write(kernel_uarg->uspace_stack + 162 kernel_uarg->uspace_stack_size); 163 163 164 164 /* Clear Thread ID register. */ … … 167 167 asm volatile ( 168 168 /* 169 * Clear all general-purpose registers, except x0 that holds an 170 * argument for the user space. 169 * Reset the kernel stack to its base value. 170 * 171 * Clear all general-purpose registers, 172 * except x0 that holds an argument for 173 * the user space. 171 174 */ 175 "mov sp, %[kstack]\n" 172 176 "mov x0, %[uspace_uarg]\n" 173 177 "mov x1, #0\n" … … 202 206 "mov x30, #0\n" 203 207 "eret\n" 204 :: [uspace_uarg] "r" (kernel_uarg->uspace_uarg) 208 :: [uspace_uarg] "r" (kernel_uarg->uspace_uarg), 209 [kstack] "r" (((uint64_t) (THREAD->kstack)) + 210 MEM_STACK_SIZE - SP_DELTA) 205 211 ); 206 212 -
kernel/arch/arm64/src/debug/stacktrace.c
rb401b33 re28175d 68 68 bool uspace_frame_pointer_prev(stack_trace_context_t *ctx, uintptr_t *prev) 69 69 { 70 return !copy_from_uspace( (void *)prev,71 (uint64_t *) ctx->fp +FRAME_OFFSET_FP_PREV, sizeof(*prev));70 return !copy_from_uspace(prev, 71 ctx->fp + sizeof(uintptr_t) * FRAME_OFFSET_FP_PREV, sizeof(*prev)); 72 72 } 73 73 74 74 bool uspace_return_address_get(stack_trace_context_t *ctx, uintptr_t *ra) 75 75 { 76 return !copy_from_uspace( (void *)ra,77 (uint64_t *) ctx->fp +FRAME_OFFSET_RA, sizeof(*ra));76 return !copy_from_uspace(ra, 77 ctx->fp + sizeof(uintptr_t) * FRAME_OFFSET_RA, sizeof(*ra)); 78 78 } 79 79
Note:
See TracChangeset
for help on using the changeset viewer.
