diff options
-rw-r--r-- | sys/src/9/bcm/dat.h | 33 | ||||
-rw-r--r-- | sys/src/9/bcm64/dat.h | 30 | ||||
-rw-r--r-- | sys/src/9/cycv/dat.h | 32 | ||||
-rw-r--r-- | sys/src/9/kw/dat.h | 34 | ||||
-rw-r--r-- | sys/src/9/mtx/dat.h | 46 | ||||
-rw-r--r-- | sys/src/9/omap/dat.h | 34 | ||||
-rw-r--r-- | sys/src/9/pc/dat.h | 60 | ||||
-rw-r--r-- | sys/src/9/pc64/dat.h | 58 | ||||
-rw-r--r-- | sys/src/9/port/portdat.h | 24 | ||||
-rw-r--r-- | sys/src/9/ppc/dat.h | 42 | ||||
-rw-r--r-- | sys/src/9/sgi/dat.h | 32 | ||||
-rw-r--r-- | sys/src/9/teg2/dat.h | 38 | ||||
-rw-r--r-- | sys/src/9/zynq/dat.h | 30 |
13 files changed, 123 insertions, 370 deletions
diff --git a/sys/src/9/bcm/dat.h b/sys/src/9/bcm/dat.h index 0c4f7351f..75db62a52 100644 --- a/sys/src/9/bcm/dat.h +++ b/sys/src/9/bcm/dat.h @@ -150,42 +150,17 @@ struct Mach { int machno; /* physical id of processor */ uintptr splpc; /* pc of last caller to splhi */ - - Proc* proc; /* current process */ + Proc* proc; /* current process on this processor */ MMMU; - int flushmmu; /* flush current proc mmu state */ - - ulong ticks; /* of the clock since boot time */ - Label sched; /* scheduler wakeup */ - Lock alarmlock; /* access to alarm list */ - void* alarm; /* alarms bound to this clock */ + /* end of offsets known to asm */ - Proc* readied; /* for runproc */ - ulong schedticks; /* next forced context switch */ + PMach; int cputype; ulong delayloop; - - /* stats */ - int tlbfault; - int tlbpurge; - int pfault; - int cs; - int syscall; - int load; - int intr; - uvlong fastclock; /* last sampled value */ - uvlong inidle; /* time spent in idlehands() */ - ulong spuriousintr; - int lastintr; - int ilockdepth; - Perf perf; /* performance counters */ - - int cpumhz; uvlong cpuhz; /* speed of cpu */ - uvlong cyclefreq; /* Frequency of user readable cycle counter */ /* vfp2 or vfp3 fpu */ int havefp; @@ -206,7 +181,7 @@ struct Mach u32int smon[5]; /* probably not needed */ u32int ssys[5]; - int stack[1]; + uintptr stack[1]; }; /* diff --git a/sys/src/9/bcm64/dat.h b/sys/src/9/bcm64/dat.h index c5e19ab0d..fc27e351f 100644 --- a/sys/src/9/bcm64/dat.h +++ b/sys/src/9/bcm64/dat.h @@ -142,41 +142,17 @@ struct Mach { int machno; /* physical id of processor */ uintptr splpc; /* pc of last caller to splhi */ - - Proc* proc; /* current process */ + Proc* proc; /* current process on this processor */ + /* end of offsets known to asm */ MMMU; - int flushmmu; /* flush current proc mmu state */ - - ulong ticks; /* of the clock since boot time */ - Label sched; /* scheduler wakeup */ - Lock alarmlock; /* access to alarm list */ - void* alarm; /* alarms bound to this clock */ - Proc* readied; /* for runproc */ - ulong schedticks; /* next forced context switch */ + PMach; int cputype; ulong delayloop; - - /* stats */ - int tlbfault; - int tlbpurge; - int pfault; - int cs; - int syscall; - int load; - int intr; - uvlong fastclock; /* last sampled value */ - uvlong inidle; /* time spent in idlehands() */ - ulong spuriousintr; - int lastintr; - int ilockdepth; - Perf perf; /* performance counters */ - int cpumhz; uvlong cpuhz; /* speed of cpu */ - uvlong cyclefreq; /* Frequency of user readable cycle counter */ int stack[1]; }; diff --git a/sys/src/9/cycv/dat.h b/sys/src/9/cycv/dat.h index 81639681d..1e08c3dab 100644 --- a/sys/src/9/cycv/dat.h +++ b/sys/src/9/cycv/dat.h @@ -116,47 +116,23 @@ struct MMMU struct Mach { - /* known to assembly */ int machno; /* physical id of processor */ uintptr splpc; /* pc of last caller to splhi */ Proc* proc; /* current process */ ulong excregs[3]; ulong cycleshi; - /* end of known to assembly */ + /* end of known offsets to assembly */ - int flushmmu; /* flush current proc mmu state */ - - ulong ticks; /* of the clock since boot time */ - Label sched; /* scheduler wakeup */ - Lock alarmlock; /* access to alarm list */ - void* alarm; /* alarms bound to this clock */ - int inclockintr; - - Proc* readied; /* for runproc */ - ulong schedticks; /* next forced context switch */ + MMMU; - ulong delayloop; + PMach; - /* stats */ - int tlbfault; - int tlbpurge; - int pfault; - int cs; - int syscall; - int load; - int intr; int lastintr; - int ilockdepth; - Perf perf; /* performance counters */ - int cpumhz; uvlong cpuhz; /* speed of cpu */ - uvlong cyclefreq; /* Frequency of user readable cycle counter */ - - MMMU; - int stack[1]; + uintptr stack[1]; }; #define NISAOPT 8 diff --git a/sys/src/9/kw/dat.h b/sys/src/9/kw/dat.h index 6e149837b..bf1dcdaff 100644 --- a/sys/src/9/kw/dat.h +++ b/sys/src/9/kw/dat.h @@ -130,43 +130,19 @@ struct Mach { int machno; /* physical id of processor */ uintptr splpc; /* pc of last caller to splhi */ - Proc* proc; /* current process */ - MMMU; - int flushmmu; /* flush current proc mmu state */ + /* end of offsets known to asm */ - ulong ticks; /* of the clock since boot time */ - Label sched; /* scheduler wakeup */ - Lock alarmlock; /* access to alarm list */ - void* alarm; /* alarms bound to this clock */ - int inclockintr; + PMach; - Proc* readied; /* for runproc */ - ulong schedticks; /* next forced context switch */ + vlong fastclock; /* last sampled value */ + int inclockintr; int cputype; int socrev; /* system-on-chip revision */ ulong delayloop; - - /* stats */ - int tlbfault; - int tlbpurge; - int pfault; - int cs; - int syscall; - int load; - int intr; - vlong fastclock; /* last sampled value */ - uvlong inidle; /* time spent in idlehands() */ - ulong spuriousintr; - int lastintr; - int ilockdepth; - Perf perf; /* performance counters */ - -// int cpumhz; uvlong cpuhz; /* speed of cpu */ - uvlong cyclefreq; /* Frequency of user readable cycle counter */ /* save areas for exceptions */ u32int sfiq[5]; @@ -178,7 +154,7 @@ struct Mach #define abtstack sabt #define undstack sund - int stack[1]; + uintptr stack[1]; }; /* diff --git a/sys/src/9/mtx/dat.h b/sys/src/9/mtx/dat.h index 8b74eb439..80ea2565c 100644 --- a/sys/src/9/mtx/dat.h +++ b/sys/src/9/mtx/dat.h @@ -123,54 +123,28 @@ struct Mach { /* OFFSETS OF THE FOLLOWING KNOWN BY l.s */ int machno; /* physical id of processor */ - ulong splpc; /* pc that called splhi() */ + uintptr splpc; /* pc that called splhi() */ Proc *proc; /* current process on this processor */ /* ordering from here on irrelevant */ + PMach; + + uintptr ptabbase; /* start of page table in kernel virtual space */ + int slotgen; /* next pte (byte offset) when pteg is full */ + int mmupid; /* next mmu pid to use */ + int sweepcolor; + int trigcolor; + Rendez sweepr; - ulong ticks; /* of the clock since boot time */ - Label sched; /* scheduler wakeup */ - Lock alarmlock; /* access to alarm list */ - void *alarm; /* alarms bound to this clock */ - int inclockintr; int cputype; ulong loopconst; - - Proc* readied; /* for runproc */ - ulong schedticks; /* next forced context switch */ - vlong cpuhz; ulong bushz; ulong dechz; ulong tbhz; - uvlong cyclefreq; /* Frequency of user readable cycle counter */ - - ulong pcclast; - uvlong fastclock; - Perf perf; /* performance counters */ - - int tlbfault; /* only used by devproc; no access to tlb */ - int tlbpurge; /* ... */ - int pfault; - int cs; - int syscall; - int load; - int intr; - int flushmmu; /* make current proc flush it's mmu state */ - int ilockdepth; - - ulong ptabbase; /* start of page table in kernel virtual space */ - int slotgen; /* next pte (byte offset) when pteg is full */ - int mmupid; /* next mmu pid to use */ - int sweepcolor; - int trigcolor; - Rendez sweepr; - - ulong spuriousintr; - int lastintr; /* MUST BE LAST */ - int stack[1]; + uintptr stack[1]; }; struct diff --git a/sys/src/9/omap/dat.h b/sys/src/9/omap/dat.h index 084b3aee9..3c3792524 100644 --- a/sys/src/9/omap/dat.h +++ b/sys/src/9/omap/dat.h @@ -154,43 +154,19 @@ struct Mach { int machno; /* physical id of processor */ uintptr splpc; /* pc of last caller to splhi */ - Proc* proc; /* current process */ - MMMU; - int flushmmu; /* flush current proc mmu state */ + /* end of offsets known to asm */ - ulong ticks; /* of the clock since boot time */ - Label sched; /* scheduler wakeup */ - Lock alarmlock; /* access to alarm list */ - void* alarm; /* alarms bound to this clock */ - int inclockintr; + PMach; - Proc* readied; /* for runproc */ - ulong schedticks; /* next forced context switch */ + uvlong fastclock; /* last sampled value */ + int inclockintr; int cputype; ulong delayloop; - - /* stats */ - int tlbfault; - int tlbpurge; - int pfault; - int cs; - int syscall; - int load; - int intr; - uvlong fastclock; /* last sampled value */ - uvlong inidle; /* time spent in idlehands() */ - ulong spuriousintr; - int lastintr; - int ilockdepth; - Perf perf; /* performance counters */ - - int cpumhz; uvlong cpuhz; /* speed of cpu */ - uvlong cyclefreq; /* Frequency of user readable cycle counter */ /* save areas for exceptions, hold R0-R4 */ u32int sfiq[5]; @@ -200,7 +176,7 @@ struct Mach u32int smon[5]; /* probably not needed */ u32int ssys[5]; - int stack[1]; + uintptr stack[1]; }; /* diff --git a/sys/src/9/pc/dat.h b/sys/src/9/pc/dat.h index 1a63367ac..8eb2f280f 100644 --- a/sys/src/9/pc/dat.h +++ b/sys/src/9/pc/dat.h @@ -190,50 +190,25 @@ typedef struct { ulong iomap; /* I/O map base address + T-bit */ } Tss; + struct Mach { - int machno; /* physical id of processor (KNOWN TO ASSEMBLY) */ - ulong splpc; /* pc of last caller to splhi */ - - ulong* pdb; /* page directory base for this processor (va) */ - Tss* tss; /* tss for this processor */ - Segdesc *gdt; /* gdt for this processor */ - + int machno; /* physical id of processor */ + uintptr splpc; /* pc of last caller to splhi */ Proc* proc; /* current process on this processor */ Proc* externup; /* extern register Proc *up */ - Page* pdbpool; - int pdbcnt; - - ulong ticks; /* of the clock since boot time */ - Label sched; /* scheduler wakeup */ - Lock alarmlock; /* access to alarm list */ - void* alarm; /* alarms bound to this clock */ - int inclockintr; - - Proc* readied; /* for runproc */ - ulong schedticks; /* next forced context switch */ - - int tlbfault; - int tlbpurge; - int pfault; - int cs; - int syscall; - int load; - int intr; - int flushmmu; /* make current proc flush it's mmu state */ - int ilockdepth; - Perf perf; /* performance counters */ + PMach; + uvlong tscticks; ulong spuriousintr; int lastintr; int loopconst; int aalcycles; - int cpumhz; - uvlong cyclefreq; /* Frequency of user readable cycle counter */ uvlong cpuhz; + int cpuidax; int cpuidcx; int cpuiddx; @@ -242,19 +217,26 @@ struct Mach uchar cpuidfamily; uchar cpuidmodel; uchar cpuidstepping; - int havetsc; - int havepge; - int havewatchpt8; - int havenx; - uvlong tscticks; - int pdballoc; - int pdbfree; + + char havetsc; + char havepge; + char havewatchpt8; + char havenx; + + ulong* pdb; /* page directory base for this processor (va) */ + Tss* tss; /* tss for this processor */ + Segdesc*gdt; /* gdt for this processor */ u32int dr7; /* shadow copy of dr7 */ u32int xcr0; void* vmx; - int stack[1]; + Page* pdbpool; + int pdbcnt; + int pdballoc; + int pdbfree; + + uintptr stack[1]; }; /* diff --git a/sys/src/9/pc64/dat.h b/sys/src/9/pc64/dat.h index 1d581f371..b8628db9d 100644 --- a/sys/src/9/pc64/dat.h +++ b/sys/src/9/pc64/dat.h @@ -184,48 +184,21 @@ typedef struct { struct Mach { - int machno; /* physical id of processor (KNOWN TO ASSEMBLY) */ - uintptr splpc; /* pc of last caller to splhi (KNOWN TO ASSEMBLY) */ + int machno; /* physical id of processor */ + uintptr splpc; /* pc of last caller to splhi */ + Proc* proc; /* current process on this processor */ - Proc* proc; /* current process on this processor (KNOWN TO ASSEMBLY) */ - - u64int* pml4; /* pml4 base for this processor (va) */ - Tss* tss; /* tss for this processor */ - Segdesc *gdt; /* gdt for this processor */ - - u64int mmumap[4]; /* bitmap of pml4 entries for zapping */ - MMU* mmufree; /* freelist for MMU structures */ - ulong mmucount; /* number of MMU structures in freelist */ - - ulong ticks; /* of the clock since boot time */ - Label sched; /* scheduler wakeup */ - Lock alarmlock; /* access to alarm list */ - void* alarm; /* alarms bound to this clock */ - int inclockintr; - - Proc* readied; /* for runproc */ - ulong schedticks; /* next forced context switch */ - - int tlbfault; - int tlbpurge; - int pfault; - int cs; - int syscall; - int load; - int intr; - int flushmmu; /* make current proc flush it's mmu state */ - int ilockdepth; - Perf perf; /* performance counters */ + PMach; + uvlong tscticks; ulong spuriousintr; int lastintr; int loopconst; int aalcycles; - int cpumhz; - uvlong cyclefreq; /* Frequency of user readable cycle counter */ uvlong cpuhz; + int cpuidax; int cpuidcx; int cpuiddx; @@ -234,17 +207,24 @@ struct Mach uchar cpuidfamily; uchar cpuidmodel; uchar cpuidstepping; - int havetsc; - int havepge; - int havewatchpt8; - int havenx; - uvlong tscticks; + + char havetsc; + char havepge; + char havewatchpt8; + char havenx; + + u64int* pml4; /* pml4 base for this processor (va) */ + Tss* tss; /* tss for this processor */ + Segdesc*gdt; /* gdt for this processor */ u64int dr7; /* shadow copy of dr7 */ u64int xcr0; - void* vmx; + MMU* mmufree; /* freelist for MMU structures */ + ulong mmucount; /* number of MMU structures in freelist */ + u64int mmumap[4]; /* bitmap of pml4 entries for zapping */ + uintptr stack[1]; }; diff --git a/sys/src/9/port/portdat.h b/sys/src/9/port/portdat.h index b3b86eaa7..dc3c5bd66 100644 --- a/sys/src/9/port/portdat.h +++ b/sys/src/9/port/portdat.h @@ -31,6 +31,7 @@ typedef struct Pgrp Pgrp; typedef struct Physseg Physseg; typedef struct Proc Proc; typedef struct Pte Pte; +typedef struct PMach PMach; typedef struct QLock QLock; typedef struct Queue Queue; typedef struct Ref Ref; @@ -967,6 +968,29 @@ struct Watchpt uintptr addr, len; }; +struct PMach +{ + Proc* readied; /* for runproc */ + Label sched; /* scheduler wakeup */ + ulong ticks; /* of the clock since boot time */ + ulong schedticks; /* next forced context switch */ + + int pfault; + int cs; + int syscall; + int load; + int intr; + int ilockdepth; + + int flushmmu; /* make current proc flush it's mmu state */ + + int tlbfault; + int tlbpurge; + + Perf perf; /* performance counters */ + + uvlong cyclefreq; /* Frequency of user readable cycle counter */ +}; /* queue state bits, Qmsg, Qcoalesce, and Qkick can be set in qopen */ enum diff --git a/sys/src/9/ppc/dat.h b/sys/src/9/ppc/dat.h index 954ca1f89..925d35af7 100644 --- a/sys/src/9/ppc/dat.h +++ b/sys/src/9/ppc/dat.h @@ -137,55 +137,31 @@ struct Mach /*0x14*/ ulong dmiss; /* number of data misses */ /* ordering from here on irrelevant */ + PMach; Imap* imap; - ulong ticks; /* of the clock since boot time */ - Label sched; /* scheduler wakeup */ - Lock alarmlock; /* access to alarm list */ - void *alarm; /* alarms bound to this clock */ - int inclockintr; + uintptr ptabbase; /* start of page table in kernel virtual space */ + int slotgen; /* next pte (byte offset) when pteg is full */ + int mmupid; /* next mmu pid to use */ + int sweepcolor; + int trigcolor; + Rendez sweepr; + int cputype; ulong loopconst; - Perf perf; /* performance counters */ - - Proc* readied; /* for runproc */ - ulong schedticks; /* next forced context switch */ ulong clkin; /* basic clock frequency */ ulong vco_out; vlong cpuhz; - uvlong cyclefreq; /* Frequency of user readable cycle counter */ ulong bushz; ulong dechz; ulong tbhz; ulong cpmhz; /* communications processor module frequency */ ulong brghz; /* baud rate generator frequency */ - ulong pcclast; - uvlong fastclock; - - int tlbpurge; /* # of tlb purges */ - int pfault; /* # of page faults */ - int cs; - int syscall; - int load; - int intr; - int flushmmu; /* make current proc flush it's mmu state */ - int ilockdepth; - - ulong ptabbase; /* start of page table in kernel virtual space */ - int slotgen; /* next pte (byte offset) when pteg is full */ - int mmupid; /* next mmu pid to use */ - int sweepcolor; - int trigcolor; - Rendez sweepr; - - ulong spuriousintr; - int lastintr; - /* MUST BE LAST */ - int stack[1]; + uintptr stack[1]; }; struct diff --git a/sys/src/9/sgi/dat.h b/sys/src/9/sgi/dat.h index 126eb3793..cd84b7a8e 100644 --- a/sys/src/9/sgi/dat.h +++ b/sys/src/9/sgi/dat.h @@ -144,48 +144,34 @@ struct Mach int machno; /* physical id of processor */ Softtlb*stb; Proc* proc; /* process on this processor */ - ulong splpc; /* pc that called splhi() */ + uintptr splpc; /* pc that called splhi() */ ulong tlbfault; /* the following is safe to move */ - ulong tlbpurge; - ulong ticks; /* of the clock since boot time */ - Label sched; /* scheduler wakeup */ - void* alarm; /* alarms bound to this clock */ + PMach; + int lastpid; /* last pid allocated on this machine */ Proc* pidproc[NTLBPID]; /* proc that owns tlbpid on this mach */ + KMap* kactive; /* active on this machine */ int knext; uchar ktlbx[NTLB]; /* tlb index used for kmap */ uchar ktlbnext; - int speed; /* cpu speed */ - ulong delayloop; /* for the delay() routine */ - ulong fairness; /* for runproc */ - int flushmmu; - int inclockintr; - int ilockdepth; - Perf perf; /* performance counters */ - uvlong cyclefreq; /* Frequency of user readable cycle counter */ /* for per-processor timers */ - ulong lastcount; uvlong fastticks; + ulong lastcount; + ulong hz; + int speed; /* cpu speed */ + ulong delayloop; /* for the delay() routine */ ulong maxperiod; ulong minperiod; - Proc* readied; /* for runproc */ - ulong schedticks; /* next forced context switch */ - - int pfault; - int cs; - int syscall; - int load; - int intr; int hashcoll; /* soft-tlb hash collisions */ int paststartup; /* for putktlb */ - int stack[1]; + uintptr stack[1]; }; struct KMap diff --git a/sys/src/9/teg2/dat.h b/sys/src/9/teg2/dat.h index 30dd4b5eb..0f0ead822 100644 --- a/sys/src/9/teg2/dat.h +++ b/sys/src/9/teg2/dat.h @@ -163,51 +163,27 @@ struct PMMU struct Mach { - /* offsets known to asm */ int machno; /* physical id of processor */ uintptr splpc; /* pc of last caller to splhi */ - - Proc* proc; /* current process */ + Proc* proc; /* current process on this processor */ MMMU; /* end of offsets known to asm */ - int flushmmu; /* flush current proc mmu state */ - - ulong ticks; /* of the clock since boot time */ - Label sched; /* scheduler wakeup */ - Lock alarmlock; /* access to alarm list */ - void* alarm; /* alarms bound to this clock */ - int inclockintr; - Proc* readied; /* for runproc */ - ulong schedticks; /* next forced context switch */ - - int cputype; - ulong delayloop; + PMach; - /* stats */ - int tlbfault; - int tlbpurge; - int pfault; - int cs; - int syscall; - int load; - int intr; uvlong fastclock; /* last sampled value */ - uvlong inidle; /* time spent in idlehands() */ - ulong spuriousintr; - int lastintr; - int ilockdepth; - Perf perf; /* performance counters */ + int inclockintr; + int inidlehands; int probing; /* probeaddr() state */ int trapped; Lock probelock; - int inidlehands; + int cputype; + ulong delayloop; int cpumhz; uvlong cpuhz; /* speed of cpu */ - uvlong cyclefreq; /* Frequency of user readable cycle counter */ /* vfp3 fpu */ int havefp; @@ -228,7 +204,7 @@ struct Mach u32int smon[5]; /* probably not needed */ u32int ssys[5]; - int stack[1]; + uintptr stack[1]; }; /* diff --git a/sys/src/9/zynq/dat.h b/sys/src/9/zynq/dat.h index 5c419cb7a..c3a632177 100644 --- a/sys/src/9/zynq/dat.h +++ b/sys/src/9/zynq/dat.h @@ -115,7 +115,6 @@ struct MMMU struct Mach { - /* known to assembly */ int machno; /* physical id of processor */ uintptr splpc; /* pc of last caller to splhi */ Proc* proc; /* current process */ @@ -123,39 +122,16 @@ struct Mach ulong cycleshi; /* end of known to assembly */ - int flushmmu; /* flush current proc mmu state */ - - ulong ticks; /* of the clock since boot time */ - Label sched; /* scheduler wakeup */ - Lock alarmlock; /* access to alarm list */ - void* alarm; /* alarms bound to this clock */ - int inclockintr; - - Proc* readied; /* for runproc */ - ulong schedticks; /* next forced context switch */ + MMMU; - ulong delayloop; + PMach; - /* stats */ - int tlbfault; - int tlbpurge; - int pfault; - int cs; - int syscall; - int load; - int intr; int lastintr; - int ilockdepth; - Perf perf; /* performance counters */ - int cpumhz; uvlong cpuhz; /* speed of cpu */ - uvlong cyclefreq; /* Frequency of user readable cycle counter */ - - MMMU; - int stack[1]; + uintptr stack[1]; }; #define NISAOPT 8 |