Browse Source

Plan 9 from Bell Labs 2002-12-15

David du Colombier 19 years ago
parent
commit
04475fdd42

+ 12 - 11
dist/replica/plan9.db

@@ -6,9 +6,9 @@
 29000/mkfile - 664 sys sys 948141302 46
 386 - 20000000775 sys sys 1010957353 0
 386/9load - 775 sys sys 1032215926 180040
-386/9loaddebug - 775 sys sys 1032215929 259893
+386/9loaddebug - 775 sys sys 1039914699 259921
 386/9loadlite - 775 sys sys 1032215927 124616
-386/9loadlitedebug - 775 sys sys 1032215930 183621
+386/9loadlitedebug - 775 sys sys 1039914699 183617
 386/9pc - 775 sys sys 1039764767 1783420
 386/9pc.gz - 664 sys sys 1039764768 614091
 386/9pccpu - 775 sys sys 1039764770 1429714
@@ -18,7 +18,7 @@
 386/_9pcdisk.gz - 664 sys sys 1039764191 695837
 386/bin - 20000000775 sys sys 1018897690 0
 386/bin/8a - 775 sys sys 1039758526 113387
-386/bin/8c - 775 sys sys 1039758527 298665
+386/bin/8c - 775 sys sys 1039914697 298705
 386/bin/8l - 775 sys sys 1039758527 107971
 386/bin/9660srv - 775 sys sys 1039758527 105203
 386/bin/aan - 775 sys sys 1039758528 127563
@@ -408,8 +408,8 @@
 386/bin/usb/usbaudio - 775 sys sys 1039758606 173005
 386/bin/usb/usbd - 775 sys sys 1039758606 121266
 386/bin/usb/usbmouse - 775 sys sys 1039758606 136659
-386/bin/vac - 775 sys sys 1039758607 173522
-386/bin/vacfs - 775 sys sys 1039758607 179723
+386/bin/vac - 775 sys sys 1039914697 173711
+386/bin/vacfs - 775 sys sys 1039914697 179912
 386/bin/venti - 20000000775 sys sys 947360466 0
 386/bin/venti/buildindex - 775 sys sys 1039758608 178668
 386/bin/venti/checkarenas - 775 sys sys 1039758608 181667
@@ -429,9 +429,9 @@
 386/bin/venti/wrarena - 775 sys sys 1039758612 181345
 386/bin/venti/write - 775 sys sys 1039758613 102982
 386/bin/vncs - 775 sys sys 1039758613 440826
-386/bin/vncv - 775 sys sys 1039758614 174057
+386/bin/vncv - 775 sys sys 1039914698 174139
 386/bin/vt - 775 sys sys 1039758614 169349
-386/bin/vtdump - 775 sys sys 1039758615 163138
+386/bin/vtdump - 775 sys sys 1039914698 163327
 386/bin/wc - 775 sys sys 1039758615 42416
 386/bin/webcookies - 775 sys sys 1039758615 159686
 386/bin/webfs - 775 sys sys 1039758616 342496
@@ -4940,7 +4940,7 @@ sys/src/9/bitsy/l.s - 664 sys sys 1037029024 18182
 sys/src/9/bitsy/main.c - 664 sys sys 1039753387 8929
 sys/src/9/bitsy/map - 664 sys sys 1017695515 236
 sys/src/9/bitsy/mem.h - 664 sys sys 1037029029 8048
-sys/src/9/bitsy/mkfile - 664 sys sys 1037812165 2387
+sys/src/9/bitsy/mkfile - 664 sys sys 1039911490 2389
 sys/src/9/bitsy/mmu.c - 664 sys sys 1017695515 11204
 sys/src/9/bitsy/mouse.c - 664 sys sys 1017695516 962
 sys/src/9/bitsy/paqfiles - 20000000775 sys sys 1020011250 0
@@ -5085,6 +5085,7 @@ sys/src/9/pc/etherga620.c - 664 sys sys 1032052917 28786
 sys/src/9/pc/etherga620fw.h - 644 sys sys 1026847642 222295
 sys/src/9/pc/etherif.h - 664 sys sys 1026847642 985
 sys/src/9/pc/ethermii.c - 664 sys sys 1039803177 4555
