Browse Source

Plan 9 from Bell Labs 2008-05-29

David du Colombier 16 years ago
parent
commit
84c86a11fa

+ 31 - 31
dist/replica/_plan9.db

@@ -1,8 +1,8 @@
 386 - 20000000775 sys sys 1010957353 0
-386/9load - 775 sys sys 1211923361 340600
-386/9loaddebug - 775 sys sys 1211923364 454856
-386/9loadlite - 775 sys sys 1211923363 163376
-386/9loadlitedebug - 775 sys sys 1211923364 239871
+386/9load - 775 sys sys 1212010540 341552
+386/9loaddebug - 775 sys sys 1212010545 455911
+386/9loadlite - 775 sys sys 1212010543 164328
+386/9loadlitedebug - 775 sys sys 1212010546 240926
 386/9pc - 775 sys sys 1211924417 2130755
 386/9pc.gz - 664 sys sys 1211924417 912864
 386/9pccpu - 775 sys sys 1211924426 2245510
@@ -11,8 +11,8 @@
 386/9pcdisk.gz - 664 sys sys 1211924484 990096
 386/9pcf - 775 sys sys 1211924445 2991860
 386/9pcf.gz - 664 sys sys 1211924445 1273236
-386/9pxeload - 775 sys sys 1211923362 340604
-386/9pxeloaddebug - 775 sys sys 1211923363 454867
+386/9pxeload - 775 sys sys 1212010541 341556
+386/9pxeloaddebug - 775 sys sys 1212010542 455922
 386/bin - 20000000775 sys sys 1018897690 0
 386/bin/8a - 775 sys sys 1209614029 116545
 386/bin/8c - 775 sys sys 1209614036 367225
@@ -177,7 +177,7 @@
 386/bin/calendar - 775 sys sys 1209614208 79071
 386/bin/cat - 775 sys sys 1148500611 37482
 386/bin/cb - 775 sys sys 1209614209 77569
-386/bin/cdfs - 775 sys sys 1211916033 174926
+386/bin/cdfs - 775 sys sys 1211945690 174964
 386/bin/cec - 775 sys sys 1193714267 75896
 386/bin/cfs - 775 sys sys 1190863294 130565
 386/bin/chgrp - 775 sys sys 1168402294 59522
@@ -437,7 +437,7 @@
 386/bin/tee - 775 sys sys 1148500692 38463
 386/bin/telco - 775 sys sys 1178568305 102103
 386/bin/telnet - 775 sys sys 1209614645 80598
-386/bin/test - 775 sys sys 1178568306 68701
+386/bin/test - 775 sys sys 1212002706 68530
 386/bin/time - 775 sys sys 1168402352 61618
 386/bin/tlsclient - 775 sys sys 1210392981 199254
 386/bin/tlssrv - 775 sys sys 1210392984 199634
@@ -5855,7 +5855,7 @@ sys/games - 20000000775 sys sys 1117225532 0
 sys/games/lib - 20000000775 sys sys 1165337608 0
 sys/games/lib/4scores - 10000000666 sys sys 1118680448 0
 sys/games/lib/5scores - 10000000666 sys sys 1118680453 0
-sys/games/lib/fortunes - 664 sys sys 1208978371 269327
+sys/games/lib/fortunes - 664 sys sys 1211977446 269422
 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
@@ -7718,7 +7718,7 @@ sys/man/3/proc - 664 sys sys 1196638942 12062
 sys/man/3/root - 664 sys sys 1196638942 632
 sys/man/3/rtc - 664 sys sys 1196638942 667
 sys/man/3/sd - 664 sys sys 1196638942 5659
-sys/man/3/sdahci - 664 sys sys 1206923648 3212
+sys/man/3/sdahci - 664 sys sys 1212016122 3212
 sys/man/3/sdaoe - 664 sys sys 1196638942 1320
 sys/man/3/segment - 664 sys sys 1196638942 2378
 sys/man/3/srv - 664 sys sys 1196638942 1470
@@ -8190,7 +8190,7 @@ sys/src/9/pc/screen.h - 664 sys sys 1147023549 4256
 sys/src/9/pc/sd53c8xx.c - 664 sys sys 1211521147 55313
 sys/src/9/pc/sd53c8xx.n - 664 sys sys 1131290556 12657
 sys/src/9/pc/sdata.c - 664 sys sys 1211924368 53297
-sys/src/9/pc/sdiahci.c - 664 sys sys 1211924442 38699
+sys/src/9/pc/sdiahci.c - 664 sys sys 1212010154 38901
 sys/src/9/pc/sdmv50xx.c - 664 sys sys 1204232564 34031
 sys/src/9/pc/sdmylex.c - 664 sys sys 1189229947 28395
 sys/src/9/pc/sdscsi.c - 664 sys sys 1186618532 7957
@@ -9171,50 +9171,50 @@ sys/src/boot/bitsy/sinflate - 775 sys sys 1176753922 20696
 sys/src/boot/bitsy/uart.c - 664 sys sys 1173299930 1495
 sys/src/boot/mkfile - 664 sys sys 1173300033 192
 sys/src/boot/pc - 20000000775 sys sys 1144961189 0
-sys/src/boot/pc/8250.c - 664 sys sys 1015007947 5727
+sys/src/boot/pc/8250.c - 664 sys sys 1212010481 5725
 sys/src/boot/pc/ahci.h - 664 sys sys 1199911245 6283
 sys/src/boot/pc/alarm.c - 664 sys sys 1015007947 1668
 sys/src/boot/pc/aoe.h - 664 sys sys 1193336543 826
 sys/src/boot/pc/apm.c - 664 sys sys 1015007947 289
-sys/src/boot/pc/bcom.c - 664 sys sys 1194380248 6462
+sys/src/boot/pc/bcom.c - 664 sys sys 1212010473 6460
 sys/src/boot/pc/boot.c - 664 sys sys 1130887226 8421
 sys/src/boot/pc/bootld.c - 664 sys sys 1015007948 1801
 sys/src/boot/pc/bootp.c - 664 sys sys 1194650469 12624
 sys/src/boot/pc/cga.c - 664 sys sys 1015007948 1362
 sys/src/boot/pc/cis.c - 664 sys sys 1144961189 9232
-sys/src/boot/pc/clock.c - 664 sys sys 1194556585 6622
+sys/src/boot/pc/clock.c - 664 sys sys 1212010463 6825
 sys/src/boot/pc/conf.c - 664 sys sys 1094674484 10217
-sys/src/boot/pc/console.c - 664 sys sys 1094674483 3388
+sys/src/boot/pc/console.c - 664 sys sys 1212010517 3422
 sys/src/boot/pc/dat.h - 664 sys sys 1190921443 3637
-sys/src/boot/pc/devbios.c - 664 sys sys 1194145648 9346
+sys/src/boot/pc/devbios.c - 664 sys sys 1212010497 9431
 sys/src/boot/pc/devbios.h - 664 sys sys 1193167027 493
-sys/src/boot/pc/devfloppy.c - 664 sys sys 1210371813 15552
+sys/src/boot/pc/devfloppy.c - 664 sys sys 1212010456 15657
 sys/src/boot/pc/devfloppy.h - 664 sys sys 1032409559 4081
 sys/src/boot/pc/devi82365.c - 664 sys sys 1144961189 15051
 sys/src/boot/pc/devpccard.c - 664 sys sys 1153333456 33897
