5 #include <minix/sys_config.h>
6 #include <machine/stackframe.h>
7 #include <machine/fpu.h>
9 struct segdesc_s
{ /* segment descriptor for protected mode */
13 u8_t access
; /* |P|DL|1|X|E|R|A| */
14 u8_t granularity
; /* |G|X|0|A|LIMT| */
18 #define LDT_SIZE (2 + NR_REMOTE_SEGS) /* CS, DS and remote segments */
20 /* Fixed local descriptors. */
21 #define CS_LDT_INDEX 0 /* process CS */
22 #define DS_LDT_INDEX 1 /* process DS=ES=FS=GS=SS */
23 #define EXTRA_LDT_INDEX 2 /* first of the extra LDT entries */
25 typedef struct segframe
{
26 reg_t p_ldt_sel
; /* selector in gdt with ldt base and limit */
27 reg_t p_cr3
; /* page table root */
28 struct segdesc_s p_ldt
[LDT_SIZE
]; /* CS, DS and remote */
31 /* fpu_state_s is used in kernel proc table.
32 * Any changes in this structure requires changes in sconst.h,
33 * since this structure is used in proc structure. */
35 union fpu_state_u
*fpu_save_area_p
; /* 16-aligned fpu_save_area */
36 /* fpu_image includes 512 bytes of image itself and
37 * additional 15 bytes required for manual 16-byte alignment. */
41 #define INMEMORY(p) (!p->p_seg.p_cr3 || ptproc == p)
43 #endif /* #ifndef _I386_TYPES_H */