+sys/src/9/pc/ethermii.h - 664 sys sys 1039895684 3259
 sys/src/9/pc/ethersink.c - 664 sys sys 1017854323 1075
 sys/src/9/pc/ethersmc.c - 664 sys sys 1015014518 15079
 sys/src/9/pc/etherwavelan.c - 664 sys sys 1026847642 3722
@@ -5100,7 +5101,7 @@ sys/src/9/pc/l.s - 664 sys sys 1026847645 20867
 sys/src/9/pc/main.c - 664 sys sys 1034202255 14255
 sys/src/9/pc/mem.h - 664 sys sys 1018553448 4573
 sys/src/9/pc/memory.c - 664 sys sys 1032303986 12994
-sys/src/9/pc/mkfile - 664 sys sys 1039753495 2992
+sys/src/9/pc/mkfile - 664 sys sys 1039911473 2994
 sys/src/9/pc/mmu.c - 664 sys sys 1018553449 10008
 sys/src/9/pc/mouse.c - 664 sys sys 1020369766 6315
 sys/src/9/pc/mp.c - 664 sys sys 1018974174 17091
@@ -6678,7 +6679,7 @@ sys/src/cmd/cc/com64.c - 664 sys sys 944960808 9763
 sys/src/cmd/cc/compat - 664 sys sys 1014925177 684
 sys/src/cmd/cc/compat.c - 664 sys sys 944960869 266
 sys/src/cmd/cc/con.c - 664 sys sys 944960808 8349
-sys/src/cmd/cc/dcl.c - 664 sys sys 1014925177 25712
+sys/src/cmd/cc/dcl.c - 664 sys sys 1039910271 25755
 sys/src/cmd/cc/dpchk.c - 664 sys sys 1014925177 6368
 sys/src/cmd/cc/funct.c - 664 sys sys 984718510 6167
 sys/src/cmd/cc/lex.c - 664 sys sys 1014925177 23722
@@ -10397,7 +10398,7 @@ sys/src/cmd/vnc/exporter.c - 664 sys sys 1014925998 1312
 sys/src/cmd/vnc/exportfs.c - 664 sys sys 1014925998 13552
 sys/src/cmd/vnc/kbd.c - 664 sys sys 1014925998 3256
 sys/src/cmd/vnc/kbd.h - 664 sys sys 1034430141 301
-sys/src/cmd/vnc/kbd_vwr.c - 664 sys sys 1039767358 2361
+sys/src/cmd/vnc/kbd_vwr.c - 664 sys sys 1039889837 2389
 sys/src/cmd/vnc/latin1.c - 664 sys sys 1014925999 1410
 sys/src/cmd/vnc/latin1.h - 664 sys sys 1014925999 3524
 sys/src/cmd/vnc/mkfile - 664 sys sys 1034430146 649

+ 12 - 0
dist/replica/plan9.log

@@ -16756,3 +16756,15 @@
 1039804272 0 c sys/src/9/pc/pccpu - 664 sys sys 1039803186 785
 1039804272 1 a sys/src/9/pc/ether82543.c - 664 sys sys 1039803177 38406
 1039804272 2 a sys/src/9/pc/ethermii.c - 664 sys sys 1039803177 4555
+1039890693 0 c sys/src/cmd/vnc/kbd_vwr.c - 664 sys sys 1039889837 2389
+1039896098 0 a sys/src/9/pc/ethermii.h - 664 sys sys 1039895684 3259
+1039910515 0 c sys/src/cmd/cc/dcl.c - 664 sys sys 1039910271 25755
+1039912317 0 c sys/src/9/bitsy/mkfile - 664 sys sys 1039911490 2389
+1039912317 1 c sys/src/9/pc/mkfile - 664 sys sys 1039911473 2994
+1039915920 0 c 386/9loaddebug - 775 sys sys 1039914699 259921
+1039915920 1 c 386/9loadlitedebug - 775 sys sys 1039914699 183617
+1039915920 2 c 386/bin/8c - 775 sys sys 1039914697 298705
+1039915920 3 c 386/bin/vncv - 775 sys sys 1039914698 174139
+1039915920 4 c 386/bin/vtdump - 775 sys sys 1039914698 163327
+1039915920 5 c 386/bin/vac - 775 sys sys 1039914697 173711
+1039915920 6 c 386/bin/vacfs - 775 sys sys 1039914697 179912

