Browse Source

Plan 9 from Bell Labs 2003-12-17

David du Colombier 20 years ago
parent
commit
ae2acfe052
6 changed files with 41 additions and 23 deletions
  1. 5 4
      dist/replica/plan9.db
  2. 5 0
      dist/replica/plan9.log
  3. 1 0
      rc/bin/window
  4. 1 0
      sys/lib/mimetype
  5. 12 10
      sys/src/9/pc/sdata.c
  6. 17 9
      sys/src/boot/pc/sdata.c

+ 5 - 4
dist/replica/plan9.db

@@ -3098,7 +3098,7 @@ rc/bin/wdoc2txt - 755 sys sys 1017431153 277
 rc/bin/weather - 775 sys sys 1016825765 795
 rc/bin/who - 775 sys sys 945617210 61
 rc/bin/whois - 775 sys sys 945617210 189
-rc/bin/window - 775 sys sys 1045504108 1742
+rc/bin/window - 775 sys sys 1071573331 1781
 rc/bin/wloc - 775 sys sys 969512017 191
 rc/bin/wurl2txt - 755 sys sys 1017431148 296
 rc/bin/yesterday - 775 sys sys 1070288432 2541
@@ -3876,6 +3876,7 @@ sys/lib/lp/kill/generic - 775 sys sys 954037458 638
 sys/lib/lp/kill/xerox - 775 sys sys 954037458 89
 sys/lib/lp/kill/xerox-4512 - 775 sys sys 954037458 75
 sys/lib/lp/kill/xerox-4517 - 775 sys sys 954037458 75
+sys/lib/lp/log - 20000000775 sys sys 1071620128 0
 sys/lib/lp/perm - 20000000775 sys sys 954037458 0
 sys/lib/lp/process - 20000000775 sys sys 1015012169 0
 sys/lib/lp/process/dpost - 775 sys sys 1015012079 2412
@@ -3948,7 +3949,7 @@ sys/lib/man/preface4 - 664 sys sys 1020082276 1758
 sys/lib/man/secindex - 775 sys sys 956337727 322
 sys/lib/man/title - 664 sys sys 1019915894 746
 sys/lib/man/trademarks - 664 sys sys 958527089 1838
-sys/lib/mimetype - 664 sys sys 1064393944 5563
+sys/lib/mimetype - 664 sys sys 1071573310 5589
 sys/lib/newuser - 775 sys sys 1018386991 1229
 sys/lib/plumb - 20000000775 sys sys 944957365 0
 sys/lib/plumb/basic - 664 sys sys 1070330856 2930
@@ -5347,7 +5348,7 @@ sys/src/9/pc/screen.h - 664 sys sys 1060267144 3797
 sys/src/9/pc/sd53c8xx.c - 664 sys sys 1055689891 52089
 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 1071247345 50401
+sys/src/9/pc/sdata.c - 664 sys sys 1071615236 50538
 sys/src/9/pc/sdmylex.c - 664 sys sys 1071245460 27812
 sys/src/9/pc/sdscsi.c - 664 sys sys 1055689892 7406
 sys/src/9/pc/trap.c - 664 sys sys 1068237910 20045
@@ -6473,7 +6474,7 @@ sys/src/boot/pc/queue.c - 664 sys sys 1015007954 566
 sys/src/boot/pc/sd.h - 664 sys sys 1032215925 2404
 sys/src/boot/pc/sd53c8xx.c - 664 sys sys 1015007954 52004
 sys/src/boot/pc/sd53c8xx.i - 664 sys sys 1015007955 27245
-sys/src/boot/pc/sdata.c - 664 sys sys 1068156754 35084
+sys/src/boot/pc/sdata.c - 664 sys sys 1071615664 35424
 sys/src/boot/pc/sdmylex.c - 664 sys sys 1015007955 28743
 sys/src/boot/pc/sdscsi.c - 664 sys sys 1018553454 6680
 sys/src/boot/pc/trap.c - 664 sys sys 1018462833 7098

+ 5 - 0
dist/replica/plan9.log

