Browse Source

Plan 9 from Bell Labs 2007-10-09

David du Colombier 13 years ago
parent
commit
f645a3d553

+ 22 - 23
dist/replica/_plan9.db

@@ -1,8 +1,8 @@
 386 - 20000000775 sys sys 1010957353 0
-386/9load - 775 sys sys 1186619808 326380
-386/9loaddebug - 775 sys sys 1191469884 435027
-386/9loadlite - 775 sys sys 1186619809 149672
-386/9loadlitedebug - 775 sys sys 1190923620 220555
+386/9load - 775 sys sys 1191886962 330276
+386/9loaddebug - 775 sys sys 1191886968 440560
+386/9loadlite - 775 sys sys 1191886972 153588
+386/9loadlitedebug - 775 sys sys 1191886976 226088
 386/9pc - 775 sys sys 1189053434 2038499
 386/9pc.gz - 664 sys sys 1189053435 865376
 386/9pccpu - 775 sys sys 1189053453 1705749
@@ -11,7 +11,7 @@
 386/9pcdisk.gz - 664 sys sys 1189229899 948797
 386/9pcf - 775 sys sys 1189310638 2705317
 386/9pcf.gz - 664 sys sys 1189310663 1164515
-386/9pxeload - 775 sys sys 1186619809 326380
+386/9pxeload - 775 sys sys 1191886982 330276
 386/bin - 20000000775 sys sys 1018897690 0
 386/bin/8a - 775 sys sys 1168402260 116604
 386/bin/8c - 775 sys sys 1190520740 367214
@@ -465,7 +465,7 @@
 386/bin/upas/mlowner - 775 sys sys 1177617496 92263
 386/bin/upas/msgcat - 775 sys sys 1064598353 38
 386/bin/upas/msgtok - 775 sys sys 1176520508 76758
-386/bin/upas/nedmail - 775 sys sys 1181507271 156007
+386/bin/upas/nedmail - 775 sys sys 1191873018 156007
 386/bin/upas/pop3 - 775 sys sys 1188447313 261673
 386/bin/upas/qer - 775 sys sys 1178568313 99195
 386/bin/upas/ratfs - 775 sys sys 1178568314 110177
@@ -7834,7 +7834,7 @@ sys/man/8/mkpaqfs - 664 sys sys 1181261121 890
 sys/man/8/mksacfs - 664 sys sys 964886843 710
 sys/man/8/mouse - 664 sys sys 971455511 2476
 sys/man/8/na - 664 sys sys 958527089 859
-sys/man/8/ndb - 664 sys sys 1191613971 14611
+sys/man/8/ndb - 664 sys sys 1191867910 14502
 sys/man/8/newuser - 664 sys sys 1116954242 2418
 sys/man/8/nfsserver - 664 sys sys 1191524525 3576
 sys/man/8/pcmcia - 664 sys sys 944959679 408
@@ -8057,7 +8057,7 @@ sys/src/9/pc/audio.h - 664 sys sys 1015014513 343
 sys/src/9/pc/bios32.c - 664 sys sys 1173287378 3029
 sys/src/9/pc/cga.c - 664 sys sys 1015014513 1843
 sys/src/9/pc/dat.h - 664 sys sys 1190268414 7549
-sys/src/9/pc/devarch.c - 664 sys sys 1184470975 19350
+sys/src/9/pc/devarch.c - 664 sys sys 1191886206 19667
 sys/src/9/pc/devether.c - 664 sys sys 1178823613 10489
 sys/src/9/pc/devfloppy.c - 664 sys sys 1142958305 20139
 sys/src/9/pc/devi82365.c - 664 sys sys 1146318335 20504
@@ -8079,7 +8079,7 @@ sys/src/9/pc/ether8003.c - 664 sys sys 1015014516 6665
 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 1185509068 30197
+sys/src/9/pc/ether82557.c - 664 sys sys 1191886292 30411
 sys/src/9/pc/ether82563.c - 664 sys sys 1190235476 35505
 sys/src/9/pc/ether83815.c - 664 sys sys 1172259521 26346
 sys/src/9/pc/ether8390.c - 664 sys sys 1131290377 17702
@@ -8090,7 +8090,7 @@ sys/src/9/pc/etherelnk3.c - 664 sys sys 1158012427 48807
 sys/src/9/pc/etherga620.c - 664 sys sys 1185652495 29895
 sys/src/9/pc/etherga620fw.h - 664 sys sys 1026847642 222295
 sys/src/9/pc/etherif.h - 664 sys sys 1088178711 961
-sys/src/9/pc/etherigbe.c - 664 sys sys 1184468343 44976
+sys/src/9/pc/etherigbe.c - 664 sys sys 1191886283 45422
 sys/src/9/pc/etherm10g.c - 664 sys sys 1174595240 27681
 sys/src/9/pc/etherm10g2k.i - 664 sys sys 1174590360 957485
 sys/src/9/pc/etherm10g4k.i - 664 sys sys 1174590362 926959
@@ -8115,19 +8115,19 @@ sys/src/9/pc/l.s - 664 sys sys 1190268443 29347
 sys/src/9/pc/main.c - 664 sys sys 1168306227 15337
 sys/src/9/pc/mem.h - 664 sys sys 1137622431 5203
 sys/src/9/pc/memory.c - 664 sys sys 1153172671 18773
-sys/src/9/pc/mkfile - 664 sys sys 1158794206 4004
+sys/src/9/pc/mkfile - 664 sys sys 1191885521 4025
 sys/src/9/pc/mmu.c - 664 sys sys 1171688128 24591
 sys/src/9/pc/mouse.c - 664 sys sys 1098479254 7057
 sys/src/9/pc/mp.c - 664 sys sys 1162388126 17349
 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 1190853434 1521
+sys/src/9/pc/pc - 664 sys sys 1191885434 1520
 sys/src/9/pc/pcauth - 664 sys sys 1179696163 724
-sys/src/9/pc/pccd - 664 sys sys 1190853542 1493
-sys/src/9/pc/pccpu - 664 sys sys 1190853631 1008
-sys/src/9/pc/pccpuf - 664 sys sys 1190853647 1586
-sys/src/9/pc/pcdisk - 664 sys sys 1190853723 1546
-sys/src/9/pc/pcf - 664 sys sys 1181616886 1582
+sys/src/9/pc/pccd - 664 sys sys 1191885773 1514
+sys/src/9/pc/pccpu - 664 sys sys 1191885782 1029
+sys/src/9/pc/pccpuf - 664 sys sys 1191885786 1607
+sys/src/9/pc/pcdisk - 664 sys sys 1191886075 1566
+sys/src/9/pc/pcf - 664 sys sys 1191885750 1603
 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 1185452613 29418
