Browse Source

Plan 9 from Bell Labs 2004-10-07

David du Colombier 19 years ago
parent
commit
78db1463d8

+ 8 - 4
dist/replica/_plan9.db

@@ -5539,12 +5539,12 @@ sys/src/9/port/thwack.c - 664 sys sys 1057323394 7253
 sys/src/9/port/thwack.h - 664 sys sys 1015278340 1792
 sys/src/9/port/tod.c - 664 sys sys 1067722762 4856
 sys/src/9/port/unthwack.c - 664 sys sys 1057323394 5249
-sys/src/9/port/xalloc.c - 664 sys sys 1032052814 4030
+sys/src/9/port/xalloc.c - 664 sys sys 1097074047 4030
 sys/src/9/ppc - 20000000775 sys sys 1059490838 0
 sys/src/9/ppc/blast - 664 sys sys 1067722850 659
 sys/src/9/ppc/blast.h - 664 sys sys 1059490750 3109
 sys/src/9/ppc/clock.c - 664 sys sys 1068135488 1032
-sys/src/9/ppc/dat.h - 664 sys sys 1091904417 4752
+sys/src/9/ppc/dat.h - 664 sys sys 1097073353 4712
 sys/src/9/ppc/devether.c - 664 sys sys 1059490750 9264
 sys/src/9/ppc/devflash.c - 664 sys sys 1059490750 19885
 sys/src/9/ppc/devirq.c - 664 sys sys 1077376394 6053
@@ -5560,9 +5560,9 @@ sys/src/9/ppc/io.h - 664 sys sys 1059490752 1017
 sys/src/9/ppc/l.s - 664 sys sys 1089299185 20371
 sys/src/9/ppc/lblast.h - 664 sys sys 1059490752 1694
 sys/src/9/ppc/lucu.h - 664 sys sys 1059490752 935
-sys/src/9/ppc/m8260.c - 664 sys sys 1077376312 14480
+sys/src/9/ppc/m8260.c - 664 sys sys 1097073366 14480
 sys/src/9/ppc/m8260.h - 664 sys sys 1068135488 20913
-sys/src/9/ppc/main.c - 664 sys sys 1072705483 9044
+sys/src/9/ppc/main.c - 664 sys sys 1097073343 9041
 sys/src/9/ppc/mcc.c - 664 sys sys 1059490752 9667
 sys/src/9/ppc/mem.h - 664 sys sys 1091021860 7002
 sys/src/9/ppc/mkfile - 664 sys sys 1067722849 1813
@@ -12382,3 +12382,7 @@ usr/glenda/lib/profile - 664 glenda glenda 1021580005 847
 usr/glenda/readme.acme - 664 glenda glenda 1019860628 4753
 usr/glenda/readme.rio - 664 glenda glenda 1019860628 6370
 usr/glenda/tmp - 20000000775 glenda glenda 1018802620 0
+386/9pc - 775 sys sys 1097118729 1817322
+386/9pccpu - 775 sys sys 1097118733 1473477
+386/9pcdisk - 775 sys sys 1097118737 2019928
+386/9pcf - 775 sys sys 1097118743 2351571

+ 8 - 8
dist/replica/plan9.db

@@ -3,13 +3,13 @@
 386/9loaddebug - 775 sys sys 1096600155 298042
 386/9loadlite - 775 sys sys 1094674491 130360
 386/9loadlitedebug - 775 sys sys 1096600155 192976
-386/9pc - 775 sys sys 1096600159 1817314
+386/9pc - 775 sys sys 1097118729 1817322
 386/9pc.gz - 664 sys sys 1077049336 635727
-386/9pccpu - 775 sys sys 1096600162 1473469
+386/9pccpu - 775 sys sys 1097118733 1473477
 386/9pccpu.gz - 664 sys sys 1077049387 519909
-386/9pcdisk - 775 sys sys 1096600167 2019920
+386/9pcdisk - 775 sys sys 1097118737 2019928
 386/9pcdisk.gz - 664 sys sys 1040006345 703136
-386/9pcf - 775 sys sys 1096600172 2351563
+386/9pcf - 775 sys sys 1097118743 2351571
 386/9pcf.gz - 664 sys sys 1077049490 872650
 386/9pxeload - 775 sys sys 1094674490 206624
 386/_9pcdisk.gz - 664 sys sys 1039764191 695837
@@ -5539,12 +5539,12 @@ sys/src/9/port/thwack.c - 664 sys sys 1057323394 7253
 sys/src/9/port/thwack.h - 664 sys sys 1015278340 1792
 sys/src/9/port/tod.c - 664 sys sys 1067722762 4856
 sys/src/9/port/unthwack.c - 664 sys sys 1057323394 5249