-sys/src/boot/pc/devsd.c - 664 sys sys 1200893250 11506
+sys/src/boot/pc/devsd.c - 664 sys sys 1212010316 11567
 sys/src/boot/pc/dma.c - 664 sys sys 1015007949 4972
-sys/src/boot/pc/dosboot.c - 664 sys sys 1097716791 11240
+sys/src/boot/pc/dosboot.c - 664 sys sys 1212010488 11337
 sys/src/boot/pc/dosfs.h - 664 sys sys 1032215924 1467
 sys/src/boot/pc/eoffs - 664 sys sys 1015007950 0
 sys/src/boot/pc/error.h - 664 sys sys 1015007950 3081
 sys/src/boot/pc/ether.c - 664 sys sys 1194025450 5440
 sys/src/boot/pc/ether2000.c - 664 sys sys 1015007950 2609
-sys/src/boot/pc/ether2114x.c - 664 sys sys 1144977462 38028
+sys/src/boot/pc/ether2114x.c - 664 sys sys 1212010443 38026
 sys/src/boot/pc/ether589.c - 664 sys sys 1144961189 4624
 sys/src/boot/pc/ether79c970.c - 664 sys sys 1015007950 11717
 sys/src/boot/pc/ether8003.c - 664 sys sys 1015007950 6446
 sys/src/boot/pc/ether8139.c - 664 sys sys 1121393459 14823
-sys/src/boot/pc/ether8169.c - 664 sys sys 1204324647 21870
-sys/src/boot/pc/ether82557.c - 664 sys sys 1211922647 19136
+sys/src/boot/pc/ether8169.c - 664 sys sys 1212010436 21868
+sys/src/boot/pc/ether82557.c - 664 sys sys 1212010428 19134
 sys/src/boot/pc/ether82563.c - 664 sys sys 1209184829 26037
 sys/src/boot/pc/ether83815.c - 664 sys sys 1144961190 21993
-sys/src/boot/pc/ether8390.c - 664 sys sys 1112382847 16209
+sys/src/boot/pc/ether8390.c - 664 sys sys 1212010420 16207
 sys/src/boot/pc/ether8390.h - 664 sys sys 1015007951 1392
 sys/src/boot/pc/etherdp83820.c - 664 sys sys 1190221155 28740
 sys/src/boot/pc/etherec2t.c - 664 sys sys 1015007951 3598
-sys/src/boot/pc/etherelnk3.c - 664 sys sys 1158012439 44736
-sys/src/boot/pc/etherelnk3x.c - 664 sys sys 1015007951 24989
+sys/src/boot/pc/etherelnk3.c - 664 sys sys 1212010412 44734
+sys/src/boot/pc/etherelnk3x.c - 664 sys sys 1212010405 24987
 sys/src/boot/pc/etherga620.c - 664 sys sys 1175289484 27168
 sys/src/boot/pc/etherga620fw.h - 664 sys sys 1174080072 222295
 sys/src/boot/pc/etherif.h - 664 sys sys 1174077279 1338
@@ -9234,10 +9234,10 @@ sys/src/boot/pc/kfs.h - 664 sys sys 1032215924 861
 sys/src/boot/pc/kfsboot.c - 664 sys sys 1032215914 4788
 sys/src/boot/pc/l.s - 664 sys sys 1193167045 18213
 sys/src/boot/pc/lib.h - 664 sys sys 1200893244 2925
-sys/src/boot/pc/load.c - 664 sys sys 1194649778 10526
+sys/src/boot/pc/load.c - 664 sys sys 1212010219 10578
 sys/src/boot/pc/mbr.s - 664 sys sys 1015007953 6234
 sys/src/boot/pc/mem.h - 664 sys sys 1190921475 3437
-sys/src/boot/pc/memory.c - 664 sys sys 1019533021 10272
+sys/src/boot/pc/memory.c - 664 sys sys 1212010326 10266
 sys/src/boot/pc/mkfile - 664 sys sys 1193359312 3224
 sys/src/boot/pc/noether.c - 664 sys sys 1193336537 416
 sys/src/boot/pc/part.c - 664 sys sys 1200690166 7158
@@ -9252,9 +9252,9 @@ sys/src/boot/pc/sd.h - 664 sys sys 1200690169 2249
 sys/src/boot/pc/sd53c8xx.c - 664 sys sys 1186031515 52082
 sys/src/boot/pc/sd53c8xx.i - 664 sys sys 1015007955 27245
 sys/src/boot/pc/sdaoe.c - 664 sys sys 1204324647 11381
-sys/src/boot/pc/sdata.c - 664 sys sys 1211924337 39003
-sys/src/boot/pc/sdbios.c - 664 sys sys 1194145651 3282
-sys/src/boot/pc/sdiahci.c - 664 sys sys 1211924350 28355
+sys/src/boot/pc/sdata.c - 664 sys sys 1212010306 39146
+sys/src/boot/pc/sdbios.c - 664 sys sys 1212010334 3280
+sys/src/boot/pc/sdiahci.c - 664 sys sys 1212010293 28716
 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
@@ -13615,7 +13615,7 @@ sys/src/cmd/telco/mkfile - 664 sys sys 944961290 201
 sys/src/cmd/telco/telco.c - 664 sys sys 1021579996 26253
 sys/src/cmd/telco/telcodata - 775 sys sys 944961290 95
 sys/src/cmd/telco/telcofax - 664 sys sys 944961289 30
-sys/src/cmd/test.c - 664 sys sys 1211912897 5681
+sys/src/cmd/test.c - 664 sys sys 1211997263 5784
 sys/src/cmd/time.c - 664 sys sys 1014926662 1546
 sys/src/cmd/tlsclient.c - 664 sys sys 1024375149 1631
 sys/src/cmd/tlssrv.c - 664 sys sys 1161442158 3480

+ 31 - 31
dist/replica/plan9.db

@@ -1,8 +1,8 @@
 386 - 20000000775 sys sys 1010957353 0
-386/9load - 775 sys sys 1211923361 340600
-386/9loaddebug - 775 sys sys 1211923364 454856
-386/9loadlite - 775 sys sys 1211923363 163376
-386/9loadlitedebug - 775 sys sys 1211923364 239871
+386/9load - 775 sys sys 1212010540 341552
+386/9loaddebug - 775 sys sys 1212010545 455911
+386/9loadlite - 775 sys sys 1212010543 164328
+386/9loadlitedebug - 775 sys sys 1212010546 240926
 386/9pc - 775 sys sys 1211924417 2130755
 386/9pc.gz - 664 sys sys 1211924417 912864
 386/9pccpu - 775 sys sys 1211924426 2245510
@@ -11,8 +11,8 @@
 386/9pcdisk.gz - 664 sys sys 1211924484 990096
 386/9pcf - 775 sys sys 1211924445 2991860
 386/9pcf.gz - 664 sys sys 1211924445 1273236
-386/9pxeload - 775 sys sys 1211923362 340604
-386/9pxeloaddebug - 775 sys sys 1211923363 454867
+386/9pxeload - 775 sys sys 1212010541 341556
+386/9pxeloaddebug - 775 sys sys 1212010542 455922
 386/bin - 20000000775 sys sys 1018897690 0
 386/bin/8a - 775 sys sys 1209614029 116545
 386/bin/8c - 775 sys sys 1209614036 367225
