/SPARTAN/trunk/include/proc/thread.h |
---|
72,7 → 72,9 |
context_t saved_context; |
context_t sleep_timeout_context; |
fpu_context_t saved_fpu; |
waitq_t *sleep_queue; |
timeout_t sleep_timeout; |
volatile int timeout_pending; |
/SPARTAN/trunk/src/Makefile.config |
---|
1,6 → 1,6 |
#ARCH=ia32 |
ARCH=ia32 |
#ARCH=mips |
ARCH=ia64 |
#ARCH=ia64 |
#ARCH=powerpc |
#ARCH=amd64 |
/SPARTAN/trunk/src/main/main.c |
---|
91,10 → 91,10 |
config.memory_size = CONFIG_MEMORY_SIZE; |
config.kernel_size = hardcoded_ktext_size + hardcoded_kdata_size + CONFIG_HEAP_SIZE + CONFIG_STACK_SIZE; |
context_save(&ctx); |
context_save(&ctx); /* There is no nead to save FPU context */ |
ctx.sp = config.base + config.kernel_size - 8; |
ctx.pc = (__address) main_bsp_separated_stack; |
context_restore(&ctx); |
context_restore(&ctx); /* There is no nead to load FPU context */ |
/* not reached */ |
} |
192,7 → 192,7 |
*/ |
CPU->saved_context.sp = (__address) &CPU->stack[CPU_STACK_SIZE-8]; |
CPU->saved_context.pc = (__address) main_ap_separated_stack; |
context_restore(&CPU->saved_context); |
context_restore(&CPU->saved_context); /* There is no nead to load FPU context */ |
/* not reached */ |
} |
/SPARTAN/trunk/arch/ia32/include/context.h |
---|
46,7 → 46,6 |
__u32 edi; |
__u32 ebp; |
__u32 pri; |
struct fpu_context *fpu; |
} __attribute__ ((packed)); |
#endif |
/SPARTAN/trunk/arch/ia32/src/context.s |
---|
31,6 → 31,7 |
.global context_save |
.global context_restore |
# |
# save context of this CPU |
context_save: |
73,3 → 74,23 |
movl %eax,(%esp) # ctx->pc -> saver's return %eip |
xorl %eax,%eax # context_restore returns 0 |
ret |
.global fpu_context_save |
fpu_context_save: |
ret |
.global fpu_context_restore |
fpu_context_restore: |
ret |
.global fpu_lazy_context_save |
mov 4(%esp),%eax; |
fxsave (%eax) |
xor %eax,%eax; |
ret; |
.global fpu_lazy_context_restore |
mov 4(%esp),%eax; |
fxrstor (%eax) |
xor %eax,%eax; |
ret; |