Changeset d5d2a3f in mainline
- Timestamp:
- 2005-05-25T12:29:18Z (19 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 2998046
- Parents:
- c23fd6b1
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
arch/ia64/include/context.h
rc23fd6b1 rd5d2a3f 38 38 #define SP_DELTA 0 39 39 40 #ifdef context_set 41 #undef context_set 42 #endif 43 44 #define context_set(c, _pc, stack, size) \ 45 (c)->pc = (__address) _pc; \ 46 (c)->bsp = (__address) stack; \ 47 (c)->sp = ((__address) stack) + (size) - SP_DELTA; 48 40 49 struct context { 41 50 … … 47 56 __u64 ar_unat_callee; 48 57 __u64 ar_rsc; 49 __u64 ar_bsp;58 __u64 bsp; /* ar_bsp */ 50 59 __u64 ar_rnat; 51 60 __u64 ar_lc; -
include/context.h
rc23fd6b1 rd5d2a3f 30 30 #define __CONTEXT_H__ 31 31 32 #include <arch/types.h> 32 33 #include <typedefs.h> 33 #include "fpu_context.h"34 34 35 #ifndef context_set 36 #define context_set(c, _pc, stack, size) \ 37 (c)->pc = (__address) (_pc); \ 38 (c)->sp = ((__address) (stack)) + (size) - SP_DELTA; 39 #endif /* context_set */ 35 40 36 41 extern int context_save(context_t *c); -
src/main/main.c
rc23fd6b1 rd5d2a3f 28 28 29 29 #include <arch/asm.h> 30 #include < arch/context.h>30 #include <context.h> 31 31 #include <print.h> 32 32 #include <panic.h> … … 95 95 96 96 context_save(&ctx); 97 ctx.sp = config.base + config.kernel_size - SP_DELTA; 98 ctx.pc = FADDR(main_bsp_separated_stack); 97 context_set(&ctx, FADDR(main_bsp_separated_stack), config.base + hardcoded_ktext_size + hardcoded_kdata_size + CONFIG_HEAP_SIZE, CONFIG_STACK_SIZE); 99 98 context_restore(&ctx); 100 99 /* not reached */ … … 193 192 * switch to this cpu's private stack prior to waking kmp up. 194 193 */ 195 CPU->saved_context.sp = (__address) &CPU->stack[CPU_STACK_SIZE-SP_DELTA]; 196 CPU->saved_context.pc = FADDR(main_ap_separated_stack); 194 context_set(&CPU->saved_context, FADDR(main_ap_separated_stack), CPU->stack, CPU_STACK_SIZE); 197 195 context_restore(&CPU->saved_context); 198 196 /* not reached */ -
src/proc/scheduler.c
rc23fd6b1 rd5d2a3f 233 233 */ 234 234 context_save(&CPU->saved_context); 235 CPU->saved_context.sp = (__address) &CPU->stack[CPU_STACK_SIZE-SP_DELTA]; 236 CPU->saved_context.pc = FADDR(scheduler_separated_stack); 235 context_set(&CPU->saved_context, FADDR(scheduler_separated_stack), CPU->stack, CPU_STACK_SIZE); 237 236 context_restore(&CPU->saved_context); 238 237 /* not reached */ -
src/proc/thread.c
rc23fd6b1 rd5d2a3f 166 166 167 167 context_save(&t->saved_context); 168 t->saved_context.pc = FADDR(cushion); 169 t->saved_context.sp = (__address) &t->kstack[THREAD_STACK_SIZE-SP_DELTA]; 168 context_set(&t->saved_context, FADDR(cushion), t->kstack, THREAD_STACK_SIZE); 170 169 171 170 pri = cpu_priority_high();
Note:
See TracChangeset
for help on using the changeset viewer.