diff --git a/headers/private/kernel/arch/x86/arch_cpu.h b/headers/private/kernel/arch/x86/arch_cpu.h index cbe80a9220..bc986947f8 100644 --- a/headers/private/kernel/arch/x86/arch_cpu.h +++ b/headers/private/kernel/arch/x86/arch_cpu.h @@ -99,10 +99,14 @@ void i386_frstor(void *fpu_state); void i386_fxrstor(void *fpu_state); void i386_fsave_swap(void *old_fpu_state, void *new_fpu_state); void i386_fxsave_swap(void *old_fpu_state, void *new_fpu_state); +void x86_set_task_gate(int32 n, int32 segment); #define read_ebp(value) \ __asm__("movl %%ebp,%0" : "=r" (value)) +#define read_cr3(value) \ + __asm__("movl %%cr3,%0" : "=r" (value)) + #define read_dr3(value) \ __asm__("movl %%dr3,%0" : "=r" (value)) diff --git a/headers/private/kernel/arch/x86/descriptors.h b/headers/private/kernel/arch/x86/descriptors.h index 3dde40d598..20db3e053a 100644 --- a/headers/private/kernel/arch/x86/descriptors.h +++ b/headers/private/kernel/arch/x86/descriptors.h @@ -17,7 +17,8 @@ // this file can also be included from assembler as well // (and is in arch_interrupts.S) -#define TSS_BASE_SEGMENT 5 +#define DOUBLE_FAULT_TSS_SEGMENT 5 +#define TSS_BASE_SEGMENT 6 #define TLS_BASE_SEGMENT (TSS_BASE_SEGMENT + smp_get_num_cpus()) @@ -56,6 +57,7 @@ enum descriptor_types { DT_DATA_EXPANSION_DOWN = 0x4, DT_TSS = 9, + /* non busy, 32 bit */ // descriptor types DT_SYSTEM_SEGMENT = 0,