X-Git-Url: https://git.lizzy.rs/?a=blobdiff_plain;ds=sidebyside;f=sys%2Fsrc%2F9%2Fpc64%2Fdat.h;h=6cb1cc9edc3c3580064cf3ee804f1e177446a1d0;hb=93f6ce24f46cc596060d859ff97a276e80e1d5c5;hp=e942e51e962370ba89a27f64c0be9a9ec4c9f2c2;hpb=13869bab113881f28ac72de7d8a68bb8bb5d9c38;p=plan9front.git diff --git a/sys/src/9/pc64/dat.h b/sys/src/9/pc64/dat.h index e942e51e9..6cb1cc9ed 100644 --- a/sys/src/9/pc64/dat.h +++ b/sys/src/9/pc64/dat.h @@ -2,15 +2,13 @@ typedef struct BIOS32si BIOS32si; typedef struct BIOS32ci BIOS32ci; typedef struct Conf Conf; typedef struct Confmem Confmem; -typedef union FPsave FPsave; -typedef struct Fxsave Fxsave; -typedef struct FPstate FPstate; +typedef struct FPsave FPsave; +typedef struct PFPU PFPU; typedef struct ISAConf ISAConf; typedef struct Label Label; typedef struct Lock Lock; typedef struct MMU MMU; typedef struct Mach Mach; -typedef struct Notsave Notsave; typedef struct PCArch PCArch; typedef struct Pcidev Pcidev; typedef struct PCMmap PCMmap; @@ -51,25 +49,8 @@ struct Label uintptr pc; }; -/* - * FPsave.status - */ -enum +struct FPsave { - /* this is a state */ - FPinit= 0, - FPactive= 1, - FPinactive= 2, - - /* the following is a bit that can be or'd into the state */ - FPillegal= 0x100, -}; - -/* - * the FP regs must be stored here, not somewhere pointed to from here. - * port code assumes this. - */ -struct Fxsave { u16int fcw; /* x87 control word */ u16int fsw; /* x87 status word */ u8int ftw; /* x87 tag word */ @@ -84,9 +65,34 @@ struct Fxsave { uchar ign[96]; /* reserved, ignored */ }; -union FPsave { - uchar align[512+15]; - Fxsave; +enum +{ + /* this is a state */ + FPinit= 0, + FPactive= 1, + FPinactive= 2, + + /* + * the following are bits that can be or'd into the state. + * + * this is biased so that FPinit, FPactive and FPinactive + * without any flags refer to user fp state in fpslot[0]. + */ + FPillegal= 1<<8, /* fp forbidden in note handler */ + FPpush= 2<<8, /* trap on use and initialize new fpslot */ + FPnouser= 4<<8, /* fpslot[0] is kernel regs */ + FPkernel= 8<<8, /* fp use in kernel (user in fpslot[0] when !FPnouser) */ + + FPindexs= 16, + FPindex1= 1<>FPindexs] */ + FPsave *fpslot[(FPindexm+1)>>FPindexs]; }; struct Confmem @@ -146,16 +152,7 @@ struct PMMU ulong mmucount; u64int dr[8]; -}; - -/* - * things saved in the Proc structure during a notify - */ -struct Notsave -{ - ulong svflags; - ulong svcs; - ulong svss; + void *vmx; }; #include "../port/portdat.h" @@ -219,12 +216,18 @@ struct Mach int cpuiddx; char cpuidid[16]; char* cpuidtype; + uchar cpuidfamily; + uchar cpuidmodel; + uchar cpuidstepping; int havetsc; int havepge; int havewatchpt8; + int havenx; uvlong tscticks; u64int dr7; /* shadow copy of dr7 */ + + void* vmx; uintptr stack[1]; }; @@ -316,7 +319,7 @@ enum { /* MSRs */ struct ISAConf { char *type; - ulong port; + uvlong port; int irq; ulong dma; ulong mem;