| plan 9 kernel history: overview | file list | diff list |
1994/0322/pc/dat.h (diff list | history)
| pc/dat.h on 1991/0612 | ||
| 1991/0612 | typedef struct Conf Conf; | |
| 1991/0702 | typedef struct FPsave FPsave; | |
| 1993/0915 | typedef struct ISAConf ISAConf; | |
| 1991/0612 | typedef struct Label Label; typedef struct Lock Lock; typedef struct MMU MMU; typedef struct Mach Mach; | |
| 1993/1013 | typedef struct Notsave Notsave; | |
| 1992/0923 | typedef struct PCArch PCArch; | |
| 1991/0717 | typedef struct Page Page; | |
| 1991/0612 | typedef struct PMMU PMMU; | |
| 1991/0703 | typedef struct Segdesc Segdesc; | |
| 1991/0612 | typedef struct Ureg Ureg; #define MACHP(n) (n==0? &mach0 : *(Mach**)0) extern Mach mach0; extern void (*kprofp)(ulong); /* * parameters for sysproc.c */ #define AOUT_MAGIC I_MAGIC struct Lock { | |
| 1991/0703 | ulong key; | |
| 1994/0322 | ulong sr; | |
| 1991/0612 | }; struct Label { ulong sp; ulong pc; }; | |
| 1991/0711 | /* | |
| 1991/0716 | * FPsave.status | |
| 1991/0711 | */ enum | |
| 1991/0702 | { | |
| 1991/0711 | FPinit, FPactive, FPinactive, | |
| 1991/0702 | }; | |
| 1991/0905 | struct FPsave | |
| 1991/0711 | { | |
| 1992/0806 | ushort control; ushort r1; ushort status; ushort r2; ushort tag; ushort r3; ulong pc; ushort selector; ushort r4; ulong operand; ushort oselector; ushort r5; uchar regs[80]; /* floating point registers */ | |
| 1991/0711 | }; | |
| 1991/0612 | struct Conf { | |
| 1991/0702 | ulong nmach; /* processors */ ulong nproc; /* processes */ | |
| 1992/0807 | ulong monitor; /* has monitor? */ | |
| 1992/0625 | ulong npage0; /* total physical pages of memory */ ulong npage1; /* total physical pages of memory */ ulong topofmem; /* highest physical address + 1 */ | |
| 1991/0612 | ulong npage; /* total physical pages of memory */ | |
| 1992/0625 | ulong upages; /* user page pool */ | |
| 1991/0711 | ulong nimage; /* number of page cache image headers */ ulong nswap; /* number of swap pages */ ulong base0; /* base of bank 0 */ ulong base1; /* base of bank 1 */ | |
| 1991/0702 | ulong copymode; /* 0 is copy on write, 1 is copy on reference */ | |
| 1991/0809 | ulong nfloppy; /* number of floppy drives */ ulong nhard; /* number of hard drives */ | |
| 1992/1105 | ulong ldepth; /* screen depth */ ulong maxx; /* screen width */ ulong maxy; /* screen length */ | |
| 1994/0322 | ulong ialloc; /* max interrupt time allocation in bytes */ | |
| 1991/0612 | }; /* * MMU stuff in proc */ | |
| 1991/0717 | #define MAXMMU 4 | |
| 1991/0718 | #define MAXSMMU 1 | |
| 1993/0915 | #define NCOLOR 1 | |
| 1991/0612 | struct PMMU { | |
| 1991/1004 | Page *mmutop; /* 1st level table */ Page *mmufree; /* unused page table pages */ Page *mmuused; /* used page table pages */ | |
| 1991/0612 | }; | |
| 1993/1013 | /* * things saved in the Proc structure during a notify */ struct Notsave { ulong svflags; ulong svcs; ulong svss; }; | |
| 1991/0612 | #include "../port/portdat.h" /* * machine dependent definitions not used by ../port/dat.h */ | |
| 1994/0311 | #define NCALLBACK 32 | |
| 1991/0612 | struct Mach { int machno; /* physical id of processor */ ulong splpc; /* pc of last caller to splhi */ int mmask; /* 1<<m->machno */ ulong ticks; /* of the clock since boot time */ Proc *proc; /* current process on this processor */ Label sched; /* scheduler wakeup */ Lock alarmlock; /* access to alarm list */ void *alarm; /* alarms bound to this clock */ | |
| 1993/1214 | Schedq hiq; Schedq loq; | |
| 1994/0311 | void (**cbin)(void); void (**cbout)(void); void (**cbend)(void); void (*calls[NCALLBACK])(void); | |
| 1991/0612 | int tlbfault; int tlbpurge; int pfault; int cs; int syscall; | |
| 1991/1112 | int load; | |
| 1991/0612 | int intr; int stack[1]; }; /* * Fake kmap */ typedef void KMap; #define VA(k) ((ulong)(k)) | |
| 1991/0718 | #define kmap(p) (KMap*)((p)->pa|KZERO) | |
| 1991/0612 | #define kunmap(k) | |
| 1991/0703 | /* * segment descriptor/gate */ struct Segdesc { ulong d0; ulong d1; }; | |
| 1991/0612 | struct { Lock; short machs; short exiting; }active; | |
| 1992/0923 | /* * routines for things outside the PC model, like power management */ struct PCArch { char *id; void (*reset)(void); /* this should be in the model */ int (*cpuspeed)(int); /* 0 = low, 1 = high */ void (*buzz)(int, int); /* make a noise */ void (*lights)(int); /* turn lights or icons on/off */ int (*serialpower)(int); /* 1 == on, 0 == off */ int (*modempower)(int); /* 1 == on, 0 == off */ int (*extvga)(int); /* 1 == external, 0 == internal */ }; | |
| 1993/0915 | struct ISAConf { char type[NAMELEN]; ulong port; ulong irq; ulong mem; ulong size; uchar ea[6]; }; | |
| 1991/0801 | ||
| 1993/0915 | #define MAXPCMCIA 8 /* maximum number of PCMCIA cards */ #define BOOTLINE ((char *)0x80000100) /* bootline passed by boot program */ | |
| 1991/1210 | ||
| 1993/0915 | extern int flipD[]; /* for flipping bitblt destination polarity */ extern PCArch *arch; /* PC architecture */ | |
| 1993/1013 | extern int cpuflag; /* true if this is a CPU */ | |
| 1992/0918 | ||
| 1993/0915 | extern Mach *m; extern Proc *up; | |