-sys/src/9/port/xalloc.c - 664 sys sys 1032052814 4030
+sys/src/9/port/xalloc.c - 664 sys sys 1097074047 4030
 sys/src/9/ppc - 20000000775 sys sys 1059490838 0
 sys/src/9/ppc/blast - 664 sys sys 1067722850 659
 sys/src/9/ppc/blast.h - 664 sys sys 1059490750 3109
 sys/src/9/ppc/clock.c - 664 sys sys 1068135488 1032
-sys/src/9/ppc/dat.h - 664 sys sys 1091904417 4752
+sys/src/9/ppc/dat.h - 664 sys sys 1097073353 4712
 sys/src/9/ppc/devether.c - 664 sys sys 1059490750 9264
 sys/src/9/ppc/devflash.c - 664 sys sys 1059490750 19885
 sys/src/9/ppc/devirq.c - 664 sys sys 1077376394 6053
@@ -5560,9 +5560,9 @@ sys/src/9/ppc/io.h - 664 sys sys 1059490752 1017
 sys/src/9/ppc/l.s - 664 sys sys 1089299185 20371
 sys/src/9/ppc/lblast.h - 664 sys sys 1059490752 1694
 sys/src/9/ppc/lucu.h - 664 sys sys 1059490752 935
-sys/src/9/ppc/m8260.c - 664 sys sys 1077376312 14480
+sys/src/9/ppc/m8260.c - 664 sys sys 1097073366 14480
 sys/src/9/ppc/m8260.h - 664 sys sys 1068135488 20913
-sys/src/9/ppc/main.c - 664 sys sys 1072705483 9044
+sys/src/9/ppc/main.c - 664 sys sys 1097073343 9041
 sys/src/9/ppc/mcc.c - 664 sys sys 1059490752 9667
 sys/src/9/ppc/mem.h - 664 sys sys 1091021860 7002
 sys/src/9/ppc/mkfile - 664 sys sys 1067722849 1813

+ 8 - 0
dist/replica/plan9.log

@@ -16791,3 +16791,11 @@
 1096601509 3 c 386/9pccpu - 775 sys sys 1096600162 1473469
 1096601509 4 c 386/9pcdisk - 775 sys sys 1096600167 2019920
 1096601509 5 c 386/9pcf - 775 sys sys 1096600172 2351563
+1097074819 0 c sys/src/9/port/xalloc.c - 664 sys sys 1097074047 4030
+1097074819 1 c sys/src/9/ppc/dat.h - 664 sys sys 1097073353 4712
+1097074819 2 c sys/src/9/ppc/m8260.c - 664 sys sys 1097073366 14480
+1097074819 3 c sys/src/9/ppc/main.c - 664 sys sys 1097073343 9041
+1097119828 0 c 386/9pc - 775 sys sys 1097118729 1817322
+1097119828 1 c 386/9pccpu - 775 sys sys 1097118733 1473477
+1097119828 2 c 386/9pcdisk - 775 sys sys 1097118737 2019928
+1097119828 3 c 386/9pcf - 775 sys sys 1097118743 2351571

+ 2 - 2
sys/src/9/port/xalloc.c

@@ -132,10 +132,10 @@ xallocz(ulong size, int zero)
 			}
 			iunlock(&xlists);
 			p = KADDR(p);
-			p->magix = Magichole;
-			p->size = size;
 			if(zero)
 				memset(p->data, 0, size);
+			p->magix = Magichole;
+			p->size = size;
 			return p->data;
 		}
 		l = &h->link;

+ 42 - 42
sys/src/9/ppc/dat.h

@@ -1,22 +1,22 @@
 typedef struct Conf	Conf;
 typedef struct FPsave	FPsave;
 typedef struct ISAConf	ISAConf;
+typedef struct Imap	Imap;
 typedef struct Label	Label;
 typedef struct Lock	Lock;
 typedef struct Mach	Mach;
 typedef struct Notsave	Notsave;
-typedef struct Page	Page;
 typedef struct PCArch	PCArch;
-typedef struct Pcidev	Pcidev;
 typedef struct PMMU	PMMU;
+typedef struct Page	Page;
+typedef struct Pcidev	Pcidev;
 typedef struct Proc	Proc;
 typedef struct Sys	Sys;
 typedef struct Ureg	Ureg;
 typedef struct Vctl	Vctl;
-typedef struct Imap	Imap;
-typedef struct Vctl	Vctl;
 
 #pragma incomplete Ureg
+#pragma incomplete Imap
 
 #define MAXSYSARG	5	/* for mount(fd, mpt, flag, arg, srv) */
 
@@ -61,7 +61,7 @@ enum
 /*
  * This structure must agree with fpsave and fprestore asm routines
  */