@@ -8145,8 +8145,8 @@ sys/src/9/pc/screen.h - 664 sys sys 1147023549 4256
 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/sd63xxesb.c - 664 sys sys 1191481587 36230
 sys/src/9/pc/sdata.c - 664 sys sys 1186361525 52991
+sys/src/9/pc/sdiahci.c - 664 sys sys 1191889849 37571
 sys/src/9/pc/sdmv50xx.c - 664 sys sys 1184467229 33837
 sys/src/9/pc/sdmylex.c - 664 sys sys 1189229947 28395
 sys/src/9/pc/sdscsi.c - 664 sys sys 1186618532 7957
@@ -9185,11 +9185,11 @@ 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 1130887225 18115
 sys/src/boot/pc/lib.h - 664 sys sys 1190921452 2847
-sys/src/boot/pc/load.c - 664 sys sys 1186619888 9469
+sys/src/boot/pc/load.c - 664 sys sys 1191886855 9463
 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/mkfile - 664 sys sys 1190921423 3182
+sys/src/boot/pc/mkfile - 664 sys sys 1191886702 3180
 sys/src/boot/pc/noether.c - 664 sys sys 1094674488 358
 sys/src/boot/pc/part.c - 664 sys sys 1114697151 7153
 sys/src/boot/pc/pbs.s - 664 sys sys 1143465387 8291
@@ -9204,8 +9204,8 @@ sys/src/boot/pc/queue.c - 664 sys sys 1015007954 566
 sys/src/boot/pc/sd.h - 664 sys sys 1153333456 2244
 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/sd63xxesb.c - 664 sys sys 1186368565 26990
 sys/src/boot/pc/sdata.c - 664 sys sys 1175564193 38846
+sys/src/boot/pc/sdiahci.c - 664 sys sys 1191886818 27133
 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 1144961191 7499
@@ -14180,7 +14180,7 @@ sys/src/cmd/upas/ml/mlmgr.c - 664 sys sys 1045505888 2332
 sys/src/cmd/upas/ml/mlowner.c - 664 sys sys 1177589086 1143
 sys/src/cmd/upas/ned - 20000000775 sys sys 1062073146 0
 sys/src/cmd/upas/ned/mkfile - 664 sys sys 1060041738 233
-sys/src/cmd/upas/ned/nedmail.c - 664 sys sys 1143759341 44533
+sys/src/cmd/upas/ned/nedmail.c - 664 sys sys 1191814356 44531
 sys/src/cmd/upas/pop3 - 20000000775 sys sys 1064589604 0
 sys/src/cmd/upas/pop3/mkfile - 664 sys sys 1064589604 186
 sys/src/cmd/upas/pop3/pop3.c - 664 sys sys 1115039848 14327
@@ -15732,4 +15732,3 @@ 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 1018802620 0
-sys/src/cmd/upas/ned/nedmail.c - 664 sys sys 1191814356 44531

+ 21 - 21
dist/replica/plan9.db

@@ -1,8 +1,8 @@
 386 - 20000000775 sys sys 1010957353 0
-386/9load - 775 sys sys 1186619808 326380
-386/9loaddebug - 775 sys sys 1191469884 435027
-386/9loadlite - 775 sys sys 1186619809 149672
-386/9loadlitedebug - 775 sys sys 1190923620 220555
+386/9load - 775 sys sys 1191886962 330276
+386/9loaddebug - 775 sys sys 1191886968 440560
+386/9loadlite - 775 sys sys 1191886972 153588
+386/9loadlitedebug - 775 sys sys 1191886976 226088
 386/9pc - 775 sys sys 1189053434 2038499
 386/9pc.gz - 664 sys sys 1189053435 865376
 386/9pccpu - 775 sys sys 1189053453 1705749
@@ -11,7 +11,7 @@
 386/9pcdisk.gz - 664 sys sys 1189229899 948797
 386/9pcf - 775 sys sys 1189310638 2705317
 386/9pcf.gz - 664 sys sys 1189310663 1164515
-386/9pxeload - 775 sys sys 1186619809 326380
+386/9pxeload - 775 sys sys 1191886982 330276
 386/bin - 20000000775 sys sys 1018897690 0
 386/bin/8a - 775 sys sys 1168402260 116604
 386/bin/8c - 775 sys sys 1190520740 367214
@@ -465,7 +465,7 @@
 386/bin/upas/mlowner - 775 sys sys 1177617496 92263
 386/bin/upas/msgcat - 775 sys sys 1064598353 38
 386/bin/upas/msgtok - 775 sys sys 1176520508 76758
-386/bin/upas/nedmail - 775 sys sys 1181507271 156007
+386/bin/upas/nedmail - 775 sys sys 1191873018 156007
 386/bin/upas/pop3 - 775 sys sys 1188447313 261673
 386/bin/upas/qer - 775 sys sys 1178568313 99195
 386/bin/upas/ratfs - 775 sys sys 1178568314 110177
@@ -7834,7 +7834,7 @@ sys/man/8/mkpaqfs - 664 sys sys 1181261121 890
 sys/man/8/mksacfs - 664 sys sys 964886843 710
 sys/man/8/mouse - 664 sys sys 971455511 2476
 sys/man/8/na - 664 sys sys 958527089 859
-sys/man/8/ndb - 664 sys sys 1191613971 14611
+sys/man/8/ndb - 664 sys sys 1191867910 14502
 sys/man/8/newuser - 664 sys sys 1116954242 2418
 sys/man/8/nfsserver - 664 sys sys 1191524525 3576
 sys/man/8/pcmcia - 664 sys sys 944959679 408
@@ -8057,7 +8057,7 @@ sys/src/9/pc/audio.h - 664 sys sys 1015014513 343
 sys/src/9/pc/bios32.c - 664 sys sys 1173287378 3029
 sys/src/9/pc/cga.c - 664 sys sys 1015014513 1843
 sys/src/9/pc/dat.h - 664 sys sys 1190268414 7549
