Browse Source

Plan 9 from Bell Labs 2005-04-23

David du Colombier 15 years ago
parent
commit
f3a829a601

+ 14 - 7
dist/replica/_plan9.db

@@ -3833,7 +3833,7 @@ sys/doc/venti/venti.pdf - 755 sys sys 1020384352 139090
 sys/doc/venti/venti.ps - 664 sys sys 1019852320 2012620
 sys/games - 20000000775 sys sys 952648872 0
 sys/games/lib - 20000000775 sys sys 952648879 0
-sys/games/lib/fortunes - 664 sys sys 1112905578 253631
+sys/games/lib/fortunes - 664 sys sys 1114187716 253657
 sys/games/lib/mahjongg - 20000000775 sys sys 1095792278 0
 sys/games/lib/mahjongg/backgrounds - 20000000775 sys sys 1095792293 0
 sys/games/lib/mahjongg/backgrounds/default.bit - 664 sys sys 1095792293 346803
@@ -3861,7 +3861,7 @@ sys/games/lib/sokoban/levels/hard.slc - 644 sys sys 1095792098 17051
 sys/include - 20000000775 sys sys 1016902416 0
 sys/include/9p.h - 664 sys sys 1091904420 4392
 sys/include/String.h - 664 sys sys 1091904425 1319
-sys/include/a.out.h - 664 sys sys 1108077276 1209
+sys/include/a.out.h - 664 sys sys 1114218489 1291
 sys/include/ape - 20000000775 sys sys 1014927784 0
 sys/include/ape/Plan9libnet.h - 664 sys sys 944948760 487
 sys/include/ape/ar.h - 664 sys sys 944948759 354
@@ -3948,7 +3948,7 @@ sys/include/ip.h - 664 sys sys 1103554773 2989
 sys/include/keyboard.h - 664 sys sys 1079577798 815
 sys/include/libc.h - 664 sys sys 1108157980 19587
 sys/include/libsec.h - 664 sys sys 1084318867 9264
-sys/include/mach.h - 664 sys sys 1089313992 8164
+sys/include/mach.h - 664 sys sys 1114218490 8336
 sys/include/memdraw.h - 664 sys sys 1091904419 5645
 sys/include/memlayer.h - 664 sys sys 1051031022 1851
 sys/include/mouse.h - 664 sys sys 1035232010 1003
@@ -5743,7 +5743,7 @@ sys/src/9/bitsy/wavelan.c - 664 sys sys 1064584681 27267
 sys/src/9/bitsy/wavelan.h - 664 sys sys 1037029076 27
 sys/src/9/boot - 20000000775 sys sys 1018556557 0
 sys/src/9/boot/aux.c - 664 sys sys 1063857702 2579
-sys/src/9/boot/boot.c - 664 sys sys 1079527281 6005
+sys/src/9/boot/boot.c - 664 sys sys 1114188078 6012
 sys/src/9/boot/boot.h - 664 sys sys 1063857659 1785
 sys/src/9/boot/bootauth.c - 664 sys sys 1039763726 1097
 sys/src/9/boot/bootcache.c - 664 sys sys 1063857645 1579
@@ -5915,7 +5915,7 @@ sys/src/9/pc/screen.h - 664 sys sys 1060267144 3797
 sys/src/9/pc/sd53c8xx.c - 664 sys sys 1112461125 52220
 sys/src/9/pc/sd53c8xx.i - 664 sys sys 1045063730 27355
 sys/src/9/pc/sd53c8xx.n - 664 sys sys 1032059019 12455
-sys/src/9/pc/sdata.c - 664 sys sys 1112727807 51105
+sys/src/9/pc/sdata.c - 664 sys sys 1114197935 51104
 sys/src/9/pc/sdmylex.c - 664 sys sys 1071245460 27812
 sys/src/9/pc/sdscsi.c - 664 sys sys 1077033661 7487
 sys/src/9/pc/trap.c - 664 sys sys 1105109602 20537
