Changes in / [fd608dc:439ba77] in mainline
- Location:
- kernel/arch/arm32
- Files:
-
- 9 edited
Legend:
- Unmodified
- Added
- Removed
-
kernel/arch/arm32/Makefile.inc
rfd608dc r439ba77 38 38 ATSIGN = % 39 39 40 GCC_CFLAGS += -fno-zero-initialized-in-bss -mapcs-frame40 GCC_CFLAGS += -fno-zero-initialized-in-bss 41 41 42 42 BITS = 32 -
kernel/arch/arm32/include/context.h
rfd608dc r439ba77 43 43 #define SP_DELTA (0 + ALIGN_UP(STACK_ITEM_SIZE, STACK_ALIGNMENT)) 44 44 45 #define context_set(c, _pc, stack, size) \46 do { \47 (c)->pc = (uintptr_t) (_pc); \48 (c)->sp = ((uintptr_t) (stack)) + (size) - SP_DELTA; \49 (c)->fp = 0; \50 } while (0)51 52 45 #ifndef __ASM__ 53 46 … … 69 62 uint32_t r9; 70 63 uint32_t r10; 71 uint32_t fp; /* r11 */64 uint32_t r11; 72 65 73 66 ipl_t ipl; -
kernel/arch/arm32/include/exception.h
rfd608dc r439ba77 102 102 uint32_t r9; 103 103 uint32_t r10; 104 uint32_t fp;104 uint32_t r11; 105 105 uint32_t r12; 106 106 … … 135 135 static inline unative_t istate_get_fp(istate_t *istate) 136 136 { 137 return istate-> fp;137 return istate->r11; 138 138 } 139 139 -
kernel/arch/arm32/src/debug/stacktrace.c
rfd608dc r439ba77 38 38 #include <typedefs.h> 39 39 40 #define FRAME_OFFSET_FP_PREV -341 #define FRAME_OFFSET_RA -142 43 40 bool kernel_frame_pointer_validate(uintptr_t fp) 44 41 { 45 return f p != 0;42 return false; 46 43 } 47 44 48 45 bool kernel_frame_pointer_prev(uintptr_t fp, uintptr_t *prev) 49 46 { 50 uint32_t *stack = (void *) fp; 51 52 *prev = stack[FRAME_OFFSET_FP_PREV]; 53 return true; 47 return false; 54 48 } 55 49 56 50 bool kernel_return_address_get(uintptr_t fp, uintptr_t *ra) 57 51 { 58 uint32_t *stack = (void *) fp; 59 60 *ra = stack[FRAME_OFFSET_RA]; 61 return true; 52 return false; 62 53 } 63 54 64 55 bool uspace_frame_pointer_validate(uintptr_t fp) 65 56 { 66 return f p != 0;57 return false; 67 58 } 68 59 69 60 bool uspace_frame_pointer_prev(uintptr_t fp, uintptr_t *prev) 70 61 { 71 return !copy_from_uspace((void *) prev, 72 (uint32_t *) fp + FRAME_OFFSET_FP_PREV, sizeof(*prev)); 62 return false; 73 63 } 74 64 75 65 bool uspace_return_address_get(uintptr_t fp, uintptr_t *ra) 76 66 { 77 return !copy_from_uspace((void *) ra, (uint32_t *) fp + FRAME_OFFSET_RA, 78 sizeof(*ra)); 67 return false; 79 68 } 80 69 -
kernel/arch/arm32/src/debug/stacktrace_asm.S
rfd608dc r439ba77 33 33 34 34 frame_pointer_get: 35 mov r0, fp36 35 mov pc, lr 37 36 38 37 program_counter_get: 39 mov r0, lr40 38 mov pc, lr -
kernel/arch/arm32/src/exc_handler.S
rfd608dc r439ba77 123 123 stmfd r13!, {r2} 124 124 2: 125 # Stop stack traces here126 mov fp, #0127 125 .endm 128 126 -
kernel/arch/arm32/src/exception.c
rfd608dc r439ba77 42 42 #include <print.h> 43 43 #include <syscall/syscall.h> 44 #include <stacktrace.h>45 44 46 45 #ifdef MACHINE_testarm … … 184 183 printf(" r4: %x r5: %x r6: %x r7: %x\n", 185 184 istate->r4, istate->r5, istate->r6, istate->r7); 186 printf(" r8: %x r8: %x r10: %x fp: %x\n",187 istate->r8, istate->r9, istate->r10, istate-> fp);185 printf(" r8: %x r8: %x r10: %x r11: %x\n", 186 istate->r8, istate->r9, istate->r10, istate->r11); 188 187 printf(" r12: %x sp: %x lr: %x spsr: %x\n", 189 188 istate->r12, istate->sp, istate->lr, istate->spsr); 190 189 191 190 printf(" pc: %x\n", istate->pc); 192 193 stack_trace_istate(istate);194 191 } 195 192 -
kernel/arch/arm32/src/mm/page_fault.c
rfd608dc r439ba77 181 181 182 182 if (ret == AS_PF_FAULT) { 183 fault_if_from_uspace(istate, "Page fault: %#x.", badvaddr);184 183 print_istate(istate); 185 184 printf("page fault - pc: %x, va: %x, status: %x(%x), " … … 187 186 access); 188 187 188 fault_if_from_uspace(istate, "Page fault: %#x.", badvaddr); 189 189 panic("Page fault."); 190 190 } -
kernel/arch/arm32/src/start.S
rfd608dc r439ba77 69 69 bl arch_pre_main 70 70 71 #72 # Create the first stack frame.73 #74 mov fp, #075 mov ip, sp76 push {fp, ip, lr, pc}77 sub fp, ip, #478 79 71 bl main_bsp 80 72
Note:
See TracChangeset
for help on using the changeset viewer.