-sys/src/9/pc/devarch.c - 664 sys sys 1184470975 19350
+sys/src/9/pc/devarch.c - 664 sys sys 1191886206 19667
 sys/src/9/pc/devether.c - 664 sys sys 1178823613 10489
 sys/src/9/pc/devfloppy.c - 664 sys sys 1142958305 20139
 sys/src/9/pc/devi82365.c - 664 sys sys 1146318335 20504
@@ -8079,7 +8079,7 @@ sys/src/9/pc/ether8003.c - 664 sys sys 1015014516 6665
 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 1185509068 30197
+sys/src/9/pc/ether82557.c - 664 sys sys 1191886292 30411
 sys/src/9/pc/ether82563.c - 664 sys sys 1190235476 35505
 sys/src/9/pc/ether83815.c - 664 sys sys 1172259521 26346
 sys/src/9/pc/ether8390.c - 664 sys sys 1131290377 17702
@@ -8090,7 +8090,7 @@ sys/src/9/pc/etherelnk3.c - 664 sys sys 1158012427 48807
 sys/src/9/pc/etherga620.c - 664 sys sys 1185652495 29895
 sys/src/9/pc/etherga620fw.h - 664 sys sys 1026847642 222295
 sys/src/9/pc/etherif.h - 664 sys sys 1088178711 961
-sys/src/9/pc/etherigbe.c - 664 sys sys 1184468343 44976
+sys/src/9/pc/etherigbe.c - 664 sys sys 1191886283 45422
 sys/src/9/pc/etherm10g.c - 664 sys sys 1174595240 27681
 sys/src/9/pc/etherm10g2k.i - 664 sys sys 1174590360 957485
 sys/src/9/pc/etherm10g4k.i - 664 sys sys 1174590362 926959
@@ -8115,19 +8115,19 @@ sys/src/9/pc/l.s - 664 sys sys 1190268443 29347
 sys/src/9/pc/main.c - 664 sys sys 1168306227 15337
 sys/src/9/pc/mem.h - 664 sys sys 1137622431 5203
 sys/src/9/pc/memory.c - 664 sys sys 1153172671 18773
-sys/src/9/pc/mkfile - 664 sys sys 1158794206 4004
+sys/src/9/pc/mkfile - 664 sys sys 1191885521 4025
 sys/src/9/pc/mmu.c - 664 sys sys 1171688128 24591
 sys/src/9/pc/mouse.c - 664 sys sys 1098479254 7057
 sys/src/9/pc/mp.c - 664 sys sys 1162388126 17349
 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 1190853434 1521
+sys/src/9/pc/pc - 664 sys sys 1191885434 1520
 sys/src/9/pc/pcauth - 664 sys sys 1179696163 724
-sys/src/9/pc/pccd - 664 sys sys 1190853542 1493
-sys/src/9/pc/pccpu - 664 sys sys 1190853631 1008
-sys/src/9/pc/pccpuf - 664 sys sys 1190853647 1586
-sys/src/9/pc/pcdisk - 664 sys sys 1190853723 1546
-sys/src/9/pc/pcf - 664 sys sys 1181616886 1582
+sys/src/9/pc/pccd - 664 sys sys 1191885773 1514
+sys/src/9/pc/pccpu - 664 sys sys 1191885782 1029
+sys/src/9/pc/pccpuf - 664 sys sys 1191885786 1607
+sys/src/9/pc/pcdisk - 664 sys sys 1191886075 1566
+sys/src/9/pc/pcf - 664 sys sys 1191885750 1603
 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 1185452613 29418
@@ -8145,8 +8145,8 @@ sys/src/9/pc/screen.h - 664 sys sys 1147023549 4256
 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/sd63xxesb.c - 664 sys sys 1191481587 36230
 sys/src/9/pc/sdata.c - 664 sys sys 1186361525 52991
+sys/src/9/pc/sdiahci.c - 664 sys sys 1191889849 37571
 sys/src/9/pc/sdmv50xx.c - 664 sys sys 1184467229 33837
 sys/src/9/pc/sdmylex.c - 664 sys sys 1189229947 28395
 sys/src/9/pc/sdscsi.c - 664 sys sys 1186618532 7957
@@ -9185,11 +9185,11 @@ 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 1130887225 18115
 sys/src/boot/pc/lib.h - 664 sys sys 1190921452 2847
-sys/src/boot/pc/load.c - 664 sys sys 1186619888 9469
+sys/src/boot/pc/load.c - 664 sys sys 1191886855 9463
 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/mkfile - 664 sys sys 1190921423 3182
+sys/src/boot/pc/mkfile - 664 sys sys 1191886702 3180
 sys/src/boot/pc/noether.c - 664 sys sys 1094674488 358
 sys/src/boot/pc/part.c - 664 sys sys 1114697151 7153
 sys/src/boot/pc/pbs.s - 664 sys sys 1143465387 8291
@@ -9204,8 +9204,8 @@ sys/src/boot/pc/queue.c - 664 sys sys 1015007954 566
 sys/src/boot/pc/sd.h - 664 sys sys 1153333456 2244
 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/sd63xxesb.c - 664 sys sys 1186368565 26990
 sys/src/boot/pc/sdata.c - 664 sys sys 1175564193 38846
+sys/src/boot/pc/sdiahci.c - 664 sys sys 1191886818 27133
 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 1144961191 7499

+ 28 - 0
dist/replica/plan9.log

@@ -53036,3 +53036,31 @@
 1191736807 0 c sys/src/cmd/aux/vga/main.c - 664 sys sys 1191737144 9892
 1191738605 0 c sys/man/8/vga - 664 sys sys 1191737663 4129
 1191814205 0 c sys/src/cmd/upas/ned/nedmail.c - 664 sys sys 1191814356 44531