@@ -10703,7 +10703,7 @@ sys/src/cmd/rc/lex.c - 664 sys sys 1100894085 6100
 sys/src/cmd/rc/mkfile - 664 sys sys 1055698774 812
 sys/src/cmd/rc/pcmd.c - 664 sys sys 1100894086 2681
 sys/src/cmd/rc/pfnc.c - 664 sys sys 1100894087 1320
-sys/src/cmd/rc/plan9.c - 664 sys sys 1113742071 9209
+sys/src/cmd/rc/plan9.c - 664 sys sys 1114188140 9332
 sys/src/cmd/rc/rc.h - 664 sys sys 1100894086 3329
 sys/src/cmd/rc/simple.c - 664 sys sys 1055698777 8993
 sys/src/cmd/rc/subr.c - 664 sys sys 1055698779 1206
@@ -12529,7 +12529,7 @@ sys/src/libmach/2.c - 664 sys sys 964540513 2034
 sys/src/libmach/2db.c - 664 sys sys 1014929543 61245
 sys/src/libmach/2obj.c - 664 sys sys 1091732624 2335
 sys/src/libmach/5.c - 664 sys sys 984710422 1513
-sys/src/libmach/5db.c - 664 sys sys 1014929543 21529
+sys/src/libmach/5db.c - 664 sys sys 1114218476 21530
 sys/src/libmach/5obj.c - 664 sys sys 1091732625 2209
 sys/src/libmach/7.c - 664 sys sys 964540515 3267
 sys/src/libmach/7db.c - 664 sys sys 1014929543 17320
@@ -12948,3 +12948,10 @@ usr/glenda/lib/profile - 664 glenda glenda 1105128663 890
 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/bin/acid - 775 sys sys 1114225965 357187
+386/bin/db - 775 sys sys 1114225965 303621
+386/bin/snap - 775 sys sys 1114225966 271015
+386/bin/snapfs - 775 sys sys 1114225967 339869
+386/bin/rc - 775 sys sys 1114225966 143210
+386/bin/tprof - 775 sys sys 1114225968 256583
+386/lib/libmach.a - 664 sys sys 1114225969 658810

+ 14 - 14
dist/replica/plan9.db

@@ -19,7 +19,7 @@
 386/bin/8l - 775 sys sys 1107835553 115728
 386/bin/9660srv - 775 sys sys 1113794389 103976
 386/bin/aan - 775 sys sys 1108354539 130710
-386/bin/acid - 775 sys sys 1108960003 355983
+386/bin/acid - 775 sys sys 1114225965 357187
 386/bin/acme - 775 sys sys 1111637282 428512
 386/bin/ape - 20000000775 sys sys 1016944144 0
 386/bin/ape/basename - 775 sys sys 1087442501 132681
@@ -187,7 +187,7 @@
 386/bin/cpu - 775 sys sys 1108354550 137694
 386/bin/crop - 775 sys sys 1104121998 115763
 386/bin/date - 775 sys sys 1104121998 43261
-386/bin/db - 775 sys sys 1108960006 302393
+386/bin/db - 775 sys sys 1114225965 303621
 386/bin/dc - 775 sys sys 1104121999 99028
 386/bin/dd - 775 sys sys 1104121999 45347
 386/bin/deroff - 775 sys sys 1104122000 74244
@@ -365,7 +365,7 @@
 386/bin/ps - 775 sys sys 1104122047 65805
 386/bin/pwd - 775 sys sys 1104122047 36897
 386/bin/ramfs - 775 sys sys 1109650122 89167
-386/bin/rc - 775 sys sys 1113794394 143163
+386/bin/rc - 775 sys sys 1114225966 143210
 386/bin/rdbfs - 775 sys sys 1108354561 168396
 386/bin/read - 775 sys sys 1104122049 58046
 386/bin/replica - 20000000775 sys sys 1018321168 0
@@ -391,8 +391,8 @@
 386/bin/sha1sum - 775 sys sys 1104122054 61133
 386/bin/size - 775 sys sys 1108008334 74340
 386/bin/sleep - 775 sys sys 1085077097 3413