@@ -177,7 +177,7 @@
 386/bin/calendar - 775 sys sys 1209614208 79071
 386/bin/cat - 775 sys sys 1148500611 37482
 386/bin/cb - 775 sys sys 1209614209 77569
-386/bin/cdfs - 775 sys sys 1211916033 174926
+386/bin/cdfs - 775 sys sys 1211945690 174964
 386/bin/cec - 775 sys sys 1193714267 75896
 386/bin/cfs - 775 sys sys 1190863294 130565
 386/bin/chgrp - 775 sys sys 1168402294 59522
@@ -437,7 +437,7 @@
 386/bin/tee - 775 sys sys 1148500692 38463
 386/bin/telco - 775 sys sys 1178568305 102103
 386/bin/telnet - 775 sys sys 1209614645 80598
-386/bin/test - 775 sys sys 1178568306 68701
+386/bin/test - 775 sys sys 1212002706 68530
 386/bin/time - 775 sys sys 1168402352 61618
 386/bin/tlsclient - 775 sys sys 1210392981 199254
 386/bin/tlssrv - 775 sys sys 1210392984 199634
@@ -5855,7 +5855,7 @@ sys/games - 20000000775 sys sys 1117225532 0
 sys/games/lib - 20000000775 sys sys 1165337608 0
 sys/games/lib/4scores - 10000000666 sys sys 1118680448 0
 sys/games/lib/5scores - 10000000666 sys sys 1118680453 0
-sys/games/lib/fortunes - 664 sys sys 1208978371 269327
+sys/games/lib/fortunes - 664 sys sys 1211977446 269422
 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
@@ -7718,7 +7718,7 @@ sys/man/3/proc - 664 sys sys 1196638942 12062
 sys/man/3/root - 664 sys sys 1196638942 632
 sys/man/3/rtc - 664 sys sys 1196638942 667
 sys/man/3/sd - 664 sys sys 1196638942 5659
-sys/man/3/sdahci - 664 sys sys 1206923648 3212
+sys/man/3/sdahci - 664 sys sys 1212016122 3212
 sys/man/3/sdaoe - 664 sys sys 1196638942 1320
 sys/man/3/segment - 664 sys sys 1196638942 2378
 sys/man/3/srv - 664 sys sys 1196638942 1470
@@ -8190,7 +8190,7 @@ sys/src/9/pc/screen.h - 664 sys sys 1147023549 4256
 sys/src/9/pc/sd53c8xx.c - 664 sys sys 1211521147 55313
 sys/src/9/pc/sd53c8xx.n - 664 sys sys 1131290556 12657
 sys/src/9/pc/sdata.c - 664 sys sys 1211924368 53297
-sys/src/9/pc/sdiahci.c - 664 sys sys 1211924442 38699
+sys/src/9/pc/sdiahci.c - 664 sys sys 1212010154 38901
 sys/src/9/pc/sdmv50xx.c - 664 sys sys 1204232564 34031
 sys/src/9/pc/sdmylex.c - 664 sys sys 1189229947 28395
 sys/src/9/pc/sdscsi.c - 664 sys sys 1186618532 7957
@@ -9171,50 +9171,50 @@ sys/src/boot/bitsy/sinflate - 775 sys sys 1176753922 20696
 sys/src/boot/bitsy/uart.c - 664 sys sys 1173299930 1495
 sys/src/boot/mkfile - 664 sys sys 1173300033 192
 sys/src/boot/pc - 20000000775 sys sys 1144961189 0
-sys/src/boot/pc/8250.c - 664 sys sys 1015007947 5727
+sys/src/boot/pc/8250.c - 664 sys sys 1212010481 5725
 sys/src/boot/pc/ahci.h - 664 sys sys 1199911245 6283
 sys/src/boot/pc/alarm.c - 664 sys sys 1015007947 1668
 sys/src/boot/pc/aoe.h - 664 sys sys 1193336543 826
 sys/src/boot/pc/apm.c - 664 sys sys 1015007947 289
-sys/src/boot/pc/bcom.c - 664 sys sys 1194380248 6462
+sys/src/boot/pc/bcom.c - 664 sys sys 1212010473 6460
 sys/src/boot/pc/boot.c - 664 sys sys 1130887226 8421
 sys/src/boot/pc/bootld.c - 664 sys sys 1015007948 1801
 sys/src/boot/pc/bootp.c - 664 sys sys 1194650469 12624
 sys/src/boot/pc/cga.c - 664 sys sys 1015007948 1362
 sys/src/boot/pc/cis.c - 664 sys sys 1144961189 9232
-sys/src/boot/pc/clock.c - 664 sys sys 1194556585 6622
+sys/src/boot/pc/clock.c - 664 sys sys 1212010463 6825
 sys/src/boot/pc/conf.c - 664 sys sys 1094674484 10217
-sys/src/boot/pc/console.c - 664 sys sys 1094674483 3388
+sys/src/boot/pc/console.c - 664 sys sys 1212010517 3422
 sys/src/boot/pc/dat.h - 664 sys sys 1190921443 3637
-sys/src/boot/pc/devbios.c - 664 sys sys 1194145648 9346
+sys/src/boot/pc/devbios.c - 664 sys sys 1212010497 9431
 sys/src/boot/pc/devbios.h - 664 sys sys 1193167027 493
-sys/src/boot/pc/devfloppy.c - 664 sys sys 1210371813 15552
+sys/src/boot/pc/devfloppy.c - 664 sys sys 1212010456 15657
 sys/src/boot/pc/devfloppy.h - 664 sys sys 1032409559 4081
 sys/src/boot/pc/devi82365.c - 664 sys sys 1144961189 15051
 sys/src/boot/pc/devpccard.c - 664 sys sys 1153333456 33897
-sys/src/boot/pc/devsd.c - 664 sys sys 1200893250 11506
+sys/src/boot/pc/devsd.c - 664 sys sys 1212010316 11567
 sys/src/boot/pc/dma.c - 664 sys sys 1015007949 4972
-sys/src/boot/pc/dosboot.c - 664 sys sys 1097716791 11240
+sys/src/boot/pc/dosboot.c - 664 sys sys 1212010488 11337
 sys/src/boot/pc/dosfs.h - 664 sys sys 1032215924 1467
 sys/src/boot/pc/eoffs - 664 sys sys 1015007950 0
 sys/src/boot/pc/error.h - 664 sys sys 1015007950 3081
 sys/src/boot/pc/ether.c - 664 sys sys 1194025450 5440
 sys/src/boot/pc/ether2000.c - 664 sys sys 1015007950 2609
-sys/src/boot/pc/ether2114x.c - 664 sys sys 1144977462 38028
+sys/src/boot/pc/ether2114x.c - 664 sys sys 1212010443 38026
 sys/src/boot/pc/ether589.c - 664 sys sys 1144961189 4624
 sys/src/boot/pc/ether79c970.c - 664 sys sys 1015007950 11717
 sys/src/boot/pc/ether8003.c - 664 sys sys 1015007950 6446
 sys/src/boot/pc/ether8139.c - 664 sys sys 1121393459 14823
