Changeset e3038b4 in mainline for kernel/arch/amd64/src/asm_utils.S


Ignore:
Timestamp:
2010-06-28T22:45:51Z (15 years ago)
Author:
Jakub Jermar <jakub@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
49eb681
Parents:
05e3cb8 (diff), e4a4b44 (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 unified panic architecture (Phase 1).

Note that this is still work in progress as there are the following sharp edges:

  • imprecise detection of read/write accesses on some architectures
  • missing or imperfect capability to print stack traces on some architectures
  • istate_t on some architectures may contain too little valuable information
  • basically all trap frames need to be reorganized to look like a normal stack frame on the stack trace so that there are no missing frames
  • panic_common() could print more information about the current context such as the task name, thread name, ASID etc.
  • functions that call panic_*() should be protected against inlining to avoid missing or confusing stack frames in the stack trace
File:
1 edited

Legend:

Unmodified
Added
Removed
  • kernel/arch/amd64/src/asm_utils.S

    r05e3cb8 re3038b4  
    5151.global interrupt_handlers
    5252.global syscall_entry
    53 .global panic_printf
    54 
    55 panic_printf:
    56         movabsq $halt, %rax
    57         movq %rax, (%rsp)
    58         jmp printf
    59 
    6053.global cpuid
    6154.global has_cpuid
     
    234227        save_all_gpr
    235228        cld
    236        
    237         # Stop stack traces here
    238         xorq %rbp, %rbp
    239        
    240         movq $(\i), %rdi    # %rdi - first parameter
    241         movq %rsp, %rsi     # %rsi - pointer to istate
    242         call exc_dispatch   # exc_dispatch(i, istate)
     229
     230        #
     231        # Stop stack traces here if we came from userspace.
     232        #
     233        movq %cs, %rax
     234        xorq %rdx, %rdx
     235        cmpq %rax, IREGISTER_SPACE+16(%rsp)
     236        cmovneq %rdx, %rbp
     237
     238        movq $(\i), %rdi        # %rdi - first parameter
     239        movq %rsp, %rsi         # %rsi - pointer to istate
     240        call exc_dispatch       # exc_dispatch(i, istate)
    243241       
    244242        restore_all_gpr
     
    290288        pushq %rcx
    291289        pushq %r11
    292        
    293         movq %r10, %rcx   # Copy the 4th argument where it is expected
     290        pushq %rbp
     291
     292        xorq %rbp, %rbp         # stop the stack traces here
     293
     294        movq %r10, %rcx         # Copy the 4th argument where it is expected
    294295        pushq %rax
    295296        call syscall_handler
    296297        addq $8, %rsp
    297        
     298               
     299        popq %rbp
    298300        popq %r11
    299301        popq %rcx
Note: See TracChangeset for help on using the changeset viewer.