-386/bin/snap - 775 sys sys 1108960014 269837
-386/bin/snapfs - 775 sys sys 1108960015 338691
+386/bin/snap - 775 sys sys 1114225966 271015
+386/bin/snapfs - 775 sys sys 1114225967 339869
 386/bin/sniffer - 775 sys sys 1038443185 99028
 386/bin/snoopy - 775 sys sys 1108354563 157546
 386/bin/sort - 775 sys sys 1104122056 82285
@@ -425,7 +425,7 @@
 386/bin/topng - 775 sys sys 1108872012 138083
 386/bin/toppm - 775 sys sys 1104122065 164905
 386/bin/touch - 775 sys sys 1104122066 63763
-386/bin/tprof - 775 sys sys 1108960016 255319
+386/bin/tprof - 775 sys sys 1114225968 256583
 386/bin/tr - 775 sys sys 1104122066 61851
 386/bin/trace - 775 sys sys 1106799181 180728
 386/bin/troff - 775 sys sys 1094040114 357714
@@ -549,7 +549,7 @@
 386/lib/libhttpd.a - 664 sys sys 1108268398 99488
 386/lib/libip.a - 664 sys sys 1108268398 35602
 386/lib/libl.a - 664 sys sys 1108268398 5384
-386/lib/libmach.a - 664 sys sys 1108268400 652906
+386/lib/libmach.a - 664 sys sys 1114225969 658810
 386/lib/libmemdraw.a - 664 sys sys 1110946101 283198
 386/lib/libmemlayer.a - 664 sys sys 1108699740 47360
 386/lib/libmp.a - 664 sys sys 1108268401 79532
@@ -3833,7 +3833,7 @@ sys/doc/venti/venti.pdf - 755 sys sys 1020384352 139090
 sys/doc/venti/venti.ps - 664 sys sys 1019852320 2012620
 sys/games - 20000000775 sys sys 952648872 0
 sys/games/lib - 20000000775 sys sys 952648879 0
-sys/games/lib/fortunes - 664 sys sys 1112905578 253631
+sys/games/lib/fortunes - 664 sys sys 1114187716 253657
 sys/games/lib/mahjongg - 20000000775 sys sys 1095792278 0
 sys/games/lib/mahjongg/backgrounds - 20000000775 sys sys 1095792293 0
 sys/games/lib/mahjongg/backgrounds/default.bit - 664 sys sys 1095792293 346803
@@ -3861,7 +3861,7 @@ sys/games/lib/sokoban/levels/hard.slc - 644 sys sys 1095792098 17051
 sys/include - 20000000775 sys sys 1016902416 0
 sys/include/9p.h - 664 sys sys 1091904420 4392
 sys/include/String.h - 664 sys sys 1091904425 1319
-sys/include/a.out.h - 664 sys sys 1108077276 1209
+sys/include/a.out.h - 664 sys sys 1114218489 1291
 sys/include/ape - 20000000775 sys sys 1014927784 0
 sys/include/ape/Plan9libnet.h - 664 sys sys 944948760 487
 sys/include/ape/ar.h - 664 sys sys 944948759 354
@@ -3948,7 +3948,7 @@ sys/include/ip.h - 664 sys sys 1103554773 2989
 sys/include/keyboard.h - 664 sys sys 1079577798 815
 sys/include/libc.h - 664 sys sys 1108157980 19587
 sys/include/libsec.h - 664 sys sys 1084318867 9264
-sys/include/mach.h - 664 sys sys 1089313992 8164
+sys/include/mach.h - 664 sys sys 1114218490 8336
 sys/include/memdraw.h - 664 sys sys 1091904419 5645
 sys/include/memlayer.h - 664 sys sys 1051031022 1851
 sys/include/mouse.h - 664 sys sys 1035232010 1003
