Browse Source

Plan 9 from Bell Labs 2008-01-15

David du Colombier 16 years ago
parent
commit
180e159ab1

+ 3 - 3
dist/replica/_plan9.db

@@ -8101,7 +8101,7 @@ sys/src/9/pc/ether8139.c - 664 sys sys 1185650567 19974
 sys/src/9/pc/ether8169.c - 664 sys sys 1185812348 26931
 sys/src/9/pc/ether82543gc.c - 664 sys sys 1131290377 32294
 sys/src/9/pc/ether82557.c - 664 sys sys 1191886292 30411
-sys/src/9/pc/ether82563.c - 664 sys sys 1199920348 36758
+sys/src/9/pc/ether82563.c - 664 sys sys 1200342471 37076
 sys/src/9/pc/ether83815.c - 664 sys sys 1172259521 26346
 sys/src/9/pc/ether8390.c - 664 sys sys 1131290377 17702
 sys/src/9/pc/ether8390.h - 664 sys sys 1015014517 1511
@@ -8166,7 +8166,7 @@ sys/src/9/pc/sd53c8xx.c - 664 sys sys 1170456695 55276
 sys/src/9/pc/sd53c8xx.i - 664 sys sys 1128547230 28453
 sys/src/9/pc/sd53c8xx.n - 664 sys sys 1131290556 12657
 sys/src/9/pc/sdata.c - 664 sys sys 1186361525 52991
-sys/src/9/pc/sdiahci.c - 664 sys sys 1199915722 38422
+sys/src/9/pc/sdiahci.c - 664 sys sys 1200348596 38496
 sys/src/9/pc/sdmv50xx.c - 664 sys sys 1199910989 33838
 sys/src/9/pc/sdmylex.c - 664 sys sys 1189229947 28395
 sys/src/9/pc/sdscsi.c - 664 sys sys 1186618532 7957
@@ -9229,7 +9229,7 @@ sys/src/boot/pc/sd53c8xx.i - 664 sys sys 1015007955 27245
 sys/src/boot/pc/sdaoe.c - 664 sys sys 1199911246 11268
 sys/src/boot/pc/sdata.c - 664 sys sys 1199911580 38891
 sys/src/boot/pc/sdbios.c - 664 sys sys 1194145651 3282
-sys/src/boot/pc/sdiahci.c - 664 sys sys 1199911456 28029
+sys/src/boot/pc/sdiahci.c - 664 sys sys 1200349145 28259
 sys/src/boot/pc/sdmylex.c - 664 sys sys 1171783051 28694
 sys/src/boot/pc/sdscsi.c - 664 sys sys 1144961224 7006
 sys/src/boot/pc/trap.c - 664 sys sys 1193167011 7497

+ 3 - 3
dist/replica/plan9.db

@@ -8101,7 +8101,7 @@ sys/src/9/pc/ether8139.c - 664 sys sys 1185650567 19974
 sys/src/9/pc/ether8169.c - 664 sys sys 1185812348 26931
 sys/src/9/pc/ether82543gc.c - 664 sys sys 1131290377 32294
 sys/src/9/pc/ether82557.c - 664 sys sys 1191886292 30411
-sys/src/9/pc/ether82563.c - 664 sys sys 1199920348 36758
+sys/src/9/pc/ether82563.c - 664 sys sys 1200342471 37076
 sys/src/9/pc/ether83815.c - 664 sys sys 1172259521 26346
 sys/src/9/pc/ether8390.c - 664 sys sys 1131290377 17702
 sys/src/9/pc/ether8390.h - 664 sys sys 1015014517 1511
@@ -8166,7 +8166,7 @@ sys/src/9/pc/sd53c8xx.c - 664 sys sys 1170456695 55276
 sys/src/9/pc/sd53c8xx.i - 664 sys sys 1128547230 28453
 sys/src/9/pc/sd53c8xx.n - 664 sys sys 1131290556 12657
 sys/src/9/pc/sdata.c - 664 sys sys 1186361525 52991
-sys/src/9/pc/sdiahci.c - 664 sys sys 1199915722 38422
+sys/src/9/pc/sdiahci.c - 664 sys sys 1200348596 38496
 sys/src/9/pc/sdmv50xx.c - 664 sys sys 1199910989 33838
 sys/src/9/pc/sdmylex.c - 664 sys sys 1189229947 28395
 sys/src/9/pc/sdscsi.c - 664 sys sys 1186618532 7957
@@ -9229,7 +9229,7 @@ sys/src/boot/pc/sd53c8xx.i - 664 sys sys 1015007955 27245
 sys/src/boot/pc/sdaoe.c - 664 sys sys 1199911246 11268
 sys/src/boot/pc/sdata.c - 664 sys sys 1199911580 38891
 sys/src/boot/pc/sdbios.c - 664 sys sys 1194145651 3282
-sys/src/boot/pc/sdiahci.c - 664 sys sys 1199911456 28029
+sys/src/boot/pc/sdiahci.c - 664 sys sys 1200349145 28259
 sys/src/boot/pc/sdmylex.c - 664 sys sys 1171783051 28694
 sys/src/boot/pc/sdscsi.c - 664 sys sys 1144961224 7006
 sys/src/boot/pc/trap.c - 664 sys sys 1193167011 7497

