Browse Source

Plan 9 from Bell Labs 2008-10-25

David du Colombier 12 years ago
parent
commit
563e8a022b

+ 7 - 4
dist/replica/_plan9.db

@@ -8169,7 +8169,7 @@ sys/src/9/pc/memory.c - 664 sys sys 1196193039 18878
 sys/src/9/pc/mkfile - 664 sys sys 1204231465 4152
 sys/src/9/pc/mmu.c - 664 sys sys 1218342291 24548
 sys/src/9/pc/mouse.c - 664 sys sys 1203981356 7190
-sys/src/9/pc/mp.c - 664 sys sys 1220676659 17394
+sys/src/9/pc/mp.c - 664 sys sys 1224884202 17683
 sys/src/9/pc/mp.h - 664 sys sys 1173288116 6799
 sys/src/9/pc/nv_dma.h - 664 sys sys 1081384508 12943
 sys/src/9/pc/pc - 664 sys sys 1204231598 1551
@@ -8181,7 +8181,7 @@ sys/src/9/pc/pcdisk - 664 sys sys 1204231795 1623
 sys/src/9/pc/pcf - 664 sys sys 1215977995 1675
 sys/src/9/pc/pcfl - 664 sys sys 1188582378 1579
 sys/src/9/pc/pcflop - 664 sys sys 1190853787 1540
-sys/src/9/pc/pci.c - 664 sys sys 1224095629 29548
+sys/src/9/pc/pci.c - 664 sys sys 1224884207 29606
 sys/src/9/pc/pcmciamodem.c - 664 sys sys 1191476436 1591
 sys/src/9/pc/pcmkfile - 664 sys sys 1109303822 101
 sys/src/9/pc/piix4smbus.c - 664 sys sys 1184467714 5324
@@ -10435,7 +10435,7 @@ sys/src/cmd/fossil/Ccli.c - 664 sys sys 1042005504 1624
 sys/src/cmd/fossil/Ccmd.c - 664 sys sys 1138465941 7985
 sys/src/cmd/fossil/Ccons.c - 664 sys sys 1224094773 6725
 sys/src/cmd/fossil/Clog.c - 664 sys sys 1189638175 665
-sys/src/cmd/fossil/archive.c - 664 sys sys 1087005594 10230
+sys/src/cmd/fossil/archive.c - 664 sys sys 1224884072 10234
 sys/src/cmd/fossil/build - 664 sys sys 1042005505 449
 sys/src/cmd/fossil/buildsh - 775 sys sys 1042005505 561
 sys/src/cmd/fossil/bwatch.c - 664 sys sys 1042005505 6754
@@ -12640,7 +12640,7 @@ sys/src/cmd/ip/snoopy/ttls.c - 664 sys sys 1128179540 1451
 sys/src/cmd/ip/snoopy/udp.c - 664 sys sys 1144955685 2015
 sys/src/cmd/ip/telnet.c - 664 sys sys 1162416789 8621
 sys/src/cmd/ip/telnet.h - 664 sys sys 1015090250 5902
-sys/src/cmd/ip/telnetd.c - 664 sys sys 1135487948 11772
+sys/src/cmd/ip/telnetd.c - 664 sys sys 1224859336 11772
 sys/src/cmd/ip/tftpd.c - 664 sys sys 1222641404 8147
 sys/src/cmd/ip/traceroute.c - 664 sys sys 1198186109 8747
 sys/src/cmd/ip/udpecho.c - 664 sys sys 1178483004 789
@@ -15886,3 +15886,6 @@ 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 1020896385 0
+386/bin/fossil/flchk - 775 sys sys 1224904197 238953
+386/bin/fossil/flfmt - 775 sys sys 1224904197 246950
+386/bin/fossil/fossil - 775 sys sys 1224904198 370414

+ 7 - 7
dist/replica/plan9.db

@@ -240,9 +240,9 @@
 386/bin/fortune - 775 sys sys 1209614281 67297
 386/bin/fossil - 20000000775 sys sys 1087009456 0
 386/bin/fossil/conf - 775 sys sys 1085077052 1506