-sys/src/boot/pc/ether8169.c - 664 sys sys 1204324647 21870
-sys/src/boot/pc/ether82557.c - 664 sys sys 1211922647 19136
+sys/src/boot/pc/ether8169.c - 664 sys sys 1212010436 21868
+sys/src/boot/pc/ether82557.c - 664 sys sys 1212010428 19134
 sys/src/boot/pc/ether82563.c - 664 sys sys 1209184829 26037
 sys/src/boot/pc/ether83815.c - 664 sys sys 1144961190 21993
-sys/src/boot/pc/ether8390.c - 664 sys sys 1112382847 16209
+sys/src/boot/pc/ether8390.c - 664 sys sys 1212010420 16207
 sys/src/boot/pc/ether8390.h - 664 sys sys 1015007951 1392
 sys/src/boot/pc/etherdp83820.c - 664 sys sys 1190221155 28740
 sys/src/boot/pc/etherec2t.c - 664 sys sys 1015007951 3598
-sys/src/boot/pc/etherelnk3.c - 664 sys sys 1158012439 44736
-sys/src/boot/pc/etherelnk3x.c - 664 sys sys 1015007951 24989
+sys/src/boot/pc/etherelnk3.c - 664 sys sys 1212010412 44734
+sys/src/boot/pc/etherelnk3x.c - 664 sys sys 1212010405 24987
 sys/src/boot/pc/etherga620.c - 664 sys sys 1175289484 27168
 sys/src/boot/pc/etherga620fw.h - 664 sys sys 1174080072 222295
 sys/src/boot/pc/etherif.h - 664 sys sys 1174077279 1338
@@ -9234,10 +9234,10 @@ sys/src/boot/pc/kfs.h - 664 sys sys 1032215924 861
 sys/src/boot/pc/kfsboot.c - 664 sys sys 1032215914 4788
 sys/src/boot/pc/l.s - 664 sys sys 1193167045 18213
 sys/src/boot/pc/lib.h - 664 sys sys 1200893244 2925
-sys/src/boot/pc/load.c - 664 sys sys 1194649778 10526
+sys/src/boot/pc/load.c - 664 sys sys 1212010219 10578
 sys/src/boot/pc/mbr.s - 664 sys sys 1015007953 6234
 sys/src/boot/pc/mem.h - 664 sys sys 1190921475 3437
-sys/src/boot/pc/memory.c - 664 sys sys 1019533021 10272
+sys/src/boot/pc/memory.c - 664 sys sys 1212010326 10266
 sys/src/boot/pc/mkfile - 664 sys sys 1193359312 3224
 sys/src/boot/pc/noether.c - 664 sys sys 1193336537 416
 sys/src/boot/pc/part.c - 664 sys sys 1200690166 7158
@@ -9252,9 +9252,9 @@ sys/src/boot/pc/sd.h - 664 sys sys 1200690169 2249
 sys/src/boot/pc/sd53c8xx.c - 664 sys sys 1186031515 52082
 sys/src/boot/pc/sd53c8xx.i - 664 sys sys 1015007955 27245
 sys/src/boot/pc/sdaoe.c - 664 sys sys 1204324647 11381
-sys/src/boot/pc/sdata.c - 664 sys sys 1211924337 39003
-sys/src/boot/pc/sdbios.c - 664 sys sys 1194145651 3282
-sys/src/boot/pc/sdiahci.c - 664 sys sys 1211924350 28355
+sys/src/boot/pc/sdata.c - 664 sys sys 1212010306 39146
+sys/src/boot/pc/sdbios.c - 664 sys sys 1212010334 3280
+sys/src/boot/pc/sdiahci.c - 664 sys sys 1212010293 28716
 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
@@ -13615,7 +13615,7 @@ sys/src/cmd/telco/mkfile - 664 sys sys 944961290 201
 sys/src/cmd/telco/telco.c - 664 sys sys 1021579996 26253
 sys/src/cmd/telco/telcodata - 775 sys sys 944961290 95
 sys/src/cmd/telco/telcofax - 664 sys sys 944961289 30
-sys/src/cmd/test.c - 664 sys sys 1211912897 5681
+sys/src/cmd/test.c - 664 sys sys 1211997263 5784
 sys/src/cmd/time.c - 664 sys sys 1014926662 1546
 sys/src/cmd/tlsclient.c - 664 sys sys 1024375149 1631
 sys/src/cmd/tlssrv.c - 664 sys sys 1161442158 3480

+ 32 - 0
dist/replica/plan9.log

@@ -19728,3 +19728,35 @@
 1211925604 15 c sys/src/9/pc/sdiahci.c - 664 sys sys 1211924442 38699
 1211925604 16 c sys/src/boot/pc/sdata.c - 664 sys sys 1211924337 39003
 1211925604 17 c sys/src/boot/pc/sdiahci.c - 664 sys sys 1211924350 28355
+1211947204 0 c 386/bin/cdfs - 775 sys sys 1211945690 174964
+1211947204 1 c 386/bin/test - 775 sys sys 1211945692 68474
+1211977804 0 c sys/games/lib/fortunes - 664 sys sys 1211977446 269422
+1211997603 0 c sys/src/cmd/test.c - 664 sys sys 1211997263 5784
+1212003005 0 c 386/bin/test - 775 sys sys 1212002706 68530
+1212010204 0 c sys/src/9/pc/sdiahci.c - 664 sys sys 1212010154 38901
+1212010204 1 c sys/src/boot/pc/load.c - 664 sys sys 1212010219 10578
+1212010204 2 c sys/src/boot/pc/sdiahci.c - 664 sys sys 1212010293 28716
+1212012004 0 c 386/9load - 775 sys sys 1212010540 341552
+1212012004 1 c 386/9loaddebug - 775 sys sys 1212010545 455911
+1212012004 2 c 386/9loadlite - 775 sys sys 1212010543 164328
+1212012004 3 c 386/9loadlitedebug - 775 sys sys 1212010546 240926
+1212012004 4 c 386/9pxeload - 775 sys sys 1212010541 341556
+1212012004 5 c 386/9pxeloaddebug - 775 sys sys 1212010542 455922
+1212012004 6 c sys/src/boot/pc/8250.c - 664 sys sys 1212010481 5725
+1212012004 7 c sys/src/boot/pc/bcom.c - 664 sys sys 1212010473 6460
+1212012004 8 c sys/src/boot/pc/clock.c - 664 sys sys 1212010463 6825
+1212012004 9 c sys/src/boot/pc/console.c - 664 sys sys 1212010517 3422
+1212012004 10 c sys/src/boot/pc/devfloppy.c - 664 sys sys 1212010456 15657
+1212012004 11 c sys/src/boot/pc/devsd.c - 664 sys sys 1212010316 11567
+1212012004 12 c sys/src/boot/pc/dosboot.c - 664 sys sys 1212010488 11337
+1212012004 13 c sys/src/boot/pc/ether2114x.c - 664 sys sys 1212010443 38026
+1212012004 14 c sys/src/boot/pc/ether8169.c - 664 sys sys 1212010436 21868
+1212012004 15 c sys/src/boot/pc/ether82557.c - 664 sys sys 1212010428 19134
+1212012004 16 c sys/src/boot/pc/ether8390.c - 664 sys sys 1212010420 16207
+1212012004 17 c sys/src/boot/pc/etherelnk3.c - 664 sys sys 1212010412 44734
+1212012004 18 c sys/src/boot/pc/etherelnk3x.c - 664 sys sys 1212010405 24987
+1212012004 19 c sys/src/boot/pc/memory.c - 664 sys sys 1212010326 10266
+1212012004 20 c sys/src/boot/pc/sdata.c - 664 sys sys 1212010306 39146
+1212012004 21 c sys/src/boot/pc/devbios.c - 664 sys sys 1212010497 9431
+1212012004 22 c sys/src/boot/pc/sdbios.c - 664 sys sys 1212010334 3280
+1212017405 0 c sys/man/3/sdahci - 664 sys sys 1212016122 3212