+1191868204 0 c sys/man/8/ndb - 664 sys sys 1191867910 14502
+1191873604 0 c 386/bin/upas/nedmail - 775 sys sys 1191873018 156007
+1191875404 0 c sys/src/boot/pc/sd63xxesb.c - 664 sys sys 1191874769 27027
+1191877205 0 c sys/src/9/pc/sd63xxesb.c - 664 sys sys 1191875962 36292
+1191877205 1 c sys/src/boot/pc/sd63xxesb.c - 664 sys sys 1191875732 27075
+1191884403 0 c sys/src/boot/pc/sd63xxesb.c - 664 sys sys 1191884564 27140
+1191886204 0 c sys/src/9/pc/devarch.c - 664 sys sys 1191886206 19667
+1191886204 1 c sys/src/9/pc/ether82557.c - 664 sys sys 1191886292 30411
+1191886204 2 c sys/src/9/pc/etherigbe.c - 664 sys sys 1191886283 45422
+1191886204 3 c sys/src/9/pc/mkfile - 664 sys sys 1191885521 4025
+1191886204 4 c sys/src/9/pc/pc - 664 sys sys 1191885434 1520
+1191886204 5 c sys/src/9/pc/pccpu - 664 sys sys 1191885782 1029
+1191886204 6 c sys/src/9/pc/pcdisk - 664 sys sys 1191886075 1566
+1191886204 7 c sys/src/9/pc/pcf - 664 sys sys 1191885750 1603
+1191886204 8 c sys/src/9/pc/pccd - 664 sys sys 1191885773 1514
+1191886204 9 c sys/src/9/pc/pccpuf - 664 sys sys 1191885786 1607
+1191886204 10 a sys/src/9/pc/sdiahci.c - 664 sys sys 1191885317 37576
+1191886204 11 d sys/src/boot/pc/sd63xxesb.c - 664 sys sys 1191884564 0
+1191886204 12 d sys/src/9/pc/sd63xxesb.c - 664 sys sys 1191875962 0
+1191888004 0 c 386/9load - 775 sys sys 1191886962 330276
+1191888004 1 c 386/9loaddebug - 775 sys sys 1191886968 440560
+1191888004 2 c 386/9loadlite - 775 sys sys 1191886972 153588
+1191888004 3 c 386/9loadlitedebug - 775 sys sys 1191886976 226088
+1191888004 4 c 386/9pxeload - 775 sys sys 1191886982 330276
+1191888004 5 c sys/src/boot/pc/load.c - 664 sys sys 1191886855 9463
+1191888004 6 c sys/src/boot/pc/mkfile - 664 sys sys 1191886702 3180
+1191888004 7 a sys/src/boot/pc/sdiahci.c - 664 sys sys 1191886818 27133
+1191889803 0 c sys/src/9/pc/sdiahci.c - 664 sys sys 1191889849 37571

+ 1 - 9
sys/man/8/ndb

@@ -477,23 +477,15 @@ reverse entries.
 For example,
 this is how to serve RFC-2317
 .B ptr
-records for
-.L 65.14.39.130
-and
-.L 65.14.39.131
-in the subnet
+records for the subnet
 .LR 65.14.39.128/123 .
 .IP
 .EX
 ipnet=our-t1 ip=65.14.39.128 ipmask=/123
-
 dom=128.39.14.65.in-addr.arpa soa=
 	refresh=3600 ttl=3600
 	ns=ns1.our-domain.com
 	ns=ns2.our-domain.com
-
-dom=130.128.39.14.65.in-addr.arpa
-dom=131.128.39.14.65.in-addr.arpa
 .EE
 .
 .SS "Delegating Name Service Authority"

+ 17 - 8
sys/src/9/pc/devarch.c

@@ -580,6 +580,7 @@ static X86type x86intel[] =
 	{ 6,	7,	16,	"PentiumIII/Xeon", },
 	{ 6,	8,	16,	"PentiumIII/Xeon", },
 	{ 6,	0xB,	16,	"PentiumIII/Xeon", },
+	{ 6,	0xF,	16,	"Xeon5000-series", },
 	{ 0xF,	1,	16,	"P4", },	/* P4 */
 	{ 0xF,	2,	16,	"PentiumIV/Xeon", },
 
@@ -715,10 +716,10 @@ cpuidentify(void)
 	/*
 	 *  if there is one, set tsc to a known value
 	 */
