Changes in / [fd608dc:439ba77] in mainline


Ignore:
Location:
kernel/arch/arm32
Files:
9 edited

Legend:

Unmodified
Added
Removed
  • kernel/arch/arm32/Makefile.inc

    rfd608dc r439ba77  
    3838ATSIGN = %
    3939
    40 GCC_CFLAGS += -fno-zero-initialized-in-bss -mapcs-frame
     40GCC_CFLAGS += -fno-zero-initialized-in-bss
    4141
    4242BITS = 32
  • kernel/arch/arm32/include/context.h

    rfd608dc r439ba77  
    4343#define SP_DELTA  (0 + ALIGN_UP(STACK_ITEM_SIZE, STACK_ALIGNMENT))
    4444
    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 
    5245#ifndef __ASM__
    5346
     
    6962        uint32_t r9;
    7063        uint32_t r10;
    71         uint32_t fp;    /* r11 */
     64        uint32_t r11;
    7265       
    7366        ipl_t ipl;
  • kernel/arch/arm32/include/exception.h

    rfd608dc r439ba77  
    102102        uint32_t r9;
    103103        uint32_t r10;
    104         uint32_t fp;
     104        uint32_t r11;
    105105        uint32_t r12;
    106106
     
    135135static inline unative_t istate_get_fp(istate_t *istate)
    136136{
    137         return istate->fp;
     137        return istate->r11;
    138138}
    139139
  • kernel/arch/arm32/src/debug/stacktrace.c

    rfd608dc r439ba77  
    3838#include <typedefs.h>
    3939
    40 #define FRAME_OFFSET_FP_PREV    -3
    41 #define FRAME_OFFSET_RA         -1
    42 
    4340bool kernel_frame_pointer_validate(uintptr_t fp)
    4441{
    45         return fp != 0;
     42        return false;
    4643}
    4744
    4845bool kernel_frame_pointer_prev(uintptr_t fp, uintptr_t *prev)
    4946{
    50         uint32_t *stack = (void *) fp;
    51 
    52         *prev = stack[FRAME_OFFSET_FP_PREV];
    53         return true;
     47        return false;
    5448}
    5549
    5650bool kernel_return_address_get(uintptr_t fp, uintptr_t *ra)
    5751{
    58         uint32_t *stack = (void *) fp;
    59 
    60         *ra = stack[FRAME_OFFSET_RA];
    61         return true;
     52        return false;
    6253}
    6354
    6455bool uspace_frame_pointer_validate(uintptr_t fp)
    6556{
    66         return fp != 0;
     57        return false;
    6758}
    6859
    6960bool uspace_frame_pointer_prev(uintptr_t fp, uintptr_t *prev)
    7061{
    71         return !copy_from_uspace((void *) prev,
    72             (uint32_t *) fp + FRAME_OFFSET_FP_PREV, sizeof(*prev));
     62        return false;
    7363}
    7464
    7565bool uspace_return_address_get(uintptr_t fp, uintptr_t *ra)
    7666{
    77         return !copy_from_uspace((void *) ra, (uint32_t *) fp + FRAME_OFFSET_RA,
    78             sizeof(*ra));
     67        return false;
    7968}
    8069
  • kernel/arch/arm32/src/debug/stacktrace_asm.S

    rfd608dc r439ba77  
    3333
    3434frame_pointer_get:
    35         mov r0, fp
    3635        mov pc, lr
    3736
    3837program_counter_get:
    39         mov r0, lr
    4038        mov pc, lr
  • kernel/arch/arm32/src/exc_handler.S

    rfd608dc r439ba77  
    123123        stmfd r13!, {r2}
    1241242:
    125         # Stop stack traces here
    126         mov fp, #0
    127125.endm
    128126
  • kernel/arch/arm32/src/exception.c

    rfd608dc r439ba77  
    4242#include <print.h>
    4343#include <syscall/syscall.h>
    44 #include <stacktrace.h>
    4544
    4645#ifdef MACHINE_testarm
     
    184183        printf(" r4: %x    r5: %x    r6: %x    r7: %x\n",
    185184            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);
    188187        printf(" r12: %x    sp: %x    lr: %x  spsr: %x\n",
    189188            istate->r12, istate->sp, istate->lr, istate->spsr);
    190189       
    191190        printf(" pc: %x\n", istate->pc);
    192 
    193         stack_trace_istate(istate);
    194191}
    195192
  • kernel/arch/arm32/src/mm/page_fault.c

    rfd608dc r439ba77  
    181181
    182182        if (ret == AS_PF_FAULT) {
    183                 fault_if_from_uspace(istate, "Page fault: %#x.", badvaddr);
    184183                print_istate(istate);
    185184                printf("page fault - pc: %x, va: %x, status: %x(%x), "
     
    187186                    access);
    188187               
     188                fault_if_from_uspace(istate, "Page fault: %#x.", badvaddr);
    189189                panic("Page fault.");
    190190        }
  • kernel/arch/arm32/src/start.S

    rfd608dc r439ba77  
    6969        bl arch_pre_main
    7070       
    71         #
    72         # Create the first stack frame.
    73         #
    74         mov fp, #0
    75         mov ip, sp
    76         push {fp, ip, lr, pc}
    77         sub fp, ip, #4
    78 
    7971        bl main_bsp
    8072
Note: See TracChangeset for help on using the changeset viewer.