+ 1 - 0
sys/games/lib/fortunes

@@ -4222,3 +4222,4 @@ Those who can do, those who can't write and those who can't write make ezines. -
 Command (m for help): 
 `the dreaded Wordstar, the Wordprocessor that Time joined the Foreign Legion to Forget.' - Verity Stob
 Please contact nicfae@realtek.com.tw for singing NDA form.
+/home/jmk/.wvdial.conf<Warn>: Ignoring malformed input line: ";Do NOT edit this file by hand!"

+ 2 - 1
sys/man/3/sdahci

@@ -85,7 +85,8 @@ Change the connection
 .I speed
 to one of
 .BR auto ,
-.BR satai or
+.BR satai
+or
 .BR sataii .
 .TP
 .B nop

+ 79 - 54
sys/src/9/pc/sdiahci.c

@@ -1,6 +1,6 @@
 /*
  * intel/amd ahci sata controller
- * copyright © 2007 coraid, inc.
+ * copyright © 2007-8 coraid, inc.
  */
 
 #include "u.h"
@@ -14,8 +14,8 @@
 #include "ahci.h"
 
 #define	dprint(...)	if(debug)	iprint(__VA_ARGS__); else USED(debug)
-#define	idprint(...)	if(prid)	print(__VA_ARGS__);  else USED(prid)
-#define	aprint(...)	if(datapi)	print(__VA_ARGS__);  else USED(datapi)
+#define	idprint(...)	if(prid)	iprint(__VA_ARGS__);  else USED(prid)
+#define	aprint(...)	if(datapi)	iprint(__VA_ARGS__);  else USED(datapi)
 #define Tname(c)	tname[(c)->type]
 
 enum {
@@ -38,14 +38,16 @@ enum {
 	Tesb,
 	Tich,
 	Tsb600,
+	Tunk,
 };
 
-#define Intel(x)	((x) == Tesb  || (x) == Tich)
+#define Intel(x)	((x)->pci->vid == 0x8086)
 
 static char *tname[] = {
 	"63xxesb",
 	"ich",
 	"sb600",
+	"unk",
 };
 
 enum {
@@ -142,6 +144,7 @@ struct Ctlr {
 	Drive	rawdrive[NCtlrdrv];
 	Drive*	drive[NCtlrdrv];
 	int	ndrive;
+	int	mport;
 };
 
 static	Ctlr	iactlr[NCtlr];
@@ -851,9 +854,9 @@ ahciconf(Ctlr *ctlr)
 	if((u&Hsam) == 0)
 		h->ghc |= Hae;
 
-	print("#S/sd%c: ahci: port %#p: hba sss %ld; ncs %ld; coal %ld; "
-		"mports %ld; led %ld; clo %ld; ems %ld\n",
-		ctlr->sdev->idno, h,
+	print("#S/sd%c: ahci %s port %#p: sss %ld ncs %ld coal %ld "
+		"mports %ld led %ld clo %ld ems %ld\n",
+		ctlr->sdev->idno, tname[ctlr->type], h,
 		(u>>27) & 1, (u>>8) & 0x1f, (u>>7) & 1, u & 0x1f, (u>>25) & 1,
 		(u>>24) & 1, (u>>6) & 1);
 	return countbits(h->pi);
@@ -925,8 +928,7 @@ identify(Drive *d)
 	u->inquiry[4] = sizeof u->inquiry - 4;
 	memmove(u->inquiry+8, d->model, 40);
 
-	if((osectors == 0 || osectors != s) &&
-	    memcmp(oserial, d->serial, sizeof oserial) != 0){
+	if(osectors != s && memcmp(oserial, d->serial, sizeof oserial) != 0){
 		d->mediachange = 1;
 		u->sectors = 0;
 	}
@@ -972,7 +974,7 @@ updatedrive(Drive *d)
 	}
 	if(cause & Adhrs){
 		if(p->task & 33){
-			dprint("Adhrs cause = %lux; serr = %lux; task=%lux\n",
+			dprint("Adhrs cause %lux serr %lux task %lux\n",
 				cause, serr, p->task);
 			d->portm.flag |= Ferror;
 			ewake = 1;
@@ -1074,23 +1076,22 @@ resetdisk(Drive *d)
 	stat = p->sstatus & 7;
 	state = (p->cmd>>28) & 0xf;
 	dprint("resetdisk: icc %ux  det %d sdet %d\n", state, det, stat);
-	if(stat != 3){		/* device absent or phy not communicating? */
-		ilock(d);
-		d->state = Dportreset;
-		iunlock(d);
-		return;
-	}
+
 	ilock(d);
 	state = d->state;
 	if(d->state != Dready || d->state != Dnew)
 		d->portm.flag |= Ferror;
 	clearci(p);			/* satisfy sleep condition. */
 	wakeup(&d->portm);
+	if(stat != 3){		/* device absent or phy not communicating? */
+		d->state = Dportreset;
+		iunlock(d);
+		return;
+	}
 	d->state = Derror;
 	iunlock(d);
 
 	qlock(&d->portm);
-
 	if(p->cmd&Ast && ahciswreset(&d->portc) == -1){
 		ilock(d);
 		d->state = Dportreset;	/* get a bigger stick. */
@@ -1170,9 +1171,8 @@ enum {
 static void
 westerndigitalhung(Drive *d)
 {
-	if((d->portm.feat&Datapi) == 0 && d->active &&
-	    TK2MS(MACHP(0)->ticks - d->intick) > 5000){
-		dprint("%s: drive hung; resetting [%lux] ci=%lx\n",
+	if((d->portm.feat&Datapi) == 0 && d->active && TK2MS(d->intick) > 5000){
+		dprint("%s: drive hung; resetting [%lux] ci %lx\n",
 			d->unit->name, d->port->task, d->port->ci);
 		d->state = Dreset;
 	}
@@ -1197,6 +1197,24 @@ doportreset(Drive *d)
 	return i;
 }
 
+/* drive must be locked */
+static void
+statechange(Drive *d)
+{
+	switch(d->state){
+	case Dnull:
+	case Doffline:
+		if(d->unit->sectors != 0){
+			d->sectors = 0;
+			d->mediachange = 1;
+		}
+		/* fallthrough */
+	case Dready:
+		d->wait = 0;
+		break;
+	}
+}
+
 static void
 checkdrive(Drive *d, int i)
 {
@@ -1293,6 +1311,7 @@ portreset:
 		ilock(d);
 		break;
 	}
+	statechange(d);
 	iunlock(d);
 }
 
@@ -1301,7 +1320,6 @@ satakproc(void*)
 {
 	int i;
 
-	memset(olds, 0xff, sizeof olds);
 	for(;;){
 		tsleep(&up->sleep, return0, 0, Nms);
 		for(i = 0; i < niadrive; i++)
@@ -1320,7 +1338,7 @@ iainterrupt(Ureg*, void *a)
 	c = a;
 	ilock(c);
 	cause = c->hba->isr;
-	for(i = 0; i < c->ndrive; i++){
+	for(i = 0; i < c->mport; i++){
 		m = 1 << i;
 		if((cause & m) == 0)
 			continue;
@@ -1347,7 +1365,7 @@ iaverify(SDunit *u)
 	d->unit = u;
 	iunlock(d);
 	iunlock(c);
-	checkdrive(d, d->driveno);
+	checkdrive(d, d->driveno);		/* c->d0 + d->driveno */
 	return 1;
 }
 
@@ -1618,7 +1636,6 @@ retry:
 	n = count;
 	if(n > max)
 		n = max;
-	d->active++;
 	ahcibuildpkt(&d->portm, r, data, n);
 	switch(waitready(d)){
 	case -1:
@@ -1638,24 +1655,25 @@ retry:
 	as.p = p;
 	as.i = 1;
 	d->intick = MACHP(0)->ticks;
+	d->active++;
 
 	while(waserror())
 		;
 	sleep(&d->portm, ahciclear, &as);
 	poperror();
 
+	d->active--;
 	ilock(d);
 	flag = d->portm.flag;
 	task = d->port->task;
 	iunlock(d);
 
 	if(task & (Efatal<<8) || task & (ASbsy|ASdrq) && d->state == Dready){
-		d->port->ci = 0;		/* clearci? */
+		d->port->ci = 0;
 		ahcirecover(&d->portc);
 		task = d->port->task;
 		flag &= ~Fdone;		/* either an error or do-over */
 	}
-	d->active--;
 	qunlock(&d->portm);
 	if(flag == 0){
 		if(++try == 10){
@@ -1734,7 +1752,6 @@ retry:
 		n = count;
 		if(n > max)
 			n = max;
-		d->active++;
 		ahcibuild(&d->portm, cmd, data, n, lba);
 		switch(waitready(d)){
 		case -1:
@@ -1753,12 +1770,14 @@ retry:
 		as.p = p;
 		as.i = 1;
 		d->intick = MACHP(0)->ticks;
+		d->active++;
 
 		while(waserror())
 			;
 		sleep(&d->portm, ahciclear, &as);
 		poperror();
 
+		d->active--;
 		ilock(d);
 		flag = d->portm.flag;
 		task = d->port->task;
@@ -1766,11 +1785,10 @@ retry:
 
 		if(task & (Efatal<<8) ||
 		    task & (ASbsy|ASdrq) && d->state == Dready){
-			d->port->ci = 0;	/* @? */
+			d->port->ci = 0;
 			ahcirecover(&d->portc);
 			task = d->port->task;
 		}
-		d->active--;
 		qunlock(&d->portm);
 		if(flag == 0){
 			if(++try == 10){
@@ -1820,7 +1838,30 @@ iasetupahci(Ctlr *c)
 	c->lmmio[0xc/4] = (1 << 6) - 1;	/* 5 ports. (supposedly ro pi reg.) */
 
 	/* enable ahci mode; from ich9 datasheet */
-	pcicfgw8(c->pci, 0x90, 1<<6 | 1<<5);
+	pcicfgw16(c->pci, 0x90, 1<<6 | 1<<5);
+}
+
+static int
+didtype(Pcidev *p)
+{
+	switch(p->vid){
+	case 0x8086:
+		if((p->did & 0xfffc) == 0x2680)
+			return Tesb;
+		/* 0x27c4 is the intel 82801 in compatibility (not sata) mode */
+		if ((p->did & 0xfeff) == 0x2829 ||		/* ich8 */
+		    (p->did & 0xfffe) == 0x2922 ||		/* ich9 */
+		    (p->did & 0xfffe) == 0x27c4 || p->did == 0x27c0) /* 82801g[bh]m? */
+			return Tich;
+		break;
+	case 0x1002:
+		if(p->did == 0x4380)
+			return Tsb600;
+		break;
+	}
+	if(p->ccrb == Pcibcstore && p->ccru == 6 && p->ccrp == 1)
+		return Tunk;
+	return -1;
 }
 
 static SDev*
@@ -1837,25 +1878,13 @@ iapnp(void)
 	if(done++)
 		return nil;
 
+	memset(olds, 0xff, sizeof olds);
 	p = nil;
 	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 == 0x27c5 || p->did == 0x27c0))
-			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)
-			type = Tich;		/* ich8 */
-		else if(p->vid == 0x1002 && p->did == 0x4380)
-			type = Tsb600;
-		else
-			continue;
-		if (p->mem[Abar].bar == 0)
+		type = didtype(p);
+		if (type == -1 || p->mem[Abar].bar == 0)
 			continue;
 		if(niactlr == NCtlr){
 			print("%spnp: too many controllers\n", tname[type]);
@@ -1881,17 +1910,18 @@ loop:
 		s->ctlr = c;
 		c->sdev = s;
 
-		if(Intel(c->type) && p->did != 0x2681)
+		if(Intel(c) && p->did != 0x2681)
 			iasetupahci(c);
 		nunit = ahciconf(c);
 //		ahcihbareset((Ahba*)c->mmio);
-		if(Intel(c->type) && iaahcimode(p) == -1)
+		if(Intel(c) && iaahcimode(p) == -1)
 			break;
 		if(nunit < 1){
 			vunmap(c->mmio, p->mem[Abar].size);
 			continue;
 		}
 		c->ndrive = s->nunit = nunit;
+		c->mport = c->hba->cap & ((1<<5)-1);
 
 		i = (c->hba->cap >> 21) & 1;
 		print("#S/sd%c: %s: sata-%s with %d ports\n", s->idno,
@@ -1926,7 +1956,7 @@ loop:
 			configdrive(c->drive[i]);
 		}
 
-		niadrive += nunit;
+		niadrive += n;
 		niactlr++;
 		if(head)
 			tail->next = s;
@@ -2045,14 +2075,9 @@ forcestate(Drive *d, char *state)
 		if(strcmp(state, diskstates[i]) == 0)
 			break;
 	if(i == nelem(diskstates))
-		i = 0;
+		error(Ebadctl);
 	ilock(d);
 	d->state = i;
-	if(i == Dnull){
-		d->mediachange = 1;
-		if(d->unit)
-			d->unit->sectors = 0;	/* force disk to disappear. */
-	}
 	iunlock(d);
 }
 

+ 1 - 1
sys/src/boot/pc/8250.c

@@ -171,7 +171,7 @@ uartintr(Ureg*, void *arg)
 			break;
 		}
 	}
-	panic("uartintr: 0x%2.2ux\n", uartrdreg(up, Istat));
+	panic("uartintr: 0x%2.2ux", uartrdreg(up, Istat));
 }
 
 /*

+ 1 - 1
sys/src/boot/pc/bcom.c

@@ -388,7 +388,7 @@ allocb(int size)
 	}
 
 	if(bp->flag)
-		panic("allocb reuse\n");
+		panic("allocb reuse");
 
 	bp->rp = bp->base;
 	bp->wp = bp->rp;

+ 10 - 1
sys/src/boot/pc/clock.c

@@ -88,6 +88,7 @@ X86type x86intel[] =
 	{ 6,	0xB,	16,	"PentiumIII/Xeon", },
 	{ 0xF,	1,	16,	"P4", },	/* P4 */
 	{ 0xF,	2,	16,	"PentiumIV/Xeon", },
+	{ 0xF,	6,	16,	"PentiumIV/Xeon", },
 
 	{ 3,	-1,	32,	"386", },	/* family defaults */
 	{ 4,	-1,	22,	"486", },
@@ -196,6 +197,14 @@ cpuidentify(void)
 	return t;
 }
 
+void
+prcpuid(void)
+{
+	if (cputype == nil)
+		panic("prcpuid: clockinit not called");
+	print("cpu0: %dMHz %s loop %d\n", cpumhz, cputype->name, loopconst);
+}
+
 void
 clockinit(void)
 {
@@ -208,7 +217,7 @@ clockinit(void)
 	 */
 	setvec(VectorCLOCK, clockintr, 0);
 
-	t = cpuidentify();
+	cputype = t = cpuidentify();
 
 	/*
 	 *  set clock for 1/HZ seconds

+ 2 - 1
sys/src/boot/pc/console.c

@@ -18,7 +18,7 @@ kbdchar(int c)
 	c &= 0x7F;
 	if(c == 0x10)
 		warp86("\n^P\n", 0);
-	if(c == 0x12)
+	if(c == 0x12)			/* control-r? */
 		debug = !debug;
 	consiq.putc(&consiq, c);
 }
@@ -149,6 +149,7 @@ getstr(char *prompt, char *buf, int size, char *def, int timeout)
 		sprint(pbuf, "%s[default==%s]: ", prompt, def);
 	for (;;) {
 		print(pbuf);
+		consdrain();
 		len = getline(buf, size, timeout);
 		switch(len){
 		case 0:

+ 4 - 0
sys/src/boot/pc/devbios.c

@@ -350,6 +350,10 @@ biosread(Fs *fs, void *a, long n)
 	offset = bdp->offset;
 	stuck = 0;
 	for (totnr = 0; totnr < n && stuck < 4; totnr += got) {
+		if (bdp->sectsz == 0) {
+			print("devbios: zero sector size\n");
+			return -1;
+		}
 		want = bdp->sectsz;
 		if (totnr + want > n)
 			want = n - totnr;

+ 2 - 0
sys/src/boot/pc/devfloppy.c

@@ -539,6 +539,8 @@ floppypos(FDrive *dp, long off)
 	int ltrack;
 	int end;
 
+	if (dp->t->bytes == 0 || dp->t->sectors == 0 || dp->t->heads == 0)
+		panic("floppypos: zero geometry");
 	lsec = off/dp->t->bytes;
 	ltrack = lsec/dp->t->sectors;
 	dp->tcyl = ltrack/dp->t->heads;

+ 2 - 0
sys/src/boot/pc/devsd.c

@@ -514,6 +514,8 @@ memset(a, 0xDA, len);
 	 * (sectors, secsize) can't change once the drive has
 	 * been brought online.
 	 */
+	if (unit->secsize == 0)
+		panic("sdbio: zero sector size");
 	bno = (off/unit->secsize) + pp->start;
 	nb = ((off+len+unit->secsize-1)/unit->secsize) + pp->start - bno;
 	max = SDmaxio/unit->secsize;

+ 2 - 0
sys/src/boot/pc/dosboot.c

@@ -182,6 +182,8 @@ fatwalk(Dos *dos, int n)
 	if(k >= dos->fatsize*dos->sectsize)
 		panic("getfat");
 
+	if (dos->sectsize == 0 || dos->clustsize == 0)
+		panic("fatwalk: zero sector or cluster size");
 	sect = (k/(dos->sectsize*dos->clustsize))*dos->clustsize + dos->fataddr;
 	o = k%(dos->sectsize*dos->clustsize);
 	p = getclust(dos, sect);

+ 1 - 1
sys/src/boot/pc/ether2114x.c

@@ -436,7 +436,7 @@ interrupt(Ureg*, void* arg)
 		 * Anything left not catered for?
 		 */
 		if(status)
-			panic("#l%d: status %8.8uX\n", ether->ctlrno, status);
+			panic("#l%d: status %8.8uX", ether->ctlrno, status);
 	}
 }
 

+ 1 - 1
sys/src/boot/pc/ether8169.c

@@ -826,7 +826,7 @@ rtl8169interrupt(Ureg*, void* arg)
 		 * Some of the reserved bits get set sometimes...
 		 */
 		if(isr & (Serr|Timeout|Tdu|Fovw|Punlc|Rdu|Ter|Tok|Rer|Rok))
-			panic("rtl8169interrupt: imr %#4.4ux isr %#4.4ux\n",
+			panic("rtl8169interrupt: imr %#4.4ux isr %#4.4ux",
 				csr16r(ctlr, Imr), isr);
 	}
 }

+ 1 - 1
sys/src/boot/pc/ether82557.c

@@ -408,7 +408,7 @@ interrupt(Ureg*, void* arg)
 		}
 
 		if(status & (StatCX|StatFR|StatCNA|StatRNR|StatMDI|StatSWI))
-			panic("%s#%d: status %uX\n", ctlr->type,  ctlr->ctlrno, status);
+			panic("%s#%d: status %uX", ctlr->type,  ctlr->ctlrno, status);
 	}
 }
 

+ 1 - 1
sys/src/boot/pc/ether8390.c

@@ -306,7 +306,7 @@ top:
 				crda = regr(ctlr, Crda0);
 				crda |= regr(ctlr, Crda1)<<8;
 				if(crda != to)
-					panic("crda write %d to %d\n", crda, to);
+					panic("crda write %d to %d", crda, to);
 	
 				break;
 			}

+ 1 - 1
sys/src/boot/pc/etherelnk3.c

@@ -1041,7 +1041,7 @@ interrupt(Ureg*, void* arg)
 		 * Panic if there are any interrupts not dealt with.
 		 */
 		if(status & interruptMask)
-			panic("#l%d: interrupt mask 0x%uX\n", ether->ctlrno, status);
+			panic("#l%d: interrupt mask 0x%uX", ether->ctlrno, status);
 
 		COMMAND(port, AcknowledgeInterrupt, interruptLatch);
 		if(ctlr->cbfn != nil)

+ 1 - 1
sys/src/boot/pc/etherelnk3x.c

@@ -532,7 +532,7 @@ interrupt(Ureg*, void* arg)
 		 * Panic if there are any interrupts not dealt with.
 		 */
 		if(status & interruptMask)
-			panic("elnk3#%d: interrupt mask 0x%uX\n", ether->ctlrno, status);
+			panic("elnk3#%d: interrupt mask 0x%uX", ether->ctlrno, status);
 	}
 
 	COMMAND(port, SelectRegisterWindow, w);

+ 12 - 7
sys/src/boot/pc/load.c

@@ -312,6 +312,8 @@ probe(int type, int flag, int dev)
 	return 0;
 }
 
+void	prcpuid(void);
+
 void
 main(void)
 {
@@ -330,8 +332,9 @@ main(void)
 	consinit("0", "9600");
 	kbdinit();
 	if((ulong)&end > (KZERO|(640*1024)))
-		panic("i'm too big\n");
+		panic("i'm too big");
 
+	prcpuid();
 	readlsconf();
 	print("initial probe, to find plan9.ini...");
 	/* find and read plan9.ini, setting configuration variables */
@@ -339,7 +342,7 @@ main(void)
 		/* skip bios until we have read plan9.ini */
 		if(!pxe && tp->type == Tether || tp->type == Tbios)
 			continue;
-		if (VERBOSE)
+		if (VERBOSE || debug)
 			print("probing %s...", typename(tp->type));
 		if((mp = probe(tp->type, Fini, Dany)) && (mp->flag & Fini)){
 			print("using %s!%s!%s\n", mp->name, mp->part, mp->ini);
@@ -351,8 +354,10 @@ main(void)
 	apminit();
 
 	debugload = getconf("*debugload") != nil;
-	if((p = getconf("console")) != nil)
+	if((p = getconf("console")) != nil) {
+		consdrain();
 		consinit(p, getconf("baud"));
+	}
 
 	devpccardlink();
 	devi82365link();
@@ -512,7 +517,7 @@ ialloc(ulong n, int align)
 
 	palloc = p+n;
 	if(palloc > PEND)
-		panic("ialloc(%lud, %d) called from %#p\n",
+		panic("ialloc(%lud, %d) called from %#p",
 			n, align, getcallerpc(&n));
 	return memset((void*)(p|KZERO), 0, n);
 }
@@ -523,7 +528,7 @@ xspanalloc(ulong size, int align, ulong span)
 	ulong a, v;
 
 	if((palloc + (size+align+span)) > PEND)
-		panic("xspanalloc(%lud, %d, 0x%lux) called from %#p\n",
+		panic("xspanalloc(%lud, %d, 0x%lux) called from %#p",
 			size, align, span, getcallerpc(&size));
 
 	a = (ulong)ialloc(size+align+span, 0);
@@ -557,7 +562,7 @@ allocb(int size)
 	}
 	if(bp == 0){
 		if((palloc + (sizeof(Block)+size+64)) > PEND)
-			panic("allocb(%d) called from %#p\n",
+			panic("allocb(%d) called from %#p",
 				size, getcallerpc(&size));
 		bp = ialloc(sizeof(Block)+size+64, 0);
 		addr = (ulong)bp;
@@ -567,7 +572,7 @@ allocb(int size)
 	}
 
 	if(bp->flag)
-		panic("allocb reuse\n");
+		panic("allocb reuse");
 
 	bp->rp = bp->base;
 	bp->wp = bp->rp;

+ 3 - 3
sys/src/boot/pc/memory.c

@@ -350,7 +350,7 @@ mmuwalk(ulong* pdb, ulong va, int level, int create)
 
 	case 2:
 		if(*table & PTESIZE)
-			panic("mmuwalk2: va 0x%ux entry 0x%ux\n", va, *table);
+			panic("mmuwalk2: va 0x%ux entry 0x%ux", va, *table);
 		if(!(*table & PTEVALID)){
 			pa = PADDR(ialloc(BY2PG, BY2PG));
 			*table = pa|PTEWRITE|PTEVALID;
@@ -401,7 +401,7 @@ mmukmap(ulong pa, ulong va, int size)
 				 */
 				x = PPN(*table);
 				if(x != pa)
-					panic("mmukmap1: pa 0x%ux  entry 0x%ux\n",
+					panic("mmukmap1: pa 0x%ux  entry 0x%ux",
 						pa, *table);
 				x += 4*MB;
 				if(pae <= x){
@@ -424,7 +424,7 @@ mmukmap(ulong pa, ulong va, int size)
 				if(pte && *pte & PTEVALID){
 					x = PPN(*pte);
 					if(x != pa)
-						panic("mmukmap2: pa 0x%ux entry 0x%ux\n",
+						panic("mmukmap2: pa 0x%ux entry 0x%ux",
 							pa, *pte);
 					pgsz = BY2PG;
 					pa += pgsz;

+ 4 - 0
sys/src/boot/pc/sdata.c

@@ -959,6 +959,8 @@ atageniostart(Drive* drive, vlong lba)
 		s = lba & 0xFF;
 	}
 	else{
+		if (drive->s == 0 || drive->h == 0)
+			panic("atageniostart: zero s or h");
 		c = lba/(drive->s*drive->h);
 		h = ((lba/drive->s) % drive->h);
 		s = (lba % drive->s) + 1;
@@ -1150,6 +1152,8 @@ atagenio(Drive* drive, uchar* cmd, int)
 	count = (cmd[7]<<8)|cmd[8];
 	if(drive->data == nil)
 		return SDok;
+	if (drive->secsize == 0)
+		panic("atagenio: zero sector size");
 	if(drive->dlen < count*drive->secsize)
 		count = drive->dlen/drive->secsize;
 	qlock(ctlr);

+ 1 - 1
sys/src/boot/pc/sdbios.c

@@ -62,7 +62,7 @@ biosrio(SDreq* r)
 	case 0x08:			/* read */
 	case 0x28:			/* read */
 		if (r->cmd[0] == 0x08)
-			panic("biosrio: 0x08 read op\n");
+			panic("biosrio: 0x08 read op");
 		off = r->cmd[2]<<24 | r->cmd[3]<<16 | r->cmd[4]<<8 | r->cmd[5];
 		nb = r->cmd[7]<<8 | r->cmd[8];	/* often 4 */
 		USED(nb);		/* is nb*512 == r->dlen? */

+ 17 - 0
sys/src/boot/pc/sdiahci.c

@@ -909,6 +909,10 @@ newdrive(Drive *d)
 			goto lose;
 		}
 	}
+	if (d->sectors == 0) {
+		idprint("%s: no sectors\n", d->unit->name);
+		goto lose;
+	}
 
 	ilock(d);
 	d->state = Dready;
@@ -1365,6 +1369,8 @@ retry:
 	while(ahciclear(&as) == 0)
 		;
 
+	if (d->port == nil)
+		panic("iariopkt: nil d->port");
 	ilock(d);
 	flag = d->portm.flag;
 	task = d->port->task;
@@ -1438,6 +1444,8 @@ iario(SDreq *r)
 	count = cmd[7]<<8  | cmd[8];
 	if(r->data == nil)
 		return SDok;
+	if (unit->secsize <= 0)
+		unit->secsize = 512;
 	if(r->dlen < count * unit->secsize)
 		count = r->dlen / unit->secsize;
 	max = 128;
@@ -1463,6 +1471,8 @@ iario(SDreq *r)
 		while(ahciclear(&as) == 0)
 			;
 
+		if (d->port == nil)
+			panic("iario: nil d->port");
 		ilock(d);
 		flag = d->portm.flag;
 		task = d->port->task;
@@ -1567,12 +1577,19 @@ loop:
 				tname[c->type], io, p->did);
 			continue;
 		}
+
 		/* ugly hack: get this in compatibility mode; see memory.c:271 */
+		if(p->mem[Abar].bar == 0) {
+			print("%s: did %#ux has zero bar\n", tname[c->type],
+				p->did);
+			continue;
+		}
 		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)

+ 9 - 1
sys/src/cmd/test.c

@@ -258,7 +258,15 @@ isdir(char *f)
 int
 isreg(char *f)
 {
-	return !isdir(f);
+	int r;
+	Dir *dir;
+
+	dir = dirstat(f);
+	if (dir == nil)
+		return 0;
+	r = (dir->mode & DMDIR) == 0;
+	free(dir);
+	return r;
 }
 
 int