@@ -5743,7 +5743,7 @@ sys/src/9/bitsy/wavelan.c - 664 sys sys 1064584681 27267
 sys/src/9/bitsy/wavelan.h - 664 sys sys 1037029076 27
 sys/src/9/boot - 20000000775 sys sys 1018556557 0
 sys/src/9/boot/aux.c - 664 sys sys 1063857702 2579
-sys/src/9/boot/boot.c - 664 sys sys 1079527281 6005
+sys/src/9/boot/boot.c - 664 sys sys 1114188078 6012
 sys/src/9/boot/boot.h - 664 sys sys 1063857659 1785
 sys/src/9/boot/bootauth.c - 664 sys sys 1039763726 1097
 sys/src/9/boot/bootcache.c - 664 sys sys 1063857645 1579
@@ -5915,7 +5915,7 @@ sys/src/9/pc/screen.h - 664 sys sys 1060267144 3797
 sys/src/9/pc/sd53c8xx.c - 664 sys sys 1112461125 52220
 sys/src/9/pc/sd53c8xx.i - 664 sys sys 1045063730 27355
 sys/src/9/pc/sd53c8xx.n - 664 sys sys 1032059019 12455
-sys/src/9/pc/sdata.c - 664 sys sys 1112727807 51105
+sys/src/9/pc/sdata.c - 664 sys sys 1114197935 51104
 sys/src/9/pc/sdmylex.c - 664 sys sys 1071245460 27812
 sys/src/9/pc/sdscsi.c - 664 sys sys 1077033661 7487
 sys/src/9/pc/trap.c - 664 sys sys 1105109602 20537
@@ -10703,7 +10703,7 @@ sys/src/cmd/rc/lex.c - 664 sys sys 1100894085 6100
 sys/src/cmd/rc/mkfile - 664 sys sys 1055698774 812
 sys/src/cmd/rc/pcmd.c - 664 sys sys 1100894086 2681
 sys/src/cmd/rc/pfnc.c - 664 sys sys 1100894087 1320
-sys/src/cmd/rc/plan9.c - 664 sys sys 1113742071 9209
+sys/src/cmd/rc/plan9.c - 664 sys sys 1114188140 9332
 sys/src/cmd/rc/rc.h - 664 sys sys 1100894086 3329
 sys/src/cmd/rc/simple.c - 664 sys sys 1055698777 8993
 sys/src/cmd/rc/subr.c - 664 sys sys 1055698779 1206
@@ -12529,7 +12529,7 @@ sys/src/libmach/2.c - 664 sys sys 964540513 2034
 sys/src/libmach/2db.c - 664 sys sys 1014929543 61245
 sys/src/libmach/2obj.c - 664 sys sys 1091732624 2335
 sys/src/libmach/5.c - 664 sys sys 984710422 1513
-sys/src/libmach/5db.c - 664 sys sys 1014929543 21529
+sys/src/libmach/5db.c - 664 sys sys 1114218476 21530
 sys/src/libmach/5obj.c - 664 sys sys 1091732625 2209
 sys/src/libmach/7.c - 664 sys sys 964540515 3267
 sys/src/libmach/7db.c - 664 sys sys 1014929543 17320

+ 14 - 0
dist/replica/plan9.log

@@ -14722,3 +14722,17 @@
 1113928309 0 c sys/src/9/pc/l.s - 664 sys sys 1113926772 23705
 1114038131 0 c sys/src/cmd/diff/diffreg.c - 664 sys sys 1114037841 8825
 1114054335 0 c 386/bin/diff - 775 sys sys 1114053009 85081