-386/bin/fossil/flchk - 775 sys sys 1224558578 238953
-386/bin/fossil/flfmt - 775 sys sys 1224558578 246950
-386/bin/fossil/fossil - 775 sys sys 1224558578 370414
+386/bin/fossil/flchk - 775 sys sys 1224904197 238953
+386/bin/fossil/flfmt - 775 sys sys 1224904197 246950
+386/bin/fossil/fossil - 775 sys sys 1224904198 370414
 386/bin/fossil/last - 775 sys sys 1168402310 63550
 386/bin/freq - 775 sys sys 1209614292 61981
 386/bin/fs - 20000000775 sys sys 1097900278 0
@@ -8169,7 +8169,7 @@ sys/src/9/pc/memory.c - 664 sys sys 1196193039 18878
 sys/src/9/pc/mkfile - 664 sys sys 1204231465 4152
 sys/src/9/pc/mmu.c - 664 sys sys 1218342291 24548
 sys/src/9/pc/mouse.c - 664 sys sys 1203981356 7190
-sys/src/9/pc/mp.c - 664 sys sys 1220676659 17394
+sys/src/9/pc/mp.c - 664 sys sys 1224884202 17683
 sys/src/9/pc/mp.h - 664 sys sys 1173288116 6799
 sys/src/9/pc/nv_dma.h - 664 sys sys 1081384508 12943
 sys/src/9/pc/pc - 664 sys sys 1204231598 1551
@@ -8181,7 +8181,7 @@ sys/src/9/pc/pcdisk - 664 sys sys 1204231795 1623
 sys/src/9/pc/pcf - 664 sys sys 1215977995 1675
 sys/src/9/pc/pcfl - 664 sys sys 1188582378 1579
 sys/src/9/pc/pcflop - 664 sys sys 1190853787 1540
-sys/src/9/pc/pci.c - 664 sys sys 1224095629 29548
+sys/src/9/pc/pci.c - 664 sys sys 1224884207 29606
 sys/src/9/pc/pcmciamodem.c - 664 sys sys 1191476436 1591
 sys/src/9/pc/pcmkfile - 664 sys sys 1109303822 101
 sys/src/9/pc/piix4smbus.c - 664 sys sys 1184467714 5324
@@ -10435,7 +10435,7 @@ sys/src/cmd/fossil/Ccli.c - 664 sys sys 1042005504 1624
 sys/src/cmd/fossil/Ccmd.c - 664 sys sys 1138465941 7985
 sys/src/cmd/fossil/Ccons.c - 664 sys sys 1224094773 6725
 sys/src/cmd/fossil/Clog.c - 664 sys sys 1189638175 665
-sys/src/cmd/fossil/archive.c - 664 sys sys 1087005594 10230
+sys/src/cmd/fossil/archive.c - 664 sys sys 1224884072 10234
 sys/src/cmd/fossil/build - 664 sys sys 1042005505 449
 sys/src/cmd/fossil/buildsh - 775 sys sys 1042005505 561
 sys/src/cmd/fossil/bwatch.c - 664 sys sys 1042005505 6754
@@ -12640,7 +12640,7 @@ sys/src/cmd/ip/snoopy/ttls.c - 664 sys sys 1128179540 1451
 sys/src/cmd/ip/snoopy/udp.c - 664 sys sys 1144955685 2015
 sys/src/cmd/ip/telnet.c - 664 sys sys 1162416789 8621
 sys/src/cmd/ip/telnet.h - 664 sys sys 1015090250 5902
-sys/src/cmd/ip/telnetd.c - 664 sys sys 1135487948 11772
+sys/src/cmd/ip/telnetd.c - 664 sys sys 1224859336 11772
 sys/src/cmd/ip/tftpd.c - 664 sys sys 1222641404 8147
 sys/src/cmd/ip/traceroute.c - 664 sys sys 1198186109 8747
 sys/src/cmd/ip/udpecho.c - 664 sys sys 1178483004 789

+ 7 - 0
dist/replica/plan9.log

@@ -36231,3 +36231,10 @@
 1224559803 20 c 386/bin/fossil/fossil - 775 sys sys 1224558578 370414
 1224594004 0 c sys/games/lib/fortunes - 664 sys sys 1224592899 270873
 1224615604 0 c rc/bin/pci - 775 sys sys 1224614984 933
