Changeset 304342e in mainline
- Timestamp:
- 2010-01-08T20:58:33Z (15 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 49924b4
- Parents:
- fabc883
- Location:
- kernel/arch/amd64
- Files:
-
- 2 added
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
kernel/arch/amd64/Makefile.inc
rfabc883 r304342e 38 38 39 39 FPU_NO_CFLAGS = -mno-sse -mno-sse2 40 CMN1 = -m64 -mcmodel=kernel -mno-red-zone -fno-unwind-tables 40 CMN1 = -m64 -mcmodel=kernel -mno-red-zone -fno-unwind-tables -fno-omit-frame-pointer 41 41 GCC_CFLAGS += $(CMN1) 42 42 ICC_CFLAGS += $(CMN1) … … 60 60 arch/$(KARCH)/src/boot/boot.S \ 61 61 arch/$(KARCH)/src/boot/memmap.c \ 62 arch/$(KARCH)/src/debug/stacktrace.c \ 63 arch/$(KARCH)/src/debug/stacktrace_asm.S \ 62 64 arch/$(KARCH)/src/pm.c \ 63 65 arch/$(KARCH)/src/context.S \ -
kernel/arch/amd64/include/context.h
rfabc883 r304342e 46 46 #define SP_DELTA 16 47 47 48 #define context_set(c, _pc, stack, size) \ 49 do { \ 50 (c)->pc = (uintptr_t) (_pc); \ 51 (c)->sp = ((uintptr_t) (stack)) + (size) - SP_DELTA; \ 52 (c)->rbp = 0; \ 53 } while (0) 54 48 55 #endif /* KERNEL */ 49 56 -
kernel/arch/amd64/include/interrupt.h
rfabc883 r304342e 70 70 71 71 /** This is passed to interrupt handlers */ 72 typedef struct {72 typedef struct istate { 73 73 uint64_t rax; 74 74 uint64_t rcx; … … 80 80 uint64_t r10; 81 81 uint64_t r11; 82 uint64_t rbp; 82 83 uint64_t error_word; 83 84 uint64_t rip; … … 101 102 return istate->rip; 102 103 } 104 static inline unative_t istate_get_fp(istate_t *istate) 105 { 106 return istate->rbp; 107 } 103 108 104 109 extern void (* disable_irqs_function)(uint16_t irqmask); -
kernel/arch/amd64/src/asm_utils.S
rfabc883 r304342e 27 27 # 28 28 29 #define IREGISTER_SPACE 7229 #define IREGISTER_SPACE 80 30 30 31 31 #define IOFFSET_RAX 0x0 … … 38 38 #define IOFFSET_R10 0x38 39 39 #define IOFFSET_R11 0x40 40 #define IOFFSET_RBP 0x48 40 41 41 42 # Mask for interrupts 0 - 31 (bits 0 - 31) where 0 means that int has no error word … … 179 180 movq %r10, IOFFSET_R10(%rsp) 180 181 movq %r11, IOFFSET_R11(%rsp) 182 movq %rbp, IOFFSET_RBP(%rsp) 181 183 .endm 182 184 … … 191 193 movq IOFFSET_R10(%rsp), %r10 192 194 movq IOFFSET_R11(%rsp), %r11 195 movq IOFFSET_RBP(%rsp), %rbp 193 196 .endm 194 197 … … 235 238 cld 236 239 240 # Stop stack traces here 241 xorq %rbp, %rbp 242 237 243 movq $(\i), %rdi # %rdi - first parameter 238 244 movq %rsp, %rsi # %rsi - pointer to istate -
kernel/arch/amd64/src/boot/boot.S
rfabc883 r304342e 174 174 call arch_pre_main 175 175 176 # create the first stack frame 177 pushq $0 178 movq %rsp, %rbp 179 176 180 call main_bsp 177 181 -
kernel/arch/amd64/src/interrupt.c
rfabc883 r304342e 53 53 #include <ddi/irq.h> 54 54 #include <symtab.h> 55 #include <stacktrace.h> 55 56 56 57 /* … … 80 81 istate->r10, istate->r11); 81 82 printf("%%rsp=%#llx\n", &istate->stack[0]); 83 84 stack_trace_istate(istate); 82 85 } 83 86 -
kernel/arch/amd64/src/smp/ap.S
rfabc883 r304342e 99 99 start64: 100 100 movq (ctx), %rsp 101 pushq $0 102 movq %rsp, %rbp 101 103 call main_ap - AP_BOOT_OFFSET + BOOT_OFFSET # never returns 102 104
Note:
See TracChangeset
for help on using the changeset viewer.