/SPARTAN/trunk/arch/amd64/src/fpu_context.c |
---|
31,6 → 31,7 |
#include <arch.h> |
#include <cpu.h> |
/** Save FPU (mmx, sse) context using fxsave instruction */ |
void fpu_context_save(fpu_context_t *fctx) |
{ |
/* Align on 16-byte boundary */ |
43,6 → 44,7 |
); |
} |
/** Restore FPU (mmx,sse) context using fxrstor instruction */ |
void fpu_context_restore(fpu_context_t *fctx) |
{ |
/* Align on 16-byte boundary */ |
/SPARTAN/trunk/arch/amd64/src/asm_utils.S |
---|
58,11 → 58,6 |
# THIS IS USERSPACE CODE |
.global utext |
utext: |
xor %ax,%ax; |
mov %ax,%ds; |
mov %ax,%es; |
mov %ax,%fs; |
mov %ax,%gs; |
0: |
int $48 |
jmp 0b |
177,11 → 172,10 |
push_all_gpr |
# trap_dispatcher(i, stack) |
movq $(\i),%rdi # %rdi - first parameter |
movq %rbp, %rsi |
addq $8, %rsi # %rsi - second parameter - original stack |
call trap_dispatcher |
call trap_dispatcher # trap_dispatcher(i, stack) |
# Test if this is interrupt with error word or not |
mov $\i,%cl; |
216,9 → 210,6 |
interrupt_handlers: |
h_start: |
handler 0 IDT_ITEMS |
# handler 64 128 |
# handler 128 192 |
# handler 192 256 |
h_end: |
/SPARTAN/trunk/arch/amd64/src/pm.c |
---|
91,7 → 91,7 |
.special = 1, |
.granularity = 1, |
.base_24_31 = 0 }, |
/* KTEXT 32-bit protected */ |
/* KTEXT 32-bit protected, for protected mode before long mode */ |
{ .limit_0_15 = 0xffff, |
.base_0_15 = 0, |
.base_16_23 = 0, |