+1224860405 0 c sys/src/cmd/ip/telnetd.c - 664 sys sys 1224859336 11772
+1224885605 0 c sys/src/9/pc/mp.c - 664 sys sys 1224884202 17683
+1224885605 1 c sys/src/9/pc/pci.c - 664 sys sys 1224884207 29606
+1224885605 2 c sys/src/cmd/fossil/archive.c - 664 sys sys 1224884072 10234
+1224905403 0 c 386/bin/fossil/flchk - 775 sys sys 1224904197 238953
+1224905403 1 c 386/bin/fossil/flfmt - 775 sys sys 1224904197 246950
+1224905403 2 c 386/bin/fossil/fossil - 775 sys sys 1224904198 370414

+ 14 - 5
sys/src/9/pc/mp.c

@@ -666,6 +666,7 @@ mpintrenablex(Vctl* v, int tbdf)
 		 */
 		apic = aintr->apic;
 		ioapicrdtr(apic, aintr->intr->intin, 0, &lo);
+
 		if(!(lo & ApicIMASK)){
 			vno = lo & 0xFF;
 			n = mpintrinit(bus, aintr->intr, vno, v->irq);
@@ -809,17 +810,25 @@ mpshutdown(void)
 	 */
 	lapicicrw(0, 0x000C0000|ApicINIT);
 
-#ifdef notdef
+	pcireset();
+	i8042reset();
+
 	/*
 	 * Often the BIOS hangs during restart if a conventional 8042
 	 * warm-boot sequence is tried. The following is Intel specific and
 	 * seems to perform a cold-boot, but at least it comes back.
+	 * And sometimes there is no keyboard...
+	 *
+	 * The reset register (0xcf9) is usually in one of the bridge
+	 * chips. The actual location and sequence could be extracted from
+	 * ACPI but why bother, this is the end of the line anyway.
 	 */
+	print("no kbd; trying bios warm boot...");
 	*(ushort*)KADDR(0x472) = 0x1234;	/* BIOS warm-boot flag */
 	outb(0xCF9, 0x02);
 	outb(0xCF9, 0x06);
-#else
-	pcireset();
-	i8042reset();
-#endif /* notdef */
+
+	print("can't reset\n");
+	for(;;)
+		idle();
 }

+ 1 - 0
sys/src/9/pc/pci.c

@@ -646,6 +646,7 @@ static Bridge southbridges[] = {
 	{ 0x8086, 0x2640, pIIxget, pIIxset },	/* Intel 82801FB */
 	{ 0x8086, 0x27b8, pIIxget, pIIxset },	/* Intel 82801GB */
 	{ 0x8086, 0x27b9, pIIxget, pIIxset },	/* Intel 82801GBM */
+	{ 0x8086, 0x2916, pIIxget, pIIxset },	/* Intel 82801? */
 	{ 0x1106, 0x0586, viaget, viaset },	/* Viatech 82C586 */
 	{ 0x1106, 0x0596, viaget, viaset },	/* Viatech 82C596 */
 	{ 0x1106, 0x0686, viaget, viaset },	/* Viatech 82C686 */

+ 2 - 2
sys/src/cmd/fossil/archive.c

@@ -357,7 +357,7 @@ archThread(void *v)
 		b = superGet(a->c, &super);
 		if(b == nil){
 			vtUnlock(a->fs->elk);
-			fprint(2, "archThread: superGet: %R");
+			fprint(2, "archThread: superGet: %R\n");
 			sleep(60*1000);
 			continue;
 		}
@@ -433,7 +433,7 @@ sleep(10*1000);	/* window of opportunity to provoke races */
 		b = superGet(a->c, &super);
 		if(b == nil){
 			vtUnlock(a->fs->elk);
-			fprint(2, "archThread: superGet: %R");
+			fprint(2, "archThread: superGet: %R\n");
 			sleep(60*1000);
 			continue;
 		}

+ 1 - 1
sys/src/cmd/ip/telnetd.c

@@ -334,7 +334,7 @@ fromchild(char *bp, int len)
  *	^H erases the last character buffered.
  *	^U kills the whole line buffered.
  *	^W erases the last word
- *	^D causes a 0-lenght line to be returned.
+ *	^D causes a 0-length line to be returned.
  *	Intr causes an "interrupt" note to be sent to the children.
  */
 #define ECHO(c) { *ebp++ = (c); }