+ 1 - 1
sys/src/9/bitsy/mkfile

@@ -83,7 +83,7 @@ install:V:	$p$CONF paqdisk
 	test -d /n/once/arm && cp $p$CONF /n/once/arm/$p$CONF
 	test -d /n/once/arm && cp s$p$CONF /n/once/arm/s$p$CONF
 	test -d /n/once/arm && cp paqdisk /n/once/arm/paqdisk
-	9fs lookout && cp $p$CONF /n/lookout/$objtype/$p$CONF
+	# 9fs lookout && cp $p$CONF /n/lookout/$objtype/$p$CONF
 
 installkern:V:	$p$CONF
 	cp $p$CONF /$objtype/$p$CONF

+ 116 - 0
sys/src/9/pc/ethermii.h

@@ -0,0 +1,116 @@
+typedef struct Mii Mii;
+typedef struct MiiPhy MiiPhy;
+
+enum {					/* registers */
+	Bmcr		= 0x00,		/* Basic Mode Control */
+	Bmsr		= 0x01,		/* Basic Mode Status */
+	Phyidr1		= 0x02,		/* PHY Identifier #1 */
+	Phyidr2		= 0x03,		/* PHY Identifier #2 */
+	Anar		= 0x04,		/* Auto-Negotiation Advertisement */
+	Anlpar		= 0x05,		/* AN Link Partner Ability */
+	Aner		= 0x06,		/* AN Expansion */
+	Annptr		= 0x07,		/* AN Next Page TX */
+	Annprr		= 0x08,		/* AN Next Page RX */
+	Mscr		= 0x09,		/* MASTER-SLAVE Control */
+	Mssr		= 0x0A,		/* MASTER-SLAVE Status */
+	Esr		= 0x0F,		/* Extended Status */
+
+	NMiiPhyr	= 32,
+	NMiiPhy		= 32,
+};
+
+enum {					/* Bmcr */
+	BmcrSs1		= 0x0040,	/* Speed Select[1] */
+	BmcrCte		= 0x0080,	/* Collision Test Enable */
+	BmcrDm		= 0x0100,	/* Duplex Mode */
+	BmcrRan		= 0x0200,	/* Restart Auto-Negotiation */
+	BmcrI		= 0x0400,	/* Isolate */
+	BmcrPd		= 0x0800,	/* Power Down */
+	BmcrAne		= 0x1000,	/* Auto-Negotiation Enable */
+	BmcrSs0		= 0x2000,	/* Speed Select[0] */
+	BmcrLe		= 0x4000,	/* Loopback Enable */
+	BmcrR		= 0x8000,	/* Reset */
+};
+
+enum {					/* Bmsr */
+	BmsrEc		= 0x0001,	/* Extended Capability */
+	BmsrJd		= 0x0002,	/* Jabber Detect */
+	BmsrLs		= 0x0004,	/* Link Status */
+	BmsrAna		= 0x0008,	/* Auto-Negotiation Ability */
+	BmsrRf		= 0x0010,	/* Remote Fault */
+	BmsrAnc		= 0x0020,	/* Auto-Negotiation Complete */
+	BmsrPs		= 0x0040,	/* Preamble Suppression Capable */
+	BmsrEs		= 0x0100,	/* Extended Status */
+	Bmsr100T2HD	= 0x0200,	/* 100BASE-T2 HD Capable */
+	Bmsr100T2FD	= 0x0400,	/* 100BASE-T2 FD Capable */
+	Bmsr10THD	= 0x0800,	/* 100BASE-T HD Capable */
+	Bmsr10TFD	= 0x1000,	/* 10BASE-T FD Capable */
+	Bmsr100TXHD	= 0x2000,	/* 100BASE-TX HD Capable */
+	Bmsr100TXFD	= 0x4000,	/* 100BASE-TX FD Capable */
+	Bmsr100T4	= 0x8000,	/* 100BASE-T4 Capable */
+};
+
+enum {					/* Anar/Anlpar */
+	Ana10HD		= 0x0020,	/* Advertise 10BASE-T */
+	Ana10FD		= 0x0040,	/* Advertise 10BASE-T FD */
+	AnaTXHD		= 0x0080,	/* Advertise 100BASE-TX */
+	AnaTXFD		= 0x0100,	/* Advertise 100BASE-TX FD */
+	AnaT4		= 0x0200,	/* Advertise 100BASE-T4 */
+	AnaP		= 0x0400,	/* Pause */
+	AnaAP		= 0x0800,	/* Asymmetrical Pause */
+	AnaRf		= 0x2000,	/* Remote Fault */
+	AnaAck		= 0x4000,	/* Acknowledge */
+	AnaNp		= 0x8000,	/* Next Page Indication */
+};
+
+enum {					/* Mscr */
+	Mscr1000THD	= 0x0100,	/* Advertise 1000BASE-T HD */
+	Mscr1000TFD	= 0x0200,	/* Advertise 1000BASE-T FD */
+};
+
+enum {					/* Mssr */
+	Mssr1000THD	= 0x0400,	/* Link Partner 1000BASE-T HD able */
+	Mssr1000TFD	= 0x0800,	/* Link Partner 1000BASE-T FD able */
+};
+
+enum {					/* Esr */
+	Esr1000THD	= 0x1000,	/* 1000BASE-T HD Capable */
+	Esr1000TFD	= 0x2000,	/* 1000BASE-T FD Capable */
+	Esr1000XHD	= 0x4000,	/* 1000BASE-X HD Capable */
+	Esr1000XFD	= 0x8000,	/* 1000BASE-X FD Capable */
+};
+
+typedef struct Mii {
+	Lock;
+	int	nphy;
+	int	mask;
+	MiiPhy*	phy[NMiiPhy];
+	MiiPhy*	curphy;
+
+	void*	ctlr;
+	int	(*mir)(Mii*, int, int);
+	int	(*miw)(Mii*, int, int, int);
+} Mii;
+
+typedef struct MiiPhy {
+	Mii*	mii;
+	int	oui;
+	int	phyno;
+
+	int	anar;
+	int	fc;
+	int	mscr;
+
+	int	link;
+	int	speed;
+	int	fd;
+	int	rfc;
+	int	tfc;
+};
+
+extern int mii(Mii*, int);
+extern int miiane(Mii*, int, int, int);
+extern int miimir(Mii*, int);
+extern int miimiw(Mii*, int, int);
+extern int miireset(Mii*);
+extern int miistatus(Mii*);

