Changeset 40d4c1d in mainline for kernel/arch/ia32/src


Ignore:
Timestamp:
2010-01-08T22:13:34Z (16 years ago)
Author:
Jakub Jermar <jakub@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
234e39e
Parents:
eb0bc90 (diff), 6d7f9bfe (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.
Message:

Merge the stack tracing branch.

The merge includes generic and amd64 and ia32 support for kernel stack traces.
The kernel will now print a stack trace for each killed task and also for
each bad trap and panic. The rest of the architectures have dummy support,
i.e. they compile and run, but the kernel cannot print the stack trace.

Location:
kernel/arch/ia32/src
Files:
2 added
5 edited

Legend:

Unmodified
Added
Removed
  • kernel/arch/ia32/src/asm.S

    reb0bc90 r40d4c1d  
    269269        pushl %gs
    270270
     271        pushl %ebp
    271272        pushl %edx
    272273        pushl %ecx
     
    278279        movw %ax, %es
    279280
    280         cld
     281        # stop stack traces here
     282        xorl %ebp, %ebp
    281283
    282284        pushl %esp          # *istate
     
    290292        popl %ecx
    291293        popl %edx
     294        popl %ebp
    292295       
    293296        popl %gs
  • kernel/arch/ia32/src/boot/boot.S

    reb0bc90 r40d4c1d  
    9494        pushl grub_eax
    9595        call arch_pre_main
     96
     97        # Create the first stack frame
     98        pushl $0
     99        movl %esp, %ebp
    96100       
    97101        call main_bsp
  • kernel/arch/ia32/src/interrupt.c

    reb0bc90 r40d4c1d  
    5353#include <ddi/irq.h>
    5454#include <symtab.h>
     55#include <stacktrace.h>
    5556
    5657/*
     
    7980        printf("stack: %#lx, %#lx, %#lx, %#lx\n", istate->stack[0], istate->stack[1], istate->stack[2], istate->stack[3]);
    8081        printf("       %#lx, %#lx, %#lx, %#lx\n", istate->stack[4], istate->stack[5], istate->stack[6], istate->stack[7]);
     82
     83        stack_trace_istate(istate);
    8184}
    8285
  • kernel/arch/ia32/src/mm/page.c

    reb0bc90 r40d4c1d  
    8080{
    8181        if (last_frame + ALIGN_UP(size, PAGE_SIZE) > KA2PA(KERNEL_ADDRESS_SPACE_END_ARCH))
    82                 panic("Unable to map physical memory %p (%d bytes).", physaddr, size)
     82                panic("Unable to map physical memory %p (%d bytes).", physaddr, size);
    8383       
    8484        uintptr_t virtaddr = PA2KA(last_frame);
  • kernel/arch/ia32/src/smp/ap.S

    reb0bc90 r40d4c1d  
    7878        addl $0x80000000, %esp                  # PA2KA(ctx.sp)
    7979       
     80        pushl $0                                # create the first stack frame
     81        movl %esp, %ebp
     82
    8083        jmpl $KTEXT, $main_ap
    8184
Note: See TracChangeset for help on using the changeset viewer.