-	if(m->cpuiddx & 0x10){
+	if(m->cpuiddx & Tsc){
 		m->havetsc = 1;
 		cycles = _cycles;
-		if(m->cpuiddx & 0x20)
+		if(m->cpuiddx & Cpumsr)
 			wrmsr(0x10, 0);
 	}
 
@@ -732,7 +733,7 @@ cpuidentify(void)
 	 * are supported enable them in CR4 and clear any other set extensions.
 	 * If machine check was enabled clear out any lingering status.
 	 */
-	if(m->cpuiddx & 0x2088){
+	if(m->cpuiddx & (Pge|Mce|0x8)){
 		cr4 = 0;
 		if(m->cpuiddx & 0x08)
 			cr4 |= 0x10;		/* page size extensions */
@@ -740,7 +741,7 @@ cpuidentify(void)
 			nomce = strtoul(p, 0, 0);
 		else
 			nomce = 0;
-		if((m->cpuiddx & 0x80) && !nomce){
+		if((m->cpuiddx & Mce) && !nomce){
 			cr4 |= 0x40;		/* machine check enable */
 			if(family == 5){
 				rdmsr(0x00, &mca);
@@ -763,13 +764,13 @@ cpuidentify(void)
 		 * the PGE bit in CR4, writing to CR3, and then
 		 * restoring the PGE bit.
 		 */
-		if(m->cpuiddx & 0x2000){
+		if(m->cpuiddx & Pge){
 			cr4 |= 0x80;		/* page global enable bit */
 			m->havepge = 1;
 		}
 
 		putcr4(cr4);
-		if(m->cpuiddx & 0x80)
+		if(m->cpuiddx & Mce)
 			rdmsr(0x01, &mct);
 	}
 
@@ -804,6 +805,8 @@ archctlread(Chan*, void *a, long nn, vlong offset)
 		n += snprint(buf+n, sizeof buf-n, "mb386\n");
 	else if(coherence == mb586)
 		n += snprint(buf+n, sizeof buf-n, "mb586\n");
+	else if(coherence == mfence)
+		n += snprint(buf+n, sizeof buf-n, "mfence\n");
 	else if(coherence == nop)
 		n += snprint(buf+n, sizeof buf-n, "nop\n");
 	else
@@ -864,8 +867,11 @@ archctlwrite(Chan*, void *a, long n, vlong)
 			if(X86FAMILY(m->cpuidax) < 5)
 				error("invalid coherence ctl on this cpu family");
 			coherence = mb586;
-		}
-		else if(strcmp(cb->f[1], "nop") == 0){
+		}else if(strcmp(cb->f[1], "mfence") == 0){
+			if((m->cpuiddx & Sse2) == 0)
+				error("invalid coherence ctl on this cpu family");
+			coherence = mfence;
+		}else if(strcmp(cb->f[1], "nop") == 0){
 			/* only safe on vmware */
 			if(conf.nmach > 1)
 				error("cannot disable coherence on a multiprocessor");
@@ -931,6 +937,9 @@ archinit(void)
 	if(X86FAMILY(m->cpuidax) >= 5)
 		coherence = mb586;
 
+	if(m->cpuiddx & Sse2)
+		coherence = mfence;
+
 	addarchfile("cputype", 0444, cputyperead, nil);
 	addarchfile("archctl", 0664, archctlread, archctlwrite);
 }

+ 9 - 3
sys/src/9/pc/ether82557.c

@@ -584,10 +584,16 @@ promiscuous(void* arg, int on)
 }
 
 static void
-multicast(void* arg, uchar *addr, int on)
+multicast(void* ether, uchar *addr, int add)
 {
-	USED(addr, on);
-	configure(arg, 1);
+	USED(addr);
+	/*
+	 * TODO: if (add) add addr to list of mcast addrs in controller
+	 *	else remove addr from list of mcast addrs in controller
+	 * enable multicast input (see CbMAS) instead of promiscuous mode.
+	 */
+	if (add)
+		configure(ether, 1);
 }
 
 static void

+ 15 - 6
sys/src/9/pc/etherigbe.c

@@ -62,6 +62,7 @@ enum {
 	Fcttv		= 0x00000170,	/* Flow Control Transmit Timer Value */
 	Txcw		= 0x00000178,	/* Transmit Configuration Word */
 	Rxcw		= 0x00000180,	/* Receive Configuration Word */
+	/* on the oldest cards (8254[23]), the Mta register is at 0x200 */
 	Tctl		= 0x00000400,	/* Transmit Control */
 	Tipg		= 0x00000410,	/* Transmit IPG */
 	Tbt		= 0x00000448,	/* Transmit Burst Timer */
@@ -721,11 +722,11 @@ igbepromiscuous(void* arg, int on)
 		rctl |= Upe|Mpe;
 	else
 		rctl &= ~(Upe|Mpe);
-	csr32w(ctlr, Rctl, rctl);
+	csr32w(ctlr, Rctl, rctl|Mpe);	/* temporarily keep Mpe on */
 }
 
 static void
-igbemulticast(void* arg, uchar* addr, int on)
+igbemulticast(void* arg, uchar* addr, int add)
 {
 	int bit, x;
 	Ctlr *ctlr;
@@ -736,10 +737,17 @@ igbemulticast(void* arg, uchar* addr, int on)
 
 	x = addr[5]>>1;
 	bit = ((addr[5] & 1)<<4)|(addr[4]>>4);
-	if(on)
+	/*
+	 * 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(add)
 		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]);
 }
@@ -1036,7 +1044,8 @@ igberxinit(Ctlr* ctlr)
 	int i;
 	Block *bp;
 
-	csr32w(ctlr, Rctl, Dpf|Bsize2048|Bam|RdtmsHALF);
+	/* temporarily keep Mpe on */
+	csr32w(ctlr, Rctl, Dpf|Bsize2048|Bam|RdtmsHALF|Mpe);
 
 	csr32w(ctlr, Rdbal, PCIWADDR(ctlr->rdba));
 	csr32w(ctlr, Rdbah, 0);

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

@@ -107,6 +107,7 @@ archmp.$O mp.$O:		apbootstrap.h
 apic.$O archmp.$O mp.$O:	mp.h
 $SDEV:				../port/sd.h
 sd53c8xx.$O:			sd53c8xx.i
+sdiahci.$O:			ahci.h
 main.$O:			init.h reboot.h
 wavelan.$O:			wavelan.c ../pc/wavelan.c ../pc/wavelan.h
 etherwavelan.$O:		etherwavelan.c ../pc/wavelan.h

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

@@ -74,7 +74,7 @@ misc
 	sdata		pci sdscsi
 	sd53c8xx	pci sdscsi
 	sdmylex		pci sdscsi
-	sd63xxesb	pci sdscsi
+	sdiahci		pci sdscsi
 
 	uarti8250
 	uartpci		pci

+ 1 - 0
sys/src/9/pc/pccd

@@ -70,6 +70,7 @@ misc
 	sdata		pci sdscsi
 	sd53c8xx	pci sdscsi
 	sdmylex		pci sdscsi
+	sdiahci		pci sdscsi
 
 	uarti8250
 	uartpci		pci

+ 1 - 0
sys/src/9/pc/pccpu

@@ -63,6 +63,7 @@ misc
 	sd53c8xx	pci sdscsi
 	sdmv50xx	pci sdscsi
 	sdmylex		pci sdscsi
+	sdiahci		pci sdscsi
 
 ip
 	tcp

+ 1 - 0
sys/src/9/pc/pccpuf

@@ -72,6 +72,7 @@ misc
 	sdata		pci sdscsi
 	sd53c8xx	pci sdscsi
 	sdmylex		pci sdscsi
+	sdiahci		pci sdscsi
 	sdaoe
 
 	vga3dfx		+cur

+ 2 - 1
sys/src/9/pc/pcdisk

@@ -69,8 +69,9 @@ misc
 	archmp		mp apic
 
 	sdata		pci sdscsi
-	sd53c8xx		pci sdscsi
+	sd53c8xx	pci sdscsi
 	sdmylex		pci sdscsi
+	sdiahci		pci sdscsi
 	sdaoe
 
 	uarti8250

+ 1 - 0
sys/src/9/pc/pcf

@@ -72,6 +72,7 @@ misc
 	sdata		pci sdscsi
 	sd53c8xx	pci sdscsi
 	sdmylex		pci sdscsi
+	sdiahci		pci sdscsi
 
 	uarti8250
 	uartpci		pci

+ 113 - 72
sys/src/9/pc/sd63xxesb.c → sys/src/9/pc/sdiahci.c

@@ -16,6 +16,7 @@
 #define	dprint(...)	if(debug)	iprint(__VA_ARGS__); else USED(debug)
 #define	idprint(...)	if(prid)	print(__VA_ARGS__);  else USED(prid)
 #define	aprint(...)	if(datapi)	iprint(__VA_ARGS__); else USED(datapi)
+#define Tname(c)	tname[(c)->type]
 
 enum {
 	NCtlr	= 4,
@@ -70,7 +71,7 @@ static char *diskstates[Dlast] = {
 	"portreset",
 };
 
-extern SDifc sd63xxesbifc;
+extern SDifc sdiahciifc;
 typedef struct Ctlr Ctlr;
 
 enum {
@@ -151,7 +152,7 @@ static	int	niadrive;
 
 static	int	debug;
 static	int	prid = 1;
-static	int	datapi = 0;
+static	int	datapi;
 
 static char stab[] = {
 [0]	'i', 'm',
@@ -751,6 +752,24 @@ setupfis(Afis *f)
 	f->devicebits = (u32int*)(f->base + 0x58);
 }
 
+static void
+ahciwakeup(Aport *p)
+{
+	ushort s;
+
+	s = p->sstatus;
+	if((s & 0xF00) != 0x600)
+		return;
+	if((s & 7) != 1){		/* not (device, no phy) */
+		iprint("ahci: slumbering drive unwakeable %ux\n", s);
+		return;
+	}
+	p->sctl = 3*Aipm | 0*Aspd | Adet;
+	delay(1);
+	p->sctl &= ~7;
+//	iprint("ahci: wake %ux -> %ux\n", s, p->sstatus);
+}
+
 static int
 ahciconfigdrive(Ahba *h, Aportc *c, int mode)
 {
@@ -767,6 +786,7 @@ ahciconfigdrive(Ahba *h, Aportc *c, int mode)
 	}
 
 	if(p->sstatus & 3 && h->cap & Hsss){
+		/* device connected & staggered spin-up */
 		dprint("configdrive:  spinning up ... [%ux]\n", p->sstatus);
 		p->cmd |= Apod|Asud;
 		asleep(1400);
@@ -780,6 +800,9 @@ ahciconfigdrive(Ahba *h, Aportc *c, int mode)
 	p->fishi = 0;
 	p->cmd |= Afre|Ast;
 
+	if((p->sstatus & 0xF0F) == 0x601) /* drive coming up in slumbering? */
+		ahciwakeup(p);
+
 	/* disable power managment sequence from book. */
 	p->sctl = (3*Aipm) | (mode*Aspd) | 0*Adet;
 	p->cmd &= ~Aalpe;
@@ -828,7 +851,7 @@ ahciconf(Ctlr *ctlr)
 		h->ghc |= Hae;
 
 	print("#S/sd%c: ahci: port %#p: hba sss %d; ncs %d; coal %d; "
-		"mports %d; led %d; clo %d; ems %d;\n",
+		"mports %d; led %d; clo %d; ems %d\n",
 		ctlr->sdev->idno, h,
 		(u>>27) & 1, (u>>8) & 0x1f, (u>>7) & 1, u & 0x1f, (u>>25) & 1,
 		(u>>24) & 1, (u>>6) & 1);
@@ -955,27 +978,30 @@ updatedrive(Drive *d)
 		}
 		pr = 0;
 	}
-	if(0 && p->task & 1 && last != cause)
+	if(p->task & 1 && last != cause)
 		dprint("err ca %ux serr %ux task %ux sstat %ux\n",
 			cause, serr, p->task, p->sstatus);
-
 	if(pr)
 		dprint("%s: upd %ux ta %ux\n", name, cause, p->task);
+
 	if(cause & (Aprcs|Aifs)){
 		s0 = d->state;
 		switch(p->sstatus & 7){
-		case 0:
+		case 0:				/* no device */
 			d->state = Dmissing;
 			break;
-		case 1:
-			d->state = Derror;
+		case 1:				/* device but no phy comm. */
+			if((p->sstatus & 0xF00) == 0x600)
+				d->state = Dnew; /* slumbering */
+			else
+				d->state = Derror;
 			break;
-		case 3:
+		case 3:				/* device & phy comm. estab. */
 			/* power mgnt crap for suprise removal */
 			p->ie |= Aprcs|Apcs;	/* is this required? */
 			d->state = Dreset;
 			break;
-		case 4:
+		case 4:				/* phy off-line */
 			d->state = Doffline;
 			break;
 		}
@@ -1004,19 +1030,24 @@ pstatus(Drive *d, ulong s)
 	 * likely my fault.  serror is maybe cleared at the wrong time.
 	 */
 	switch(s){
-	case 0:
+	case 0:			/* no device */
 		d->state = Dmissing;
 		break;
+	case 1:			/* device but no phy. comm. */
+		break;
 	case 2:			/* should this be missing?  need testcase. */
 		dprint("pstatus 2\n");
 		/* fallthrough */
-	case 3:
+	case 3:			/* device & phy. comm. */
 		d->wait = 0;
 		d->state = Dnew;
 		break;
-	case 4:
+	case 4:			/* offline */
 		d->state = Doffline;
 		break;
+	case 6:			/* ? not sure this makes sense. TODO */
+		d->state = Dnew;
+		break;
 	}
 }
 
@@ -1042,7 +1073,7 @@ 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){
+	if(stat != 3){		/* device absent or phy not communicating? */
 		ilock(d);
 		d->state = Dportreset;
 		iunlock(d);
@@ -1183,12 +1214,15 @@ checkdrive(Drive *d, int i)
 	case Dmissing:
 	case Dnew:
 		switch(s & 0x107){
-		case 0:
-		case 1:
+		case 1:		/* no device (pm), device but no phy. comm. */
+			ahciwakeup(d->port);
+			/* fall through */
+		case 0:		/* no device */
 			break;
 		default:
 			dprint("%s: unknown status %04ux\n", name, s);
-		case 0x100:
+			/* fall through */
+		case 0x100:		/* active, no device */
 			if(++d->wait&Mphywait)
 				break;
 reset:
@@ -1204,13 +1238,13 @@ reset:
 			resetdisk(d);
 			ilock(d);
 			break;
-		case 0x103:
+		case 0x103:		/* active, device, phy. comm. */
 			if((++d->wait&Midwait) == 0){
 				dprint("%s: slow reset %04ux task=%ux; %d\n",
 					name, s, d->port->task, d->wait);
 				goto reset;
 			}
-			s = d->port->task&0xff;
+			s = (uchar)d->port->task;
 			if(s == 0x7f || ((d->port->sig >> 16) != 0xeb14 &&
 			    (s & ~0x17) != (1<<6)))
 				break;
@@ -1236,12 +1270,13 @@ reset:
 portreset:
 		if(d->wait++ & 0xff && (s & 0x100) == 0)
 			break;
+		/* device is active */
 		dprint("%s: portreset [%s]: mode %d; status %04ux\n",
 			name, diskstates[d->state], d->mode, s);
 		d->portm.flag |= Ferror;
 		clearci(d->port);
 		wakeup(&d->portm);
-		if((s & 7) == 0){
+		if((s & 7) == 0){	/* no device */
 			d->state = Dmissing;
 			break;
 		}
@@ -1311,21 +1346,25 @@ static int
 iaenable(SDev *s)
 {
 	char name[32];
-	static int once;
 	Ctlr *c;
+	static int once;
 
 	c = s->ctlr;
 	ilock(c);
 	if(!c->enabled) {
-		if(once++ == 0)
+		if(once == 0) {
+			once = 1;
 			kproc("iasata", satakproc, 0);
+		}
+		if(c->ndrive == 0)
+			panic("iaenable: zero s->ctlr->ndrive");
 		pcisetbme(c->pci);
 		snprint(name, sizeof name, "%s (%s)", s->name, s->ifc->name);
 		intrenable(c->pci->intl, iainterrupt, c, c->pci->tbdf, name);
 		/* supposed to squelch leftover interrupts here. */
 		ahcienable(c->hba);
+		c->enabled = 1;
 	}
-	c->enabled = 1;
 	iunlock(c);
 	return 1;
 }
@@ -1500,9 +1539,9 @@ waitready(Drive *d)
 		t = d->port->task;
 		iunlock(d);
 		if((s & 0x100) == 0)
-			return -1;
+			return -1;	/* not active */
 		if(d->state == Dready && (s & 7) == 3)
-			return 0;
+			return 0;	/* ready, present & phy. comm. */
 		if((i+1) % 30 == 0)
 			print("%s: waitready: [%s] task=%ux sstat=%ux\n",
 				d->unit->name, diskstates[d->state], t, s);
@@ -1761,6 +1800,8 @@ loop:
 			type = Tsb600;
 		else
 			continue;
+		if (p->mem[Abar].bar == 0)
+			continue;
 		if(niactlr == NCtlr){
 			print("%spnp: too many controllers\n", tname[type]);
 			break;
@@ -1770,19 +1811,21 @@ loop:
 		memset(c, 0, sizeof *c);
 		memset(s, 0, sizeof *s);
 		io = p->mem[Abar].bar & ~0xf;
-		c->mmio = vmap(io, p->mem[0].size);
+		c->mmio = vmap(io, p->mem[Abar].size);
 		if(c->mmio == 0){
 			print("%s: address 0x%luX in use did=%x\n",
-				tname[type], io, p->did);
+				Tname(c), io, p->did);
 			continue;
 		}
 		c->lmmio = (ulong*)c->mmio;
 		c->pci = p;
 		c->type = type;
-		s->ifc = &sd63xxesbifc;
+
+		s->ifc = &sdiahciifc;
 		s->idno = 'E' + niactlr;
 		s->ctlr = c;
 		c->sdev = s;
+
 		if(Intel(c->type) && p->did != 0x2681)
 			iasetupahci(c);
 		nunit = ahciconf(c);
@@ -1790,14 +1833,14 @@ loop:
 		if(Intel(c->type) && iaahcimode(p) == -1)
 			break;
 		if(nunit < 1){
-			vunmap(c->mmio, p->mem[0].size);
+			vunmap(c->mmio, p->mem[Abar].size);
 			continue;
 		}
-		s->nunit = nunit;
+		c->ndrive = s->nunit = nunit;
 
 		i = (c->hba->cap >> 21) & 1;
 		print("#S/sd%c: %s: sata-%s with %d ports\n", s->idno,
-			tname[c->type], "I\0II" + i*2, nunit);
+			Tname(c), "I\0II" + i*2, nunit);
 
 		/* map the drives -- they don't all need to be enabled. */
 		memset(c->rawdrive, 0, sizeof c->rawdrive);
@@ -1820,7 +1863,7 @@ loop:
 		for(i = 0; i < n; i++)
 			if(ahciidle(c->drive[i]->port) == -1){
 				dprint("%s: port %d wedged; abort\n",
-					tname[c->type], i);
+					Tname(c), i);
 				goto loop;
 			}
 		for(i = 0; i < n; i++){
@@ -1952,7 +1995,8 @@ forcestate(Drive *d, char *state)
 	d->state = i;
 	if(i == Dnull){
 		d->mediachange = 1;
-		d->unit->sectors = 0;		/* force disk to disappear. */
+		if(d->unit)
+			d->unit->sectors = 0;	/* force disk to disappear. */
 	}
 	iunlock(d);
 }
@@ -2047,45 +2091,42 @@ portr(char *p, char *e, uint x)
 	return p;
 }
 
-#define has(x, s) if(u & (x)) p = seprint(p, e, (s))
-
+/* must emit exactly one line per controller (sd(3)) */
 static char*
-iartopctl(SDev *s, char *p, char *e)
-{
-	u32int u;
-	char name[10], pr[25];
-	Ahba *h;
-	Ctlr *c;
-
-	c = s->ctlr;
-
-	snprint(name, sizeof name, "sd%c", s->idno);
-	p = seprint(p, e, "%s ahci ", name);
-	u = c->hba->cap;
-	has(Hs64a, "64a ");
-	has(Hsncq, "ncq ");
-	has(Hssntf, "ntf ");
-	has(Hsmps, "mps ");
-	has(Hsss, "ss ");
-	has(Hsalp, "alp ");
-	has(Hsal, "led ");
-	has(Hsclo, "clo ");
-	has(Hsam, "am ");
-	has(Hspm, "pm ");
-	has(Hssc, "slum ");
-	has(Hpsc, "pslum ");
-	has(Hcccs, "coal ");
-	has(Hems, "ems ");
-	has(Hsxs, "sxs ");
-	p = seprint(p, e, "\n");
-
-	p = seprint(p, e, "%s iss %d ncs %d np %d\n", name, (u>>20) & 0xf,
-		(u>>8) & 0x1f, 1 + (u & 0x1f));
-	h = c->hba;
-	portr(pr, pr + sizeof pr, h->pi);
-	p = seprint(p, e, "%s ghc %ux isr %ux pi %ux %s ver %ux\n",
-		name, h->ghc, h->isr, h->pi, pr, h->ver);
-	return p;
+iartopctl(SDev *sdev, char *p, char *e)
+{
+	u32int cap;
+	char pr[25];
+	Ahba *hba;
+	Ctlr *ctlr;
+
+#define has(x, str) if(cap & (x)) p = seprint(p, e, "%s ", (str))
+
+	ctlr = sdev->ctlr;
+	hba = ctlr->hba;
+	p = seprint(p, e, "sd%c ahci port %#p: ", sdev->idno, hba);
+	cap = hba->cap;
+	has(Hs64a, "64a");
+	has(Hsalp, "alp");
+	has(Hsam, "am");
+	has(Hsclo, "clo");
+	has(Hcccs, "coal");
+	has(Hems, "ems");
+	has(Hsal, "led");
+	has(Hsmps, "mps");
+	has(Hsncq, "ncq");
+	has(Hssntf, "ntf");
+	has(Hspm, "pm");
+	has(Hpsc, "pslum");
+	has(Hssc, "slum");
+	has(Hsss, "ss");
+	has(Hsxs, "sxs");
+	portr(pr, pr + sizeof pr, hba->pi);
+	return seprint(p, e,
+		"iss %d ncs %d np %d; ghc %ux isr %ux pi %ux %s ver %ux\n",
+		(cap>>20) & 0xf, (cap>>8) & 0x1f, 1 + (cap & 0x1f),
+		hba->ghc, hba->isr, hba->pi, pr, hba->ver);
+#undef has
 }
 
 static int
@@ -2119,7 +2160,7 @@ iawtopctl(SDev *, Cmdbuf *cmd)
 	return 0;
 }
 
-SDifc sd63xxesbifc = {
+SDifc sdiahciifc = {
 	"iahci",
 
 	iapnp,

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

@@ -75,13 +75,13 @@ Type types[] = {
 #include "sd.h"
 
 extern SDifc sdataifc;
-extern SDifc sd63xxesbifc;
+extern SDifc sdiahciifc;
 
 #ifdef NOSCSI
 
 SDifc* sdifc[] = {
 	&sdataifc,
-	&sd63xxesbifc,
+	&sdiahciifc,
 	nil,
 };
 
@@ -93,7 +93,7 @@ SDifc* sdifc[] = {
 	&sdataifc,
 	&sdmylexifc,
 	&sd53c8xxifc,
-	&sd63xxesbifc,
+	&sdiahciifc,
 	nil,
 };
 

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

@@ -46,7 +46,7 @@ LOAD=\
 	sdata.$O\
 	sdmylex.$O\
 	sd53c8xx.$O\
-	sd63xxesb.$O\
+	sdiahci.$O\
 	sdscsi.$O\
 
 ETHER=\

+ 17 - 11
sys/src/boot/pc/sd63xxesb.c → sys/src/boot/pc/sdiahci.c

@@ -57,7 +57,7 @@ static char *diskstates[Dlast] = {
 	"portreset",
 };
 
-extern SDifc sd63xxesbifc;
+extern SDifc sdiahciifc;
 typedef struct Ctlr Ctlr;
 
 enum {
@@ -633,6 +633,7 @@ ahciconf(Ctlr *c)
 {
 	u32int u;
 	Ahba *h;
+	static int count;
 
 	h = c->hba = (Ahba*)c->mmio;
 	u = h->cap;
@@ -640,7 +641,8 @@ ahciconf(Ctlr *c)
 	if((u&Hsam) == 0)
 		h->ghc |= Hae;
 
-	print("ahci hba sss %d; ncs %d; coal %d; mports %d; led %d; clo %d; ems %d;\n",
+	print("ahci%d port %#p: hba sss %d; ncs %d; coal %d; mports %d; "
+		"led %d; clo %d; ems %d;\n", count++, 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);
@@ -1106,12 +1108,14 @@ iaenable(SDev *s)
 	c = s->ctlr;
 	ilock(c);
 	if(!c->enabled) {
+		if(c->ndrive == 0)
+			panic("iaenable: zero s->ctlr->ndrive");
 		pcisetbme(c->pci);
 		setvec(c->irq + VectorPIC, iainterrupt, c);
 		/* supposed to squelch leftover interrupts here. */
 		ahcienable(c->hba);
+		c->enabled = 1;
 	}
-	c->enabled = 1;
 	iunlock(c);
 	return 1;
 }
@@ -1508,11 +1512,11 @@ iapnp(void)
 	SDev *head, *tail, *s;
 	static int done;
 
-	if(done++)
+	if(done)
 		return nil;
+	done = 1;
 	p = nil;
-	head = nil;
-	tail = nil;
+	head = tail = nil;
 loop:
 	while((p = pcimatch(p, 0x8086, 0)) != nil){
 		if((p->did & 0xfffc) != 0x2680 &&	/* esb */
@@ -1527,7 +1531,9 @@ loop:
 		memset(c, 0, sizeof *c);
 		memset(s, 0, sizeof *s);
 		io = p->mem[Abar].bar & ~0xf;
-		c->mmio = (uchar*)upamalloc(io, p->mem[0].size, 0);
+		if (io == 0)
+			continue;
+		c->mmio = (uchar*)upamalloc(io, p->mem[Abar].size, 0);
 		if(c->mmio == 0){
 			print("iapnp: address 0x%luX in use did=%x\n", io, p->did);
 			continue;
@@ -1541,14 +1547,14 @@ loop:
 		if(iaahcimode(p) == -1)
 			break;
 		if(nunit < 1){
-//			vunmap(c->mmio, p->mem[0].size);
+//			vunmap(c->mmio, p->mem[Abar].size);
 			continue;
 		}
 		niactlr++;
 		i = (c->hba->cap>>21) & 1;
 		print("intel 63[12]xesb: sata-%s ports with %d ports\n",
 			"I\0II" + i*2, nunit);
-		s->ifc = &sd63xxesbifc;
+		s->ifc = &sdiahciifc;
 		s->ctlr = c;
 		s->nunit = nunit;
 		s->idno = 'E';
@@ -1602,7 +1608,7 @@ iaid(SDev* sdev)
 	int i;
 
 	for(; sdev; sdev = sdev->next){
-		if(sdev->ifc != &sd63xxesbifc)
+		if(sdev->ifc != &sdiahciifc)
 			continue;
 		c = sdev->ctlr;
 		for(i = 0; i < NCtlr; i++)
@@ -1612,7 +1618,7 @@ iaid(SDev* sdev)
 	return nil;
 }
 
-SDifc sd63xxesbifc = {
+SDifc sdiahciifc = {
 	"iahci",
 
 	iapnp,