diff options
Diffstat (limited to 'sys/i386/include/pcb.h')
-rw-r--r-- | sys/i386/include/pcb.h | 43 |
1 files changed, 23 insertions, 20 deletions
diff --git a/sys/i386/include/pcb.h b/sys/i386/include/pcb.h index 01ace72..4bfd603 100644 --- a/sys/i386/include/pcb.h +++ b/sys/i386/include/pcb.h @@ -45,17 +45,23 @@ #include <machine/npx.h> struct pcb { - int pcb_cr0; - int pcb_cr2; - int pcb_cr3; - int pcb_cr4; int pcb_edi; int pcb_esi; int pcb_ebp; int pcb_esp; int pcb_ebx; int pcb_eip; - + struct segment_descriptor pcb_fsd; + struct segment_descriptor pcb_gsd; + int pcb_ds; + int pcb_es; + int pcb_fs; + int pcb_gs; + int pcb_ss; + int pcb_cr0; + int pcb_cr2; + int pcb_cr3; + int pcb_cr4; int pcb_dr0; int pcb_dr1; int pcb_dr2; @@ -63,38 +69,35 @@ struct pcb { int pcb_dr6; int pcb_dr7; - union savefpu pcb_user_save; - uint16_t pcb_initial_npxcw; + struct region_descriptor pcb_gdt; + struct region_descriptor pcb_idt; + uint16_t pcb_ldt; + uint16_t pcb_tr; + u_int pcb_flags; -#define FP_SOFTFP 0x01 /* process using software fltng pnt emulator */ #define PCB_DBREGS 0x02 /* process using debug registers */ #define PCB_NPXINITDONE 0x08 /* fpu state is initialized */ #define PCB_VM86CALL 0x10 /* in vm86 call */ #define PCB_NPXUSERINITDONE 0x20 /* user fpu state is initialized */ #define PCB_KERNNPX 0x40 /* kernel uses npx */ + uint16_t pcb_initial_npxcw; + caddr_t pcb_onfault; /* copyin/out fault recovery */ - int pcb_ds; - int pcb_es; - int pcb_fs; - int pcb_gs; - int pcb_ss; - struct segment_descriptor pcb_fsd; - struct segment_descriptor pcb_gsd; struct pcb_ext *pcb_ext; /* optional pcb extension */ int pcb_psl; /* process status long */ u_long pcb_vm86[2]; /* vm86bios scratch space */ union savefpu *pcb_save; - struct region_descriptor pcb_gdt; - struct region_descriptor pcb_idt; - uint16_t pcb_ldt; - uint16_t pcb_tr; + uint32_t pcb_pad[10]; }; +/* Per-CPU state saved during suspend and resume. */ struct susppcb { struct pcb sp_pcb; - union savefpu sp_fpususpend; + + /* fpu context for suspend/resume */ + void *sp_fpususpend; }; #ifdef _KERNEL |