+ 3 - 0
dist/replica/plan9.log

@@ -18313,3 +18313,6 @@
 1200263452 27 c 386/bin/upas/testscan - 775 sys sys 1200262795 83864
 1200263452 28 c 386/lib/libregexp.a - 664 sys sys 1200262805 37414
 1200263452 29 c sys/man/1/games - 664 sys sys 1200263435 6166
+1200342605 0 c sys/src/9/pc/ether82563.c - 664 sys sys 1200342471 37076
+1200349803 0 c sys/src/9/pc/sdiahci.c - 664 sys sys 1200348596 38496
+1200349803 1 c sys/src/boot/pc/sdiahci.c - 664 sys sys 1200349145 28259

+ 11 - 4
sys/src/9/pc/ether82563.c

@@ -366,8 +366,8 @@ typedef struct {
 enum {
 	/* 16 and 32-bit flash registers for ich flash parts */
 	Bfpr	= 0x00/4,		/* flash base 0:12; lim 16:28 */
-	Fsts	= 0x04/2,		/* flash status; Hsfs */
-	Fctl	= 0x06/2,		/* flash control */
+	Fsts	= 0x04/2,		/* flash status;  Hsfsts */
+	Fctl	= 0x06/2,		/* flash control; Hsfctl */
 	Faddr	= 0x08/4,		/* flash address to r/w */
 	Fdata	= 0x10/4,		/* data @ address */
 
@@ -727,10 +727,17 @@ i82563multicast(void* arg, uchar* addr, int on)
 	if(ctlr->type == i82566)
 		x &= 31;
 	bit = ((addr[5] & 1)<<4)|(addr[4]>>4);
+	/*
+	 * multiple ether addresses can hash to the same filter bit,
+	 * so it's never safe to clear a filter bit.
+	 * if we want to clear filter bits, we need to keep track of
+	 * all the multicast addresses in use, clear all the filter bits,
+	 * then set the ones corresponding to in-use addresses.
+	 */
 	if(on)
 		ctlr->mta[x] |= 1<<bit;
-	else
-		ctlr->mta[x] &= ~(1<<bit);
+//	else
+//		ctlr->mta[x] &= ~(1<<bit);
 
 	csr32w(ctlr, Mta+x*4, ctlr->mta[x]);
 }

+ 3 - 2
sys/src/9/pc/sdiahci.c

@@ -1841,10 +1841,11 @@ iapnp(void)
 	head = tail = nil;
 loop:
 	while((p = pcimatch(p, 0, 0)) != nil){
+		/* 0x27c4 is the intel 82801 in compatibility (not sata) mode */
 		if(p->vid == 0x8086 && (p->did & 0xfffc) == 0x2680)
 			type = Tesb;
-		else if(p->vid == 0x8086 && (p->did & 0xfffe) == 0x27c4)
-			type = Tich;		/* 82801g[bh]m */
+		else if(p->vid == 0x8086 && p->did == 0x27c5)
+			type = Tich;	/* 82801g[bh]m; compat mode fails */
 		else if(p->vid == 0x1002 && p->did == 0x4380)
 			type = Tsb600;
 		else

+ 10 - 4
sys/src/boot/pc/sdiahci.c

@@ -1538,8 +1538,8 @@ loop:
 	while((p = pcimatch(p, 0, 0)) != nil){
 		if(p->vid == 0x8086 && (p->did & 0xfffc) == 0x2680)
 			type = Tesb;
-		else if(p->vid == 0x8086 && (p->did & 0xfffe) == 0x27c4)
-			type = Tich;		/* 82801g[bh]m */
+		else if(p->vid == 0x8086 && p->did == 0x27c5)
+			type = Tich;	/* 82801g[bh]m; compat mode fails */
 		else if(p->vid == 0x8086 && (p->did & 0xfeff) == 0x2829)
 			type = Tich;		/* ich8 */
 		else if(p->vid == 0x8086 && (p->did & 0xfffe) == 0x2922)
@@ -1549,7 +1549,7 @@ loop:
 		else
 			continue;
 		if(niactlr == NCtlr){
-			print("%spnp: too many controllers\n", tname[type]);
+			print("iapnp: %s: too many controllers\n", tname[type]);
 			break;
 		}
 		c = iactlr + niactlr;
@@ -1561,10 +1561,16 @@ loop:
 		io = p->mem[Abar].bar & ~0xf;
 		io = upamalloc(io, p->mem[Abar].size, 0);
 		if(io == 0){
-			print("%s: address %#lux in use did=%x\n",
+			print("%s: address %#lux in use, did %#ux\n",
 				tname[c->type], io, p->did);
 			continue;
 		}
+		/* ugly hack: get this in compatibility mode; see memory.c:271 */
+		if(io == 0x40000000) {
+			print("%s: did %#ux is in non-sata mode.  bar %#lux\n",
+				tname[c->type], p->did, p->mem[Abar].bar);
+			continue;
+		}
 		c->mmio = KADDR(io);
 		c->lmmio = (ulong*)c->mmio;
 		if(Intel(c->type) && p->did != 0x2681)