+ 1 - 1
sys/src/9/pc/mkfile

@@ -72,7 +72,7 @@ $p$CONF.gz: $p$CONF
 
 install:V: $p$CONF $p$CONF.gz
 	cp $p$CONF $p$CONF.gz /$objtype/
-	import lookout / /n/lookout && cp $p$CONF $p$CONF.gz /n/lookout/$objtype/
+	# import lookout / /n/lookout && cp $p$CONF $p$CONF.gz /n/lookout/$objtype/
 
 <../boot/bootmkfile
 <../port/portmkfile

+ 2 - 1
sys/src/cmd/cc/dcl.c

@@ -1256,7 +1256,8 @@ xdecl(int c, Type *t, Sym *s)
 	if(s->type != T)
 		if(s->class != c || !sametype(t, s->type) || t->etype == TENUM) {
 			diag(Z, "external redeclaration of: %s", s->name);
-			print("	%s %T; %s %T\n", cnames[c], t, cnames[s->class], s->type);
+			print("	%s %T %L\n", cnames[c], t, nearln);
+			print("	%s %T %L\n", cnames[s->class], s->type, s->varlineno);
 		}
 	tmerge(t, s);
 	s->type = t;

+ 1 - 0
sys/src/cmd/vnc/kbd_vwr.c

@@ -112,6 +112,7 @@ readkbd(Vnc *v)
 			if(r == ks && r < 0x1A) {	/* control key */
 				keyevent(v, Xctl, 1);
 				keyevent(v, r+0x60, 1);	/* 0x60: make capital letter */
+				keyevent(v, r+0x60, 0);
 				keyevent(v, Xctl, 0);
 			} else	{
 				keyevent(v, ks, 1);