-struct	FPsave
+struct FPsave
 {
 	double	fpreg[32];
 	union {
@@ -85,11 +85,11 @@ struct Conf
 	ulong	upages;		/* user page pool */
 	ulong	nimage;		/* number of page cache image headers */
 	ulong	nswap;		/* number of swap pages */
-	int		nswppo;		/* max # of pageouts per segment pass */
+	int	nswppo;		/* max # of pageouts per segment pass */
 	ulong	copymode;	/* 0 is copy on write, 1 is copy on reference */
-	int		monitor;		/* has display? */
+	int	monitor;	/* has display? */
 	ulong	ialloc;		/* bytes available for interrupt time allocation */
-	ulong	pipeqsize;		/* size in bytes of pipe queues */
+	ulong	pipeqsize;	/* size in bytes of pipe queues */
 };
 
 /*
@@ -98,8 +98,8 @@ struct Conf
 #define NCOLOR 1
 struct PMMU
 {
-	int		mmupid;
-	Ureg	*	mmureg;		/* pointer to ureg structure */
+	int	mmupid;
+	Ureg	*mmureg;		/* pointer to ureg structure */
 };
 
 /*
@@ -126,9 +126,9 @@ typedef	void		KMap;
 struct Mach
 {
 	/* OFFSETS OF THE FOLLOWING KNOWN BY l.s */
-/*0x00*/	int		machno;	/* physical id of processor */
+/*0x00*/	int	machno;	/* physical id of processor */
 /*0x04*/	ulong	splpc;	/* pc that called splhi() */
-/*0x08*/	Proc	*	proc;	/* current process on this processor */
+/*0x08*/	Proc	*proc;	/* current process on this processor */
 	/* Debugging/statistics for software TLB in l.s (therefore, also known by l.s) */
 /*0x0c*/	ulong	tlbfault;	/* type of last miss */
 /*0x10*/	ulong	imiss;	/* number of instruction misses */
@@ -140,20 +140,20 @@ struct Mach
 
 	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;
+	Lock	alarmlock;	/* access to alarm list */
+	void	*alarm;		/* alarms bound to this clock */
+	int	inclockintr;
+	int	cputype;
 	ulong	loopconst;
-	Perf	perf;				/* performance counters */
+	Perf	perf;		/* performance counters */
 
-	Proc*	readied;		/* for runproc */
+	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 */
+	uvlong	cyclefreq;	/* Frequency of user readable cycle counter */
 	ulong	bushz;
 	ulong	dechz;
 	ulong	tbhz;
@@ -163,27 +163,27 @@ struct Mach
 	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;
+	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;
+	int	lastintr;
 
 	/* MUST BE LAST */
-	int		stack[1];
+	int	stack[1];
 };
 
 struct
@@ -200,7 +200,7 @@ struct
 #define NISAOPT		8
 
 struct ISAConf {
-	char		*type;
+	char	*type;
 	ulong	port;
 	int	irq;
 	ulong	dma;
@@ -213,17 +213,17 @@ struct ISAConf {
 };
 
 struct Vctl {
-	Vctl*	next;			/* handlers on this vector */
+	Vctl*	next;		/* handlers on this vector */
 
 	char	name[KNAMELEN];	/* of driver */
-	int	isintr;			/* interrupt or fault/trap */
+	int	isintr;		/* interrupt or fault/trap */
 	int	irq;
 
 	void	(*f)(Ureg*, void*);	/* handler to call */
-	void*	a;			/* argument to call it with */
+	void*	a;		/* argument to call it with */
 };
 
-extern Mach		mach0;
+extern Mach mach0;
 
-extern register Mach	*m;
-extern register Proc	*up;
+extern register Mach *m;
+extern register Proc *up;

+ 1 - 1
sys/src/9/ppc/m8260.c

@@ -7,8 +7,8 @@
 #include	"mem.h"
 #include	"dat.h"
 #include	"io.h"
-#include	"m8260.h"
 #include	"fns.h"
+#include	"m8260.h"
 
 enum {
 	Pin4 = BIT(4),

+ 8 - 8
sys/src/9/ppc/main.c

@@ -14,18 +14,18 @@ typedef struct Plan9ini Plan9ini;
 struct Plan9ini
 {
 	char	*name;
-	char *val;
+	char	*val;
 };
 
-char		*plan9inistr;
-Plan9ini	plan9ini[MAXCONF];
-int		nconf;
+char *plan9inistr;
+Plan9ini plan9ini[MAXCONF];
+int nconf;
 
-Conf	conf;
-FPsave	initfp;
-Lock		testlock;
+Conf conf;
+FPsave initfp;
+Lock testlock;
 
-static void	plan9iniinit(void);
+static void plan9iniinit(void);
 
 char *
 cpuid(void)