@@ -13143,3 +13143,8 @@
 1071536469 0 c sys/include/keyboard.h - 664 sys sys 1071535972 802
 1071538269 0 a sys/lib/lp/tmp - 20000000777 sys sys 1071536829 0
 1071540069 0 c sys/lib/lp/bin/lpscratch - 775 sys sys 1071539623 32
+1071574274 0 c rc/bin/window - 775 sys sys 1071573331 1781
+1071574274 1 c sys/lib/mimetype - 664 sys sys 1071573310 5589
+1071615680 0 c sys/src/9/pc/sdata.c - 664 sys sys 1071615236 50538
+1071615680 1 c sys/src/boot/pc/sdata.c - 664 sys sys 1071615664 35424
+1071621080 0 a sys/lib/lp/log - 20000000775 sys sys 1071620128 0

+ 1 - 0
rc/bin/window

@@ -71,6 +71,7 @@ if(~ $1 -m){
 	srv = $wsys
 	rfork ne
 	{
+		unmount /mnt/acme /dev >[2]/dev/null
 		if(mount $srv $dir 'new -pid '^`{cat /dev/ppid}^' '$"*){
 			bind -b $dir /dev
 			# toss geometry parameters to find command

+ 1 - 0
sys/lib/mimetype

@@ -51,6 +51,7 @@
 .hqx		application	octet-stream	-		m # Mac BinHex
 .htm		text		html		-		m
 .html		text		html		-		m
+.ico		image		x-icon		-		y
 .ief		image		ief		-		y
 .jar		application	java-archive -		y
 .jfif		image		jpeg		-		y

+ 12 - 10
sys/src/9/pc/sdata.c

@@ -12,13 +12,14 @@
 extern SDifc sdataifc;
 
 enum {
-	DbgCONFIG	= 0x01,		/* detected drive config info */
-	DbgIDENTIFY	= 0x02,		/* detected drive identify info */
-	DbgSTATE	= 0x04,		/* dump state on panic */
-	DbgPROBE	= 0x08,		/* trace device probing */
-	DbgDEBUG	= 0x80,		/* the current problem... */
-	DbgINL		= 0x100,	/* That Inil20+ message we hate */
-	Dbg48BIT	= 0x200,	/* 48-bit LBA */
+	DbgCONFIG	= 0x0001,	/* detected drive config info */
+	DbgIDENTIFY	= 0x0002,	/* detected drive identify info */
+	DbgSTATE	= 0x0004,	/* dump state on panic */
+	DbgPROBE	= 0x0008,	/* trace device probing */
+	DbgDEBUG	= 0x0080,	/* the current problem... */
+	DbgINL		= 0x0100,	/* That Inil20+ message we hate */
+	Dbg48BIT	= 0x0200,	/* 48-bit LBA */
+	DbgBsy		= 0x0400,	/* interrupt but Bsy (shared IRQ) */
 };
 #define DEBUG		(DbgDEBUG|DbgSTATE)
 
@@ -555,7 +556,7 @@ atadmamode(Drive* drive)
 	dma = drive->info[Imwdma] & 0x0707;
 	drive->dma = (dma>>8) & dma;
 	if(drive->dma == 0 && (drive->info[Ivalid] & 0x04)){
-		dma = drive->info[Iudma] & 0x3F3F;
+		dma = drive->info[Iudma] & 0x7F7F;
 		drive->dma = (dma>>8) & dma;
 		if(drive->dma)
 			drive->dma |= 'U'<<16;
@@ -1699,7 +1700,7 @@ atainterrupt(Ureg*, void* arg)
 	ilock(ctlr);
 	if(inb(ctlr->ctlport+As) & Bsy){
 		iunlock(ctlr);
-		if(DEBUG & DbgDEBUG)
+		if(DEBUG & DbgBsy)
 			print("IBsy+");
 		return;
 	}
@@ -1820,6 +1821,7 @@ atapnp(void)
 		 *    the only controller or not;
 		 * 2) put 0 in the programming interface byte (probably
 		 *    as a consequence of 1) above).
+		 * Sub-class code 0x04 is 'RAID controller', e.g. VIA VT8237.
 		 */
 		if(p->ccrb != 0x01)
 			continue;
@@ -1854,7 +1856,7 @@ atapnp(void)
 		case (0x4D30<<16)|0x105A:	/* Promise PDC202xx */
 		case (0x4D68<<16)|0x105A:	/* Promise PDC20268 */
 		case (0x3373<<16)|0x105A:	/* Promise 20378 RAID */
-		case (0x3149<<16)|0x1106:	/* VIA 8237 */
+		case (0x3149<<16)|0x1106:	/* VIA VT8237 SATA/RAID */
 			pi = 0x85;
 			break;
 		case (0x0004<<16)|0x1103:	/* HighPoint HPT-370 */

+ 17 - 9
sys/src/boot/pc/sdata.c

@@ -12,13 +12,16 @@
 extern SDifc sdataifc;
 
 enum {
-	DbgCONFIG	= 0x01,		/* detected drive config info */
-	DbgIDENTIFY	= 0x02,		/* detected drive identify info */
-	DbgSTATE	= 0x04,		/* dump state on panic */
-	DbgPROBE	= 0x08,		/* trace device probing */
-	DbgDEBUG	= 0x80,		/* the current problem... */
+	DbgCONFIG	= 0x0001,	/* detected drive config info */
+	DbgIDENTIFY	= 0x0002,	/* detected drive identify info */
+	DbgSTATE	= 0x0004,	/* dump state on panic */
+	DbgPROBE	= 0x0008,	/* trace device probing */
+	DbgDEBUG	= 0x0080,	/* the current problem... */
+	DbgINL		= 0x0100,	/* That Inil20+ message we hate */
+	Dbg48BIT	= 0x0200,	/* 48-bit LBA */
+	DbgBsy		= 0x0400,	/* interrupt but Bsy (shared IRQ) */
 };
-#define DEBUG		(DbgDEBUG/*|DbgPROBE*/|DbgCONFIG)
+#define DEBUG		(DbgDEBUG|DbgCONFIG)
 
 enum {					/* I/O ports */
 	Data		= 0,
@@ -1218,7 +1221,7 @@ atainterrupt(Ureg*, void* arg)
 	ilock(ctlr);
 	if(inb(ctlr->ctlport+As) & Bsy){
 		iunlock(ctlr);
-		if(DEBUG & DbgDEBUG)
+		if(DEBUG & DbgBsy)
 			print("IBsy+");
 		return;
 	}
@@ -1226,7 +1229,7 @@ atainterrupt(Ureg*, void* arg)
 	status = inb(cmdport+Status);
 	if((drive = ctlr->curdrive) == nil){
 		iunlock(ctlr);
-		if((DEBUG & DbgDEBUG) && ctlr->command != Cedd)
+		if((DEBUG & DbgINL) && ctlr->command != Cedd)
 			print("Inil%2.2uX+", ctlr->command);
 		return;
 	}
@@ -1335,8 +1338,11 @@ atapnp(void)
 		 *    the only controller or not;
 		 * 2) put 0 in the programming interface byte (probably
 		 *    as a consequence of 1) above).
+		 * Sub-class code 0x04 is 'RAID controller', e.g. VIA VT8237.
 		 */
-		if(p->ccrb != 0x01 || (p->ccru != 0x01 && p->ccru != 0x80))
+		if(p->ccrb != 0x01)
+			continue;
+		if(p->ccru != 0x01 && p->ccru != 0x04 && p->ccru != 0x80)
 			continue;
 		pi = p->ccrp;
 		ispc87415 = 0;
@@ -1366,6 +1372,8 @@ atapnp(void)
 		case (0x4D38<<16)|0x105A:	/* Promise PDC20262 */
 		case (0x4D30<<16)|0x105A:	/* Promise PDC202xx */
 		case (0x4D68<<16)|0x105A:	/* Promise PDC20268 */
+		case (0x3373<<16)|0x105A:	/* Promise 20378 RAID */
+		case (0x3149<<16)|0x1106:	/* VIA VT8237 SATA/RAID */
 			pi = 0x85;
 			break;
 		case (0x0004<<16)|0x1103:	/* HighPoint HPT-370 */