+1114189362 0 c sys/games/lib/fortunes - 664 sys sys 1114187716 253657
+1114189362 1 c sys/src/9/boot/boot.c - 664 sys sys 1114188078 6012
+1114189362 2 c sys/src/cmd/rc/plan9.c - 664 sys sys 1114188140 9332
+1114198364 0 c sys/src/9/pc/sdata.c - 664 sys sys 1114197935 51104
+1114219968 0 c sys/include/a.out.h - 664 sys sys 1114218489 1291
+1114219968 1 c sys/include/mach.h - 664 sys sys 1114218490 8336
+1114219968 2 c sys/src/libmach/5db.c - 664 sys sys 1114218476 21530
+1114227170 0 c 386/bin/acid - 775 sys sys 1114225965 357187
+1114227170 1 c 386/bin/db - 775 sys sys 1114225965 303621
+1114227170 2 c 386/bin/snap - 775 sys sys 1114225966 271015
+1114227170 3 c 386/bin/snapfs - 775 sys sys 1114225967 339869
+1114227170 4 c 386/bin/rc - 775 sys sys 1114225966 143210
+1114227170 5 c 386/bin/tprof - 775 sys sys 1114225968 256583
+1114227170 6 c 386/lib/libmach.a - 664 sys sys 1114225969 658810

+ 1 - 0
sys/games/lib/fortunes

@@ -4061,3 +4061,4 @@ The MOV mnemonic, which stands for `move', is a misnomer.  A copy function is ac
 It's not foolproof, but maybe if we don't act like fools, it will work.
 May God forgive you for what you have done!  - Pope John Paul I, to the Cardinals who elected him
   hb = 0x80;  hb = hb << 24;   /* hb = 0x80000000UL */
+setenv I_WANT_A_BROKEN_PS

+ 3 - 1
sys/include/a.out.h

@@ -25,8 +25,10 @@ struct	Exec
 #define	N_MAGIC		_MAGIC(22)	/* mips 4000 LE */
 #define	L_MAGIC		_MAGIC(23)	/* dec alpha */
 #define	P_MAGIC		_MAGIC(24)	/* mips 3000 LE */
+#define	U_MAGIC		_MAGIC(25)	/* sparc64 */
+#define	S_MAGIC		_MAGIC(26)	/* amd64 */
 #define	MIN_MAGIC	8
-#define	MAX_MAGIC	24
+#define	MAX_MAGIC	26
 
 #define	DYN_MAGIC	0x80000000	/* or'd in for dynamically loaded modules */
 

+ 18 - 8
sys/include/mach.h

@@ -9,7 +9,9 @@
  *		mips,
  *		68020,
  *		i386,
+ *		amd64,
  *		sparc,
+ *		sparc64,
  *		mips2 (R4000)
  *		arm
  *		power pc
@@ -30,6 +32,8 @@ enum
 	MPOWER,
 	MALPHA,
 	NMIPS,
+	MSPARC64,
+	MAMD64,
 				/* types of executables */
 	FNONE = 0,		/* unidentified */
 	FMIPS,			/* v.out */
@@ -54,6 +58,8 @@ enum
 	FALPHA,			/* 7.out */
 	FALPHAB,		/* DEC Alpha bootable */
 	FMIPSLE,		/* 3k little endian */
+	FSPARC64,		/* u.out */
+	FAMD64,			/* 6.out */
 
 	ANONE = 0,		/* dissembler types */
 	AMIPS,
@@ -68,6 +74,8 @@ enum
 	AARM,
 	APOWER,
 	AALPHA,
+	ASPARC64,
+	AAMD64,
 				/* object file types */
 	Obj68020 = 0,		/* .2 */
 	ObjSparc,		/* .k */
@@ -81,6 +89,8 @@ enum
 	ObjPower,		/* .q */
 	ObjMips2le,		/* .0 */
 	ObjAlpha,		/* .7 */
+	ObjSparc64,		/* .u */
+	ObjAmd64,		/* .6 */
 	Maxobjtype,
 
 	CNONE  = 0,		/* symbol table classes */
@@ -121,10 +131,10 @@ struct Symbol {
 	void 	*handle;		/* used internally - owning func */
 	struct {
 		char	*name;
-		long	value;		/* address or stack offset */
+		vlong	value;		/* address or stack offset */
 		char	type;		/* as in a.out.h */
 		char	class;		/* as above */
-		int index;		/* in findlocal, globalsym, textsym */
+		int	index;		/* in findlocal, globalsym, textsym */
 	};
 };
 
@@ -135,7 +145,7 @@ struct Reglist {
 	char	*rname;			/* register name */
 	short	roffs;			/* offset in u-block */
 	char	rflags;			/* INTEGER/FLOAT, WRITABLE */
-	char	rformat;		/* print format: 'x', 'X', 'f', '8' */
+	char	rformat;		/* print format: 'x', 'X', 'f', '8', '3', 'Y', 'W' */
 };
 
 enum {					/* bits in rflags field */
@@ -164,10 +174,10 @@ struct Mach{
 	char	*sp;			/* sp name */
 	char	*link;			/* link register name */
 	char	*sbreg;			/* static base register name */
-	ulong	sb;			/* static base register value */
+	uvlong	sb;			/* static base register value */
 	int	pgsize;			/* page size */
-	ulong	kbase;			/* kernel base address */
-	ulong	ktmask;			/* ktzero = kbase & ~ktmask */
+	uvlong	kbase;			/* kernel base address */
+	uvlong	ktmask;			/* ktzero = kbase & ~ktmask */
 	int	pcquant;		/* quantization of pc */
 	int	szaddr;			/* sizeof(void*) */
 	int	szreg;			/* sizeof(register) */
@@ -224,8 +234,8 @@ typedef struct Fhdr
 	long	lnpcoff;	/* size of line number-pc table */
 } Fhdr;
 
-extern	int	asstype;		/* dissembler type - machdata.c */
-extern	Machdata *machdata;		/* jump vector - machdata.c */
+extern	int	asstype;	/* dissembler type - machdata.c */
+extern	Machdata *machdata;	/* jump vector - machdata.c */
 
 Map*		attachproc(int, int, int, Fhdr*);
 int		beieee80ftos(char*, int, void*);

+ 4 - 4
sys/src/9/boot/boot.c

@@ -34,10 +34,10 @@ boot(int argc, char *argv[])
 
 	fmtinstall('r', errfmt);
 
-	open("#c/cons", OREAD);
-	open("#c/cons", OWRITE);
-	open("#c/cons", OWRITE);
-	bind("#c", "/dev", MAFTER);
+	bind("#c", "/dev", MBEFORE);
+	open("/dev/cons", OREAD);
+	open("/dev/cons", OWRITE);
+	open("/dev/cons", OWRITE);
 	/*
 	 * init will reinitialize its namespace.
 	 * #ec gets us plan9.ini settings (*var variables).

+ 1 - 1
sys/src/9/pc/sdata.c

@@ -1869,7 +1869,7 @@ atapnp(void)
 		case (0x3149<<16)|0x1106:	/* VIA VT8237 SATA/RAID */
 			pi = 0x85;
 			break;
-		case (0x0004<<16)|0x1103:	/* HighPoint HPT-370 */
+		case (0x0004<<16)|0x1103:	/* HighPoint HPT366 */
 			pi = 0x85;
 			/*
 			 * Turn off fast interrupt prediction.

+ 4 - 0
sys/src/cmd/rc/plan9.c

@@ -566,6 +566,10 @@ Isatty(int fd)
 	if(fd2path(fd, buf, sizeof buf) != 0)
 		return 0;
 
+	/* might be #c/cons during boot - fixed 22 april 2005, remove this later */
+	if(strcmp(buf, "#c/cons") == 0)
+		return 1;
+
 	/* might be /mnt/term/dev/cons */
 	return strlen(buf) >= 9 && strcmp(buf+strlen(buf)-9, "/dev/cons") == 0;
 }

+ 1 - 1
sys/src/libmach/5db.c

@@ -283,7 +283,7 @@ gsymoff(char *buf, int n, long v, int space)
 	if (!delta)
 		return snprint(buf, n, "%s", s.name);
 	if (s.type != 't' && s.type != 'T')
-		return snprint(buf, n, "%s+%lux", s.name, v-s.value);
+		return snprint(buf, n, "%s+%llux", s.name, v-s.value);
 	else
 		return snprint(buf, n, "#%lux", v);
 }