Browse Source

Plan 9 from Bell Labs 2004-12-22

David du Colombier 16 years ago
parent
commit
f9fc5ee788

+ 44 - 73
dist/replica/_plan9.db

@@ -1,15 +1,15 @@
 386 - 20000000775 sys sys 1010957353 0
 386/9load - 775 sys sys 1100269948 208708
-386/9loaddebug - 775 sys sys 1102998038 299841
+386/9loaddebug - 775 sys sys 1103607312 299841
 386/9loadlite - 775 sys sys 1100269949 132260
 386/9loadlitedebug - 775 sys sys 1102998039 194712
-386/9pc - 775 sys sys 1102825222 1832889
+386/9pc - 775 sys sys 1103607315 1833348
 386/9pc.gz - 664 sys sys 1077049336 635727
-386/9pccpu - 775 sys sys 1102825226 1487882
+386/9pccpu - 775 sys sys 1103607317 1488341
 386/9pccpu.gz - 664 sys sys 1077049387 519909
-386/9pcdisk - 775 sys sys 1102825230 2038279
+386/9pcdisk - 775 sys sys 1103607321 2038738
 386/9pcdisk.gz - 664 sys sys 1040006345 703136
-386/9pcf - 775 sys sys 1102825235 2371314
+386/9pcf - 775 sys sys 1103602452 2371797
 386/9pcf.gz - 664 sys sys 1077049490 872650
 386/9pxeload - 775 sys sys 1100269949 208708
 386/_9pcdisk.gz - 664 sys sys 1039764191 695837
@@ -20,7 +20,7 @@
 386/bin/9660srv - 775 sys sys 1102171648 103938
 386/bin/aan - 775 sys sys 1102171649 130675
 386/bin/acid - 775 sys sys 1102171650 355721
-386/bin/acme - 775 sys sys 1102171651 427083
+386/bin/acme - 775 sys sys 1103607302 427241
 386/bin/ape - 20000000775 sys sys 1016944144 0
 386/bin/ape/basename - 775 sys sys 1087442501 132681
 386/bin/ape/cc - 775 sys sys 1102171651 70256
@@ -39,7 +39,7 @@
 386/bin/ape/uname - 775 sys sys 1087442505 132510
 386/bin/aquarela - 775 sys sys 1064598027 319170
 386/bin/ar - 775 sys sys 1102171652 107403
-386/bin/archfs - 775 sys sys 1102171652 140744
+386/bin/archfs - 775 sys sys 1103607302 140744
 386/bin/ascii - 775 sys sys 1102171653 64633
 386/bin/astro - 775 sys sys 1085076975 138775
 386/bin/auth - 20000000775 sys sys 1016920815 0
@@ -53,7 +53,7 @@
 386/bin/auth/debug - 775 sys sys 1102171656 101029
 386/bin/auth/disable - 775 sys sys 1020319057 146
 386/bin/auth/enable - 775 sys sys 1020319057 134
-386/bin/auth/factotum - 775 sys sys 1102393465 313832
+386/bin/auth/factotum - 775 sys sys 1103607303 313832
 386/bin/auth/fgui - 775 sys sys 1102171657 217758
 386/bin/auth/guard.srv - 775 sys sys 1102171658 142815
 386/bin/auth/iam - 775 sys sys 1085076981 50791
@@ -85,7 +85,7 @@
 386/bin/aux/accupoint - 775 sys sys 1085076988 40013
 386/bin/aux/acidleak - 775 sys sys 1102171665 69382
 386/bin/aux/antiword - 775 sys sys 1070288096 511478
-386/bin/aux/apm - 775 sys sys 1102171665 174060
+386/bin/aux/apm - 775 sys sys 1103607304 174060
 386/bin/aux/astarld - 775 sys sys 1102171666 64657
 386/bin/aux/cddb - 775 sys sys 1102171666 71959
 386/bin/aux/clog - 775 sys sys 1102171666 66415
@@ -94,11 +94,11 @@
 386/bin/aux/cropmarks - 775 sys sys 1020319062 1808
 386/bin/aux/data2s - 775 sys sys 1102171667 60502
 386/bin/aux/depend - 775 sys sys 1102171667 145483
-386/bin/aux/disksim - 775 sys sys 1102171668 144313
+386/bin/aux/disksim - 775 sys sys 1103607304 144313
 386/bin/aux/download - 775 sys sys 1087442506 176016
 386/bin/aux/faxreceive - 775 sys sys 1102171668 83901
 386/bin/aux/faxsend - 775 sys sys 1102171668 89413
-386/bin/aux/flashfs - 775 sys sys 1102171669 160251
+386/bin/aux/flashfs - 775 sys sys 1103607304 160251
 386/bin/aux/g3p9bit - 775 sys sys 1102171669 67243
 386/bin/aux/getflags - 775 sys sys 1085076993 43818
 386/bin/aux/grabit - 775 sys sys 1020319063 1244
@@ -120,7 +120,7 @@
 386/bin/aux/na - 775 sys sys 1102171672 154600
 386/bin/aux/nfsmount - 775 sys sys 1102171673 234057
 386/bin/aux/nfsserver - 775 sys sys 1102171674 185376
-386/bin/aux/olefs - 775 sys sys 1102171674 143224
+386/bin/aux/olefs - 775 sys sys 1103607305 143224
 386/bin/aux/p9bitpost - 775 sys sys 1102171674 127939
 386/bin/aux/pcmcia - 775 sys sys 1099800610 46870
 386/bin/aux/pcnfsd - 775 sys sys 1102171675 129304
@@ -137,7 +137,7 @@
 386/bin/aux/sprog - 775 sys sys 1102171677 79314
 386/bin/aux/ssh_genkey - 775 sys sys 1045537957 194629
 386/bin/aux/sshserve - 775 sys sys 1102171678 251446
-386/bin/aux/stub - 775 sys sys 1102171678 135027
+386/bin/aux/stub - 775 sys sys 1103607305 135027
 386/bin/aux/tcpostio - 775 sys sys 1094040084 200808
 386/bin/aux/text2post - 775 sys sys 1102171679 78301
 386/bin/aux/timesync - 775 sys sys 1102171679 127180
@@ -169,7 +169,7 @@
 386/bin/calendar - 775 sys sys 1102171686 79300
 386/bin/cat - 775 sys sys 1085077018 37419
 386/bin/cb - 775 sys sys 1102171686 77484
-386/bin/cdfs - 775 sys sys 1102171687 161053
+386/bin/cdfs - 775 sys sys 1103607305 161053
 386/bin/cfs - 775 sys sys 1102171687 128032
 386/bin/chgrp - 775 sys sys 1102171687 59250
 386/bin/chmod - 775 sys sys 1102171687 62246
@@ -215,9 +215,9 @@
 386/bin/echo - 775 sys sys 1102171697 57320
 386/bin/ed - 775 sys sys 1102171698 92999
 386/bin/eqn - 775 sys sys 1087442511 242933
-386/bin/execnet - 775 sys sys 1102171698 171861
+386/bin/execnet - 775 sys sys 1103607306 171861
 386/bin/exportfs - 775 sys sys 1102171699 161113
-386/bin/ext2srv - 775 sys sys 1102171699 173859
+386/bin/ext2srv - 775 sys sys 1103607306 173859
 386/bin/faces - 775 sys sys 1102171700 192542
 386/bin/factor - 775 sys sys 1102171700 61440
 386/bin/file - 775 sys sys 1102171700 112323
@@ -239,7 +239,7 @@
 386/bin/fs/v10fs - 775 sys sys 1102171705 94272
 386/bin/fs/v6fs - 775 sys sys 1102171706 94190
 386/bin/fs/zipfs - 775 sys sys 1102171706 108787
-386/bin/ftpfs - 775 sys sys 1102171706 148390
+386/bin/ftpfs - 775 sys sys 1103607306 154362
 386/bin/games - 20000000775 sys sys 1096298711 0
 386/bin/games/juggle - 775 sys sys 1096341940 123161
 386/bin/games/mahjongg - 775 sys sys 1096341940 161454
@@ -312,7 +312,7 @@
 386/bin/mkdir - 775 sys sys 1102171729 60929
 386/bin/mkpaqfs - 775 sys sys 1102171729 94474
 386/bin/mkstate - 775 sys sys 1102171729 63484
-386/bin/mntgen - 775 sys sys 1102171730 135427
+386/bin/mntgen - 775 sys sys 1103607307 135427
 386/bin/mount - 775 sys sys 1102171730 72976
 386/bin/ms2html - 775 sys sys 1102171730 103550
 386/bin/mtime - 775 sys sys 1102171730 59104
@@ -332,9 +332,9 @@
 386/bin/netkey - 775 sys sys 1102171735 72272
 386/bin/netstat - 775 sys sys 1102171736 84350
 386/bin/news - 775 sys sys 1102171736 71618
-386/bin/nfs - 775 sys sys 1102171737 315354
+386/bin/nfs - 775 sys sys 1103607307 315354
 386/bin/nm - 775 sys sys 1102171737 115475
-386/bin/nntpfs - 775 sys sys 1102171738 160863
+386/bin/nntpfs - 775 sys sys 1103607308 160863
 386/bin/ns - 775 sys sys 1102171738 65225
 386/bin/p - 775 sys sys 1102171738 64947
 386/bin/page - 775 sys sys 1102171739 231685
@@ -357,7 +357,7 @@
 386/bin/pwd - 775 sys sys 1085077091 36869
 386/bin/ramfs - 775 sys sys 1102171744 88538
 386/bin/rc - 775 sys sys 1102171744 143180
-386/bin/rdbfs - 775 sys sys 1102171745 168361
+386/bin/rdbfs - 775 sys sys 1103607308 168361
 386/bin/read - 775 sys sys 1102171745 58011
 386/bin/replica - 20000000775 sys sys 1018321168 0
 386/bin/replica/applychanges - 775 sys sys 1102171745 98527
@@ -383,7 +383,7 @@
 386/bin/size - 775 sys sys 1102171751 74440
 386/bin/sleep - 775 sys sys 1085077097 3413
 386/bin/snap - 775 sys sys 1102171752 269575
-386/bin/snapfs - 775 sys sys 1102171752 338429
+386/bin/snapfs - 775 sys sys 1103607309 338429
 386/bin/sniffer - 775 sys sys 1038443185 99028
 386/bin/snoopy - 775 sys sys 1102171753 157511
 386/bin/sort - 775 sys sys 1102171753 82250
@@ -393,7 +393,7 @@
 386/bin/srvfs - 775 sys sys 1100579339 39567
 386/bin/srvold9p - 775 sys sys 1102171754 130158
 386/bin/ssh - 775 sys sys 1102171755 210982
-386/bin/sshnet - 775 sys sys 1102171755 282682
+386/bin/sshnet - 775 sys sys 1103607309 282682
 386/bin/stats - 775 sys sys 1102171756 189953
 386/bin/strings - 775 sys sys 1102171756 62089
 386/bin/strip - 775 sys sys 1102171756 61946
@@ -488,10 +488,10 @@
 386/bin/vt - 775 sys sys 1102171788 172830
 386/bin/vtdump - 775 sys sys 1102171789 159416
 386/bin/wc - 775 sys sys 1085077129 41133
-386/bin/webcookies - 775 sys sys 1102171789 161470
-386/bin/webfs - 775 sys sys 1102171790 349695
+386/bin/webcookies - 775 sys sys 1103607310 161470
+386/bin/webfs - 775 sys sys 1103607311 349695
 386/bin/webfsget - 775 sys sys 1085077130 39115
-386/bin/wikifs - 775 sys sys 1102171791 201134
+386/bin/wikifs - 775 sys sys 1103607311 201134
 386/bin/winwatch - 775 sys sys 1102171791 143347
 386/bin/xd - 775 sys sys 1102171791 64004
 386/bin/xmr - 775 sys sys 1085077131 40129
@@ -521,7 +521,7 @@
 386/lib/ape/libregexp.a - 664 sys sys 1089402372 47670
 386/lib/ape/libutf.a - 664 sys sys 1089402372 81266
 386/lib/ape/libv.a - 664 sys sys 1089402372 19668
-386/lib/lib9p.a - 664 sys sys 1102171816 79300
+386/lib/lib9p.a - 664 sys sys 1103607322 79300
 386/lib/libString.a - 664 sys sys 1102171816 22184
 386/lib/libauth.a - 664 sys sys 1102171817 56134
 386/lib/libauthsrv.a - 664 sys sys 1102171817 33522
@@ -537,19 +537,19 @@
 386/lib/libgeometry.a - 664 sys sys 1102171821 50470
 386/lib/libhtml.a - 664 sys sys 1102171822 219972
 386/lib/libhttpd.a - 664 sys sys 1102171822 99488
-386/lib/libip.a - 664 sys sys 1102171822 35268
+386/lib/libip.a - 664 sys sys 1103607322 35602
 386/lib/libl.a - 664 sys sys 1102171822 5384
 386/lib/libmach.a - 664 sys sys 1102171824 652274
 386/lib/libmemdraw.a - 664 sys sys 1102171825 283188
 386/lib/libmemlayer.a - 664 sys sys 1102171825 47360
 386/lib/libmp.a - 664 sys sys 1102171825 79532
-386/lib/libndb.a - 664 sys sys 1102171825 60666
+386/lib/libndb.a - 664 sys sys 1103607322 60666
 386/lib/libplumb.a - 664 sys sys 1102171825 18876
 386/lib/libregexp.a - 664 sys sys 1102171826 37464
 386/lib/libscribble.a - 664 sys sys 1102171826 107280
 386/lib/libsec.a - 664 sys sys 1102171828 643958
 386/lib/libstdio.a - 664 sys sys 1102171828 126382
-386/lib/libsunrpc.a - 664 sys sys 1102171829 355994
+386/lib/libsunrpc.a - 664 sys sys 1103607323 355994
 386/lib/libthread.a - 664 sys sys 1102171830 71162
 386/lib/libventi.a - 664 sys sys 1102171830 97708
 386/mbr - 775 sys sys 1022125974 407
@@ -615,7 +615,7 @@ acme/bin/386/acd - 775 sys sys 1032232412 137068
 acme/bin/386/adict - 775 sys sys 1015011247 99806
 acme/bin/386/mkwnew - 775 sys sys 1085077134 38931
 acme/bin/386/spout - 775 sys sys 1102171815 61582
-acme/bin/386/win - 775 sys sys 1102171815 178910
+acme/bin/386/win - 775 sys sys 1103607322 178910
 acme/bin/Battery - 775 sys sys 1017457907 451
 acme/bin/Isspam - 775 sys sys 1063951165 235
 acme/bin/Perl - 775 sys sys 1015011260 230
@@ -5365,7 +5365,7 @@ sys/src/9/pc/ether589.c - 664 sys sys 1015014516 4644
 sys/src/9/pc/ether79c970.c - 664 sys sys 1071245466 14094
 sys/src/9/pc/ether8003.c - 664 sys sys 1015014516 6665
 sys/src/9/pc/ether8139.c - 664 sys sys 1086987324 18362
-sys/src/9/pc/ether8169.c - 664 sys sys 1103232343 22378
+sys/src/9/pc/ether8169.c - 664 sys sys 1103641602 22531
 sys/src/9/pc/ether82543gc.c - 664 sys sys 1055689887 32296
 sys/src/9/pc/ether82557.c - 664 sys sys 1098848151 30040
 sys/src/9/pc/ether83815.c - 664 sys sys 1081706477 23479
@@ -5503,7 +5503,7 @@ sys/src/9/port/error.h - 664 sys sys 1055700517 2630
 sys/src/9/port/fault.c - 664 sys sys 1067722722 6628
 sys/src/9/port/initcode.c - 664 sys sys 1055688491 574
 sys/src/9/port/latin1.c - 664 sys sys 1015278339 1418
-sys/src/9/port/latin1.h - 664 sys sys 1102429178 3559
+sys/src/9/port/latin1.h - 664 sys sys 1103633666 3563
 sys/src/9/port/lib.h - 664 sys sys 1091733556 5737
 sys/src/9/port/log.c - 664 sys sys 1014931175 2860
 sys/src/9/port/master - 664 sys sys 1063856961 516
@@ -6484,9 +6484,9 @@ sys/src/boot/pc/apm.c - 664 sys sys 1015007947 289
 sys/src/boot/pc/bcom.c - 664 sys sys 1032215919 6421
 sys/src/boot/pc/boot.c - 664 sys sys 1021579983 3353
 sys/src/boot/pc/bootld.c - 664 sys sys 1015007948 1801
-sys/src/boot/pc/bootp.c - 664 sys sys 1094674486 12069
+sys/src/boot/pc/bootp.c - 664 sys sys 1103641772 12262
 sys/src/boot/pc/cga.c - 664 sys sys 1015007948 1362
-sys/src/boot/pc/clock.c - 664 sys sys 1102966794 5918
+sys/src/boot/pc/clock.c - 664 sys sys 1103641772 6425
 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/dat.h - 664 sys sys 1094674488 3518
@@ -6500,13 +6500,14 @@ sys/src/boot/pc/dosboot.c - 664 sys sys 1097716791 11240
 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 1094674486 5055
+sys/src/boot/pc/ether.c - 664 sys sys 1103641772 5120
 sys/src/boot/pc/ether2000.c - 664 sys sys 1015007950 2609
 sys/src/boot/pc/ether2114x.c - 664 sys sys 1066618033 37048
 sys/src/boot/pc/ether589.c - 664 sys sys 1015007950 4628
 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 1102429126 14806
+sys/src/boot/pc/ether8169.c - 664 sys sys 1103641772 18622
 sys/src/boot/pc/ether82557.c - 664 sys sys 1098848150 18911
 sys/src/boot/pc/ether83815.c - 664 sys sys 1019537742 19576
 sys/src/boot/pc/ether8390.c - 664 sys sys 1015007951 16065
@@ -6516,7 +6517,7 @@ sys/src/boot/pc/etherelnk3.c - 664 sys sys 1034454878 44068
 sys/src/boot/pc/etherelnk3x.c - 664 sys sys 1015007951 24989
 sys/src/boot/pc/etherif.h - 664 sys sys 1096379797 1285
 sys/src/boot/pc/etherigbe.c - 664 sys sys 1096379796 39825
-sys/src/boot/pc/ethermii.c - 664 sys sys 1071175087 4493
+sys/src/boot/pc/ethermii.c - 664 sys sys 1103641771 4413
 sys/src/boot/pc/ethermii.h - 664 sys sys 1071175087 3259
 sys/src/boot/pc/etherrhine.c - 664 sys sys 1071175087 12403
 sys/src/boot/pc/fns.h - 664 sys sys 1094674488 4146
@@ -6529,13 +6530,13 @@ sys/src/boot/pc/ip.h - 664 sys sys 1094674489 2461
 sys/src/boot/pc/kbd.c - 664 sys sys 1015007952 10188
 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 1094674488 13107
+sys/src/boot/pc/l.s - 664 sys sys 1103641771 13843
 sys/src/boot/pc/lib.h - 664 sys sys 1094674487 2794
 sys/src/boot/pc/load.c - 664 sys sys 1094674484 8635
 sys/src/boot/pc/mbr.s - 664 sys sys 1015007953 6234
-sys/src/boot/pc/mem.h - 664 sys sys 1015007953 3407
+sys/src/boot/pc/mem.h - 664 sys sys 1103641771 3371
 sys/src/boot/pc/memory.c - 664 sys sys 1019533021 10272
-sys/src/boot/pc/mkfile - 664 sys sys 1094700526 3090
+sys/src/boot/pc/mkfile - 664 sys sys 1103641863 3105
 sys/src/boot/pc/noether.c - 664 sys sys 1094674488 358
 sys/src/boot/pc/part.c - 664 sys sys 1032215918 7505
 sys/src/boot/pc/pbs.s - 664 sys sys 1017854325 8279
@@ -6803,7 +6804,7 @@ sys/src/cmd/acme/mkfile - 664 sys sys 1058463682 543
 sys/src/cmd/acme/regx.c - 664 sys sys 1014926094 16057
 sys/src/cmd/acme/rows.c - 664 sys sys 1103565437 14702
 sys/src/cmd/acme/scrl.c - 664 sys sys 1014926095 3072
-sys/src/cmd/acme/text.c - 664 sys sys 1099500744 27642
+sys/src/cmd/acme/text.c - 664 sys sys 1103606882 27652
 sys/src/cmd/acme/time.c - 664 sys sys 1014926095 1783
 sys/src/cmd/acme/util.c - 664 sys sys 1100535510 7208
 sys/src/cmd/acme/wind.c - 664 sys sys 1096388102 11187
@@ -10434,7 +10435,7 @@ sys/src/cmd/tapefs/v10fs.c - 664 sys sys 1014926385 3754
 sys/src/cmd/tapefs/v6fs.c - 664 sys sys 1014926385 3971
 sys/src/cmd/tapefs/zip.h - 664 sys sys 1097914153 1428
 sys/src/cmd/tapefs/zipfs.c - 664 sys sys 1097900277 6803
-sys/src/cmd/tar.c - 664 sys sys 1101909630 15630
+sys/src/cmd/tar.c - 664 sys sys 1103607141 15725
 sys/src/cmd/tbl - 20000000775 sys sys 954038038 0
 sys/src/cmd/tbl/mkfile - 664 sys sys 944961243 268
 sys/src/cmd/tbl/t.h - 664 sys sys 944961244 3987
@@ -12395,34 +12396,4 @@ usr/glenda/lib/profile - 664 glenda glenda 1021580005 847
 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
-386/9loaddebug - 775 sys sys 1103602426 299841
-386/9pc - 775 sys sys 1103602433 1833348
-386/9pccpu - 775 sys sys 1103602438 1488341
-386/9pcdisk - 775 sys sys 1103602445 2038738
-386/9pcf - 775 sys sys 1103602452 2371797
-386/bin/acme - 775 sys sys 1103602411 427241
-386/bin/archfs - 775 sys sys 1103602412 140744
-386/bin/cdfs - 775 sys sys 1103602415 161053
-386/bin/nntpfs - 775 sys sys 1103602419 160863
-386/bin/snapfs - 775 sys sys 1103602421 338429
-386/bin/webcookies - 775 sys sys 1103602422 161470
-386/bin/wikifs - 775 sys sys 1103602424 201134
-386/bin/ftpfs - 775 sys sys 1103602416 154362
-386/bin/rdbfs - 775 sys sys 1103602419 168361
-386/bin/webfs - 775 sys sys 1103602423 349695
-386/bin/auth/factotum - 775 sys sys 1103602412 313832
-386/bin/aux/apm - 775 sys sys 1103602413 174060
-386/bin/aux/disksim - 775 sys sys 1103602413 144313
-386/bin/aux/flashfs - 775 sys sys 1103602414 160251
-386/bin/aux/olefs - 775 sys sys 1103602414 143224
-386/bin/aux/stub - 775 sys sys 1103602414 135027
-386/bin/execnet - 775 sys sys 1103602415 171861
-386/bin/ext2srv - 775 sys sys 1103602416 173859
-386/bin/mntgen - 775 sys sys 1103602417 135427
-386/bin/nfs - 775 sys sys 1103602418 315354
-386/bin/sshnet - 775 sys sys 1103602422 282682
-386/lib/lib9p.a - 664 sys sys 1103602453 79300
-386/lib/libip.a - 664 sys sys 1103602453 35602
-386/lib/libndb.a - 664 sys sys 1103602454 60666
-386/lib/libsunrpc.a - 664 sys sys 1103602455 355994
-acme/bin/386/win - 775 sys sys 1103602453 178910
+386/bin/tar - 775 sys sys 1103688550 83885

+ 43 - 42
dist/replica/plan9.db

@@ -1,13 +1,13 @@
 386 - 20000000775 sys sys 1010957353 0
 386/9load - 775 sys sys 1100269948 208708
-386/9loaddebug - 775 sys sys 1103602426 299841
+386/9loaddebug - 775 sys sys 1103607312 299841
 386/9loadlite - 775 sys sys 1100269949 132260
 386/9loadlitedebug - 775 sys sys 1102998039 194712
-386/9pc - 775 sys sys 1103602433 1833348
+386/9pc - 775 sys sys 1103607315 1833348
 386/9pc.gz - 664 sys sys 1077049336 635727
-386/9pccpu - 775 sys sys 1103602438 1488341
+386/9pccpu - 775 sys sys 1103607317 1488341
 386/9pccpu.gz - 664 sys sys 1077049387 519909
-386/9pcdisk - 775 sys sys 1103602445 2038738
+386/9pcdisk - 775 sys sys 1103607321 2038738
 386/9pcdisk.gz - 664 sys sys 1040006345 703136
 386/9pcf - 775 sys sys 1103602452 2371797
 386/9pcf.gz - 664 sys sys 1077049490 872650
@@ -20,7 +20,7 @@
 386/bin/9660srv - 775 sys sys 1102171648 103938
 386/bin/aan - 775 sys sys 1102171649 130675
 386/bin/acid - 775 sys sys 1102171650 355721
-386/bin/acme - 775 sys sys 1103602411 427241
+386/bin/acme - 775 sys sys 1103607302 427241
 386/bin/ape - 20000000775 sys sys 1016944144 0
 386/bin/ape/basename - 775 sys sys 1087442501 132681
 386/bin/ape/cc - 775 sys sys 1102171651 70256
@@ -39,7 +39,7 @@
 386/bin/ape/uname - 775 sys sys 1087442505 132510
 386/bin/aquarela - 775 sys sys 1064598027 319170
 386/bin/ar - 775 sys sys 1102171652 107403
-386/bin/archfs - 775 sys sys 1103602412 140744
+386/bin/archfs - 775 sys sys 1103607302 140744
 386/bin/ascii - 775 sys sys 1102171653 64633
 386/bin/astro - 775 sys sys 1085076975 138775
 386/bin/auth - 20000000775 sys sys 1016920815 0
@@ -53,7 +53,7 @@
 386/bin/auth/debug - 775 sys sys 1102171656 101029
 386/bin/auth/disable - 775 sys sys 1020319057 146
 386/bin/auth/enable - 775 sys sys 1020319057 134
-386/bin/auth/factotum - 775 sys sys 1103602412 313832
+386/bin/auth/factotum - 775 sys sys 1103607303 313832
 386/bin/auth/fgui - 775 sys sys 1102171657 217758
 386/bin/auth/guard.srv - 775 sys sys 1102171658 142815
 386/bin/auth/iam - 775 sys sys 1085076981 50791
@@ -85,7 +85,7 @@
 386/bin/aux/accupoint - 775 sys sys 1085076988 40013
 386/bin/aux/acidleak - 775 sys sys 1102171665 69382
 386/bin/aux/antiword - 775 sys sys 1070288096 511478
-386/bin/aux/apm - 775 sys sys 1103602413 174060
+386/bin/aux/apm - 775 sys sys 1103607304 174060
 386/bin/aux/astarld - 775 sys sys 1102171666 64657
 386/bin/aux/cddb - 775 sys sys 1102171666 71959
 386/bin/aux/clog - 775 sys sys 1102171666 66415
@@ -94,11 +94,11 @@
 386/bin/aux/cropmarks - 775 sys sys 1020319062 1808
 386/bin/aux/data2s - 775 sys sys 1102171667 60502
 386/bin/aux/depend - 775 sys sys 1102171667 145483
-386/bin/aux/disksim - 775 sys sys 1103602413 144313
+386/bin/aux/disksim - 775 sys sys 1103607304 144313
 386/bin/aux/download - 775 sys sys 1087442506 176016
 386/bin/aux/faxreceive - 775 sys sys 1102171668 83901
 386/bin/aux/faxsend - 775 sys sys 1102171668 89413
-386/bin/aux/flashfs - 775 sys sys 1103602414 160251
+386/bin/aux/flashfs - 775 sys sys 1103607304 160251
 386/bin/aux/g3p9bit - 775 sys sys 1102171669 67243
 386/bin/aux/getflags - 775 sys sys 1085076993 43818
 386/bin/aux/grabit - 775 sys sys 1020319063 1244
@@ -120,7 +120,7 @@
 386/bin/aux/na - 775 sys sys 1102171672 154600
 386/bin/aux/nfsmount - 775 sys sys 1102171673 234057
 386/bin/aux/nfsserver - 775 sys sys 1102171674 185376
-386/bin/aux/olefs - 775 sys sys 1103602414 143224
+386/bin/aux/olefs - 775 sys sys 1103607305 143224
 386/bin/aux/p9bitpost - 775 sys sys 1102171674 127939
 386/bin/aux/pcmcia - 775 sys sys 1099800610 46870
 386/bin/aux/pcnfsd - 775 sys sys 1102171675 129304
@@ -137,7 +137,7 @@
 386/bin/aux/sprog - 775 sys sys 1102171677 79314
 386/bin/aux/ssh_genkey - 775 sys sys 1045537957 194629
 386/bin/aux/sshserve - 775 sys sys 1102171678 251446
-386/bin/aux/stub - 775 sys sys 1103602414 135027
+386/bin/aux/stub - 775 sys sys 1103607305 135027
 386/bin/aux/tcpostio - 775 sys sys 1094040084 200808
 386/bin/aux/text2post - 775 sys sys 1102171679 78301
 386/bin/aux/timesync - 775 sys sys 1102171679 127180
@@ -169,7 +169,7 @@
 386/bin/calendar - 775 sys sys 1102171686 79300
 386/bin/cat - 775 sys sys 1085077018 37419
 386/bin/cb - 775 sys sys 1102171686 77484
-386/bin/cdfs - 775 sys sys 1103602415 161053
+386/bin/cdfs - 775 sys sys 1103607305 161053
 386/bin/cfs - 775 sys sys 1102171687 128032
 386/bin/chgrp - 775 sys sys 1102171687 59250
 386/bin/chmod - 775 sys sys 1102171687 62246
@@ -215,9 +215,9 @@
 386/bin/echo - 775 sys sys 1102171697 57320
 386/bin/ed - 775 sys sys 1102171698 92999
 386/bin/eqn - 775 sys sys 1087442511 242933
-386/bin/execnet - 775 sys sys 1103602415 171861
+386/bin/execnet - 775 sys sys 1103607306 171861
 386/bin/exportfs - 775 sys sys 1102171699 161113
-386/bin/ext2srv - 775 sys sys 1103602416 173859
+386/bin/ext2srv - 775 sys sys 1103607306 173859
 386/bin/faces - 775 sys sys 1102171700 192542
 386/bin/factor - 775 sys sys 1102171700 61440
 386/bin/file - 775 sys sys 1102171700 112323
@@ -239,7 +239,7 @@
 386/bin/fs/v10fs - 775 sys sys 1102171705 94272
 386/bin/fs/v6fs - 775 sys sys 1102171706 94190
 386/bin/fs/zipfs - 775 sys sys 1102171706 108787
-386/bin/ftpfs - 775 sys sys 1103602416 154362
+386/bin/ftpfs - 775 sys sys 1103607306 154362
 386/bin/games - 20000000775 sys sys 1096298711 0
 386/bin/games/juggle - 775 sys sys 1096341940 123161
 386/bin/games/mahjongg - 775 sys sys 1096341940 161454
@@ -312,7 +312,7 @@
 386/bin/mkdir - 775 sys sys 1102171729 60929
 386/bin/mkpaqfs - 775 sys sys 1102171729 94474
 386/bin/mkstate - 775 sys sys 1102171729 63484
-386/bin/mntgen - 775 sys sys 1103602417 135427
+386/bin/mntgen - 775 sys sys 1103607307 135427
 386/bin/mount - 775 sys sys 1102171730 72976
 386/bin/ms2html - 775 sys sys 1102171730 103550
 386/bin/mtime - 775 sys sys 1102171730 59104
@@ -332,9 +332,9 @@
 386/bin/netkey - 775 sys sys 1102171735 72272
 386/bin/netstat - 775 sys sys 1102171736 84350
 386/bin/news - 775 sys sys 1102171736 71618
-386/bin/nfs - 775 sys sys 1103602418 315354
+386/bin/nfs - 775 sys sys 1103607307 315354
 386/bin/nm - 775 sys sys 1102171737 115475
-386/bin/nntpfs - 775 sys sys 1103602419 160863
+386/bin/nntpfs - 775 sys sys 1103607308 160863
 386/bin/ns - 775 sys sys 1102171738 65225
 386/bin/p - 775 sys sys 1102171738 64947
 386/bin/page - 775 sys sys 1102171739 231685
@@ -357,7 +357,7 @@
 386/bin/pwd - 775 sys sys 1085077091 36869
 386/bin/ramfs - 775 sys sys 1102171744 88538
 386/bin/rc - 775 sys sys 1102171744 143180
-386/bin/rdbfs - 775 sys sys 1103602419 168361
+386/bin/rdbfs - 775 sys sys 1103607308 168361
 386/bin/read - 775 sys sys 1102171745 58011
 386/bin/replica - 20000000775 sys sys 1018321168 0
 386/bin/replica/applychanges - 775 sys sys 1102171745 98527
@@ -383,7 +383,7 @@
 386/bin/size - 775 sys sys 1102171751 74440
 386/bin/sleep - 775 sys sys 1085077097 3413
 386/bin/snap - 775 sys sys 1102171752 269575
-386/bin/snapfs - 775 sys sys 1103602421 338429
+386/bin/snapfs - 775 sys sys 1103607309 338429
 386/bin/sniffer - 775 sys sys 1038443185 99028
 386/bin/snoopy - 775 sys sys 1102171753 157511
 386/bin/sort - 775 sys sys 1102171753 82250
@@ -393,7 +393,7 @@
 386/bin/srvfs - 775 sys sys 1100579339 39567
 386/bin/srvold9p - 775 sys sys 1102171754 130158
 386/bin/ssh - 775 sys sys 1102171755 210982
-386/bin/sshnet - 775 sys sys 1103602422 282682
+386/bin/sshnet - 775 sys sys 1103607309 282682
 386/bin/stats - 775 sys sys 1102171756 189953
 386/bin/strings - 775 sys sys 1102171756 62089
 386/bin/strip - 775 sys sys 1102171756 61946
@@ -401,7 +401,7 @@
 386/bin/swap - 775 sys sys 1102171757 62059
 386/bin/syscall - 775 sys sys 1102171757 73501
 386/bin/tail - 775 sys sys 1102171757 65903
-386/bin/tar - 775 sys sys 1102171757 83838
+386/bin/tar - 775 sys sys 1103688550 83885
 386/bin/tbl - 775 sys sys 1102171758 113089
 386/bin/tcs - 775 sys sys 1085077103 256506
 386/bin/tee - 775 sys sys 1085077104 38401
@@ -488,10 +488,10 @@
 386/bin/vt - 775 sys sys 1102171788 172830
 386/bin/vtdump - 775 sys sys 1102171789 159416
 386/bin/wc - 775 sys sys 1085077129 41133
-386/bin/webcookies - 775 sys sys 1103602422 161470
-386/bin/webfs - 775 sys sys 1103602423 349695
+386/bin/webcookies - 775 sys sys 1103607310 161470
+386/bin/webfs - 775 sys sys 1103607311 349695
 386/bin/webfsget - 775 sys sys 1085077130 39115
-386/bin/wikifs - 775 sys sys 1103602424 201134
+386/bin/wikifs - 775 sys sys 1103607311 201134
 386/bin/winwatch - 775 sys sys 1102171791 143347
 386/bin/xd - 775 sys sys 1102171791 64004
 386/bin/xmr - 775 sys sys 1085077131 40129
@@ -521,7 +521,7 @@
 386/lib/ape/libregexp.a - 664 sys sys 1089402372 47670
 386/lib/ape/libutf.a - 664 sys sys 1089402372 81266
 386/lib/ape/libv.a - 664 sys sys 1089402372 19668
-386/lib/lib9p.a - 664 sys sys 1103602453 79300
+386/lib/lib9p.a - 664 sys sys 1103607322 79300
 386/lib/libString.a - 664 sys sys 1102171816 22184
 386/lib/libauth.a - 664 sys sys 1102171817 56134
 386/lib/libauthsrv.a - 664 sys sys 1102171817 33522
@@ -537,19 +537,19 @@
 386/lib/libgeometry.a - 664 sys sys 1102171821 50470
 386/lib/libhtml.a - 664 sys sys 1102171822 219972
 386/lib/libhttpd.a - 664 sys sys 1102171822 99488
-386/lib/libip.a - 664 sys sys 1103602453 35602
+386/lib/libip.a - 664 sys sys 1103607322 35602
 386/lib/libl.a - 664 sys sys 1102171822 5384
 386/lib/libmach.a - 664 sys sys 1102171824 652274
 386/lib/libmemdraw.a - 664 sys sys 1102171825 283188
 386/lib/libmemlayer.a - 664 sys sys 1102171825 47360
 386/lib/libmp.a - 664 sys sys 1102171825 79532
-386/lib/libndb.a - 664 sys sys 1103602454 60666
+386/lib/libndb.a - 664 sys sys 1103607322 60666
 386/lib/libplumb.a - 664 sys sys 1102171825 18876
 386/lib/libregexp.a - 664 sys sys 1102171826 37464
 386/lib/libscribble.a - 664 sys sys 1102171826 107280
 386/lib/libsec.a - 664 sys sys 1102171828 643958
 386/lib/libstdio.a - 664 sys sys 1102171828 126382
-386/lib/libsunrpc.a - 664 sys sys 1103602455 355994
+386/lib/libsunrpc.a - 664 sys sys 1103607323 355994
 386/lib/libthread.a - 664 sys sys 1102171830 71162
 386/lib/libventi.a - 664 sys sys 1102171830 97708
 386/mbr - 775 sys sys 1022125974 407
@@ -615,7 +615,7 @@ acme/bin/386/acd - 775 sys sys 1032232412 137068
 acme/bin/386/adict - 775 sys sys 1015011247 99806
 acme/bin/386/mkwnew - 775 sys sys 1085077134 38931
 acme/bin/386/spout - 775 sys sys 1102171815 61582
-acme/bin/386/win - 775 sys sys 1103602453 178910
+acme/bin/386/win - 775 sys sys 1103607322 178910
 acme/bin/Battery - 775 sys sys 1017457907 451
 acme/bin/Isspam - 775 sys sys 1063951165 235
 acme/bin/Perl - 775 sys sys 1015011260 230
@@ -5365,7 +5365,7 @@ sys/src/9/pc/ether589.c - 664 sys sys 1015014516 4644
 sys/src/9/pc/ether79c970.c - 664 sys sys 1071245466 14094
 sys/src/9/pc/ether8003.c - 664 sys sys 1015014516 6665
 sys/src/9/pc/ether8139.c - 664 sys sys 1086987324 18362
-sys/src/9/pc/ether8169.c - 664 sys sys 1103232343 22378
+sys/src/9/pc/ether8169.c - 664 sys sys 1103641602 22531
 sys/src/9/pc/ether82543gc.c - 664 sys sys 1055689887 32296
 sys/src/9/pc/ether82557.c - 664 sys sys 1098848151 30040
 sys/src/9/pc/ether83815.c - 664 sys sys 1081706477 23479
@@ -5503,7 +5503,7 @@ sys/src/9/port/error.h - 664 sys sys 1055700517 2630
 sys/src/9/port/fault.c - 664 sys sys 1067722722 6628
 sys/src/9/port/initcode.c - 664 sys sys 1055688491 574
 sys/src/9/port/latin1.c - 664 sys sys 1015278339 1418
-sys/src/9/port/latin1.h - 664 sys sys 1102429178 3559
+sys/src/9/port/latin1.h - 664 sys sys 1103633666 3563
 sys/src/9/port/lib.h - 664 sys sys 1091733556 5737
 sys/src/9/port/log.c - 664 sys sys 1014931175 2860
 sys/src/9/port/master - 664 sys sys 1063856961 516
@@ -6484,9 +6484,9 @@ sys/src/boot/pc/apm.c - 664 sys sys 1015007947 289
 sys/src/boot/pc/bcom.c - 664 sys sys 1032215919 6421
 sys/src/boot/pc/boot.c - 664 sys sys 1021579983 3353
 sys/src/boot/pc/bootld.c - 664 sys sys 1015007948 1801
-sys/src/boot/pc/bootp.c - 664 sys sys 1094674486 12069
+sys/src/boot/pc/bootp.c - 664 sys sys 1103641772 12262
 sys/src/boot/pc/cga.c - 664 sys sys 1015007948 1362
-sys/src/boot/pc/clock.c - 664 sys sys 1102966794 5918
+sys/src/boot/pc/clock.c - 664 sys sys 1103641772 6425
 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/dat.h - 664 sys sys 1094674488 3518
@@ -6500,13 +6500,14 @@ sys/src/boot/pc/dosboot.c - 664 sys sys 1097716791 11240
 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 1094674486 5055
+sys/src/boot/pc/ether.c - 664 sys sys 1103641772 5120
 sys/src/boot/pc/ether2000.c - 664 sys sys 1015007950 2609
 sys/src/boot/pc/ether2114x.c - 664 sys sys 1066618033 37048
 sys/src/boot/pc/ether589.c - 664 sys sys 1015007950 4628
 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 1102429126 14806
+sys/src/boot/pc/ether8169.c - 664 sys sys 1103641772 18622
 sys/src/boot/pc/ether82557.c - 664 sys sys 1098848150 18911
 sys/src/boot/pc/ether83815.c - 664 sys sys 1019537742 19576
 sys/src/boot/pc/ether8390.c - 664 sys sys 1015007951 16065
@@ -6516,7 +6517,7 @@ sys/src/boot/pc/etherelnk3.c - 664 sys sys 1034454878 44068
 sys/src/boot/pc/etherelnk3x.c - 664 sys sys 1015007951 24989
 sys/src/boot/pc/etherif.h - 664 sys sys 1096379797 1285
 sys/src/boot/pc/etherigbe.c - 664 sys sys 1096379796 39825
-sys/src/boot/pc/ethermii.c - 664 sys sys 1071175087 4493
+sys/src/boot/pc/ethermii.c - 664 sys sys 1103641771 4413
 sys/src/boot/pc/ethermii.h - 664 sys sys 1071175087 3259
 sys/src/boot/pc/etherrhine.c - 664 sys sys 1071175087 12403
 sys/src/boot/pc/fns.h - 664 sys sys 1094674488 4146
@@ -6529,13 +6530,13 @@ sys/src/boot/pc/ip.h - 664 sys sys 1094674489 2461
 sys/src/boot/pc/kbd.c - 664 sys sys 1015007952 10188
 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 1094674488 13107
+sys/src/boot/pc/l.s - 664 sys sys 1103641771 13843
 sys/src/boot/pc/lib.h - 664 sys sys 1094674487 2794
 sys/src/boot/pc/load.c - 664 sys sys 1094674484 8635
 sys/src/boot/pc/mbr.s - 664 sys sys 1015007953 6234
-sys/src/boot/pc/mem.h - 664 sys sys 1015007953 3407
+sys/src/boot/pc/mem.h - 664 sys sys 1103641771 3371
 sys/src/boot/pc/memory.c - 664 sys sys 1019533021 10272
-sys/src/boot/pc/mkfile - 664 sys sys 1094700526 3090
+sys/src/boot/pc/mkfile - 664 sys sys 1103641863 3105
 sys/src/boot/pc/noether.c - 664 sys sys 1094674488 358
 sys/src/boot/pc/part.c - 664 sys sys 1032215918 7505
 sys/src/boot/pc/pbs.s - 664 sys sys 1017854325 8279
@@ -6803,7 +6804,7 @@ sys/src/cmd/acme/mkfile - 664 sys sys 1058463682 543
 sys/src/cmd/acme/regx.c - 664 sys sys 1014926094 16057
 sys/src/cmd/acme/rows.c - 664 sys sys 1103565437 14702
 sys/src/cmd/acme/scrl.c - 664 sys sys 1014926095 3072
-sys/src/cmd/acme/text.c - 664 sys sys 1099500744 27642
+sys/src/cmd/acme/text.c - 664 sys sys 1103606882 27652
 sys/src/cmd/acme/time.c - 664 sys sys 1014926095 1783
 sys/src/cmd/acme/util.c - 664 sys sys 1100535510 7208
 sys/src/cmd/acme/wind.c - 664 sys sys 1096388102 11187
@@ -10434,7 +10435,7 @@ sys/src/cmd/tapefs/v10fs.c - 664 sys sys 1014926385 3754
 sys/src/cmd/tapefs/v6fs.c - 664 sys sys 1014926385 3971
 sys/src/cmd/tapefs/zip.h - 664 sys sys 1097914153 1428
 sys/src/cmd/tapefs/zipfs.c - 664 sys sys 1097900277 6803
-sys/src/cmd/tar.c - 664 sys sys 1101909630 15630
+sys/src/cmd/tar.c - 664 sys sys 1103607141 15725
 sys/src/cmd/tbl - 20000000775 sys sys 954038038 0
 sys/src/cmd/tbl/mkfile - 664 sys sys 944961243 268
 sys/src/cmd/tbl/t.h - 664 sys sys 944961244 3987

+ 43 - 0
dist/replica/plan9.log

@@ -17658,3 +17658,46 @@
 1103603462 28 c 386/lib/libndb.a - 664 sys sys 1103602454 60666
 1103603462 29 c 386/lib/libsunrpc.a - 664 sys sys 1103602455 355994
 1103603462 30 c acme/bin/386/win - 775 sys sys 1103602453 178910
+1103607062 0 c sys/src/cmd/acme/text.c - 664 sys sys 1103606882 27652
+1103608863 0 c 386/9loaddebug - 775 sys sys 1103607312 299841
+1103608863 1 c 386/9pc - 775 sys sys 1103607315 1833348
+1103608863 2 c 386/9pccpu - 775 sys sys 1103607317 1488341
+1103608863 3 c 386/9pcdisk - 775 sys sys 1103607321 2038738
+1103608863 4 c 386/bin/acme - 775 sys sys 1103607302 427241
+1103608863 5 c 386/bin/archfs - 775 sys sys 1103607302 140744
+1103608863 6 c 386/bin/cdfs - 775 sys sys 1103607305 161053
+1103608863 7 c 386/bin/nntpfs - 775 sys sys 1103607308 160863
+1103608863 8 c 386/bin/snapfs - 775 sys sys 1103607309 338429
+1103608863 9 c 386/bin/webcookies - 775 sys sys 1103607310 161470
+1103608863 10 c 386/bin/wikifs - 775 sys sys 1103607311 201134
+1103608863 11 c 386/bin/ftpfs - 775 sys sys 1103607306 154362
+1103608863 12 c 386/bin/rdbfs - 775 sys sys 1103607308 168361
+1103608863 13 c 386/bin/webfs - 775 sys sys 1103607311 349695
+1103608863 14 c 386/bin/auth/factotum - 775 sys sys 1103607303 313832
+1103608863 15 c 386/bin/aux/apm - 775 sys sys 1103607304 174060
+1103608863 16 c 386/bin/aux/disksim - 775 sys sys 1103607304 144313
+1103608863 17 c 386/bin/aux/flashfs - 775 sys sys 1103607304 160251
+1103608863 18 c 386/bin/aux/olefs - 775 sys sys 1103607305 143224
+1103608863 19 c 386/bin/aux/stub - 775 sys sys 1103607305 135027
+1103608863 20 c 386/bin/execnet - 775 sys sys 1103607306 171861
+1103608863 21 c 386/bin/ext2srv - 775 sys sys 1103607306 173859
+1103608863 22 c 386/bin/mntgen - 775 sys sys 1103607307 135427
+1103608863 23 c 386/bin/nfs - 775 sys sys 1103607307 315354
+1103608863 24 c 386/bin/sshnet - 775 sys sys 1103607309 282682
+1103608863 25 c 386/lib/lib9p.a - 664 sys sys 1103607322 79300
+1103608863 26 c 386/lib/libip.a - 664 sys sys 1103607322 35602
+1103608863 27 c 386/lib/libndb.a - 664 sys sys 1103607322 60666
+1103608863 28 c 386/lib/libsunrpc.a - 664 sys sys 1103607323 355994
+1103608863 29 c acme/bin/386/win - 775 sys sys 1103607322 178910
+1103608863 30 c sys/src/cmd/tar.c - 664 sys sys 1103607141 15725
+1103634068 0 c sys/src/9/port/latin1.h - 664 sys sys 1103633666 3563
+1103643070 0 c sys/src/9/pc/ether8169.c - 664 sys sys 1103641602 22531
+1103643070 1 c sys/src/boot/pc/bootp.c - 664 sys sys 1103641772 12262
+1103643070 2 c sys/src/boot/pc/clock.c - 664 sys sys 1103641772 6425
+1103643070 3 c sys/src/boot/pc/ether.c - 664 sys sys 1103641772 5120
+1103643070 4 a sys/src/boot/pc/ether8169.c - 664 sys sys 1103641772 18622
+1103643070 5 c sys/src/boot/pc/ethermii.c - 664 sys sys 1103641771 4413
+1103643070 6 c sys/src/boot/pc/l.s - 664 sys sys 1103641771 13843
+1103643070 7 c sys/src/boot/pc/mem.h - 664 sys sys 1103641771 3371
+1103643070 8 c sys/src/boot/pc/mkfile - 664 sys sys 1103641863 3105
+1103689879 0 c 386/bin/tar - 775 sys sys 1103688550 83885

+ 14 - 9
sys/src/9/pc/ether8169.c

@@ -54,7 +54,7 @@ enum {					/* registers */
 	Rms		= 0xDA,		/* Receive Packet Maximum Size */
 	Cplusc		= 0xE0,		/* C+ Command */
 	Rdsar		= 0xE4,		/* Receive Descriptor Start Address */
-	Etthr		= 0xEC,		/* Early Transmit Threshold */
+	Mtps		= 0xEC,		/* Max. Transmit Packet Size */
 };
 
 enum {					/* Dtccr */
@@ -205,7 +205,7 @@ enum {					/* Ring sizes  (<= 1024) */
 	Ntd		= 128,		/* Transmit Ring */
 	Nrd		= 64,		/* Receive Ring */
 
-	Rbsz		= 1536,		/* can't be less, don't know why */
+	Mps		= ROUNDUP(ETHERMAXTU+4, 128),
 };
 
 typedef struct Dtcc Dtcc;
@@ -249,7 +249,7 @@ typedef struct Ctlr {
 	int	ntdfree;
 	int	ntq;
 
-	int	etthr;			/* Early Transmit Threshold */
+	int	mtps;			/* Max. Transmit Packet Size */
 
 	Lock	rlock;			/* receive */
 	D*	rd;			/* descriptor ring */
@@ -359,6 +359,7 @@ rtl8169mii(Ctlr* ctlr)
 	print("oui %X phyno %d\n", phy->oui, phy->phyno);
 
 	miiane(ctlr->mii, ~0, ~0, ~0);
+
 	return 0;
 }
 
@@ -511,7 +512,7 @@ rtl8169replenish(Ctlr* ctlr)
 			/*
 			 * simple allocation for now
 			 */
-			bp = iallocb(Rbsz);
+			bp = iallocb(Mps);
 			if(bp == nil){
 				iprint("no available buffers\n");
 				break;
@@ -521,7 +522,7 @@ rtl8169replenish(Ctlr* ctlr)
 			d->addrhi = 0;
 		}
 		coherence();
-		d->control |= Own|Rbsz;
+		d->control |= Own|Mps;
 		rdt = NEXT(rdt, ctlr->nrd);
 		ctlr->nrdfree++;
 	}
@@ -566,11 +567,12 @@ rtl8169init(Ether* edev)
 
 	/*
 	 * Transmitter.
+	 * Mtps is in units of 128.
 	 */
 	memset(ctlr->td, 0, sizeof(D)*ctlr->ntd);
 	ctlr->tdh = ctlr->tdt = 0;
 	ctlr->td[ctlr->ntd-1].control = Eor;
-	ctlr->etthr = 128/32;
+	ctlr->mtps = HOWMANY(Mps, 128);
 
 	/*
 	 * Receiver.
@@ -601,16 +603,19 @@ rtl8169init(Ether* edev)
 	 * Clear missed-packet counter;
 	 * initial early transmit threshold value;
 	 * set the descriptor ring base addresses;
-	 * set the maximum receive packet size;
+	 * set the maximum receive packet size - if it is
+	 * larger than 8191 the Rwt|Res bits may be set
+	 * in the receive descriptor control info even if
+	 * the packet is good;
 	 * no early-receive interrupts.
 	 */
 	csr32w(ctlr, Mpc, 0);
-	csr8w(ctlr, Etthr, ctlr->etthr);
+	csr8w(ctlr, Mtps, ctlr->mtps);
 	csr32w(ctlr, Tnpds+4, 0);
 	csr32w(ctlr, Tnpds, PCIWADDR(ctlr->td));
 	csr32w(ctlr, Rdsar+4, 0);
 	csr32w(ctlr, Rdsar, PCIWADDR(ctlr->rd));
-	csr16w(ctlr, Rms, Rbsz);
+	csr16w(ctlr, Rms, Mps);
 	csr16w(ctlr, Mulint, 0);
 
 	/*

+ 2 - 2
sys/src/9/port/latin1.h

@@ -20,7 +20,7 @@
 	"4", "5",	L"⅘",
 	"5", "68",	L"⅚⅝",
 	"7", "8",	L"⅞",
-	":", ")-=",	L"☺÷≔",
+	":", "()-=",	L"☺÷≔",
 	"<!", "=~",	L"≨⋦",
 	"<", "-<=>~",	L"←«≤≶≲",
 	"=", ":<=>OV",	L"≕⋜≡⋝⊜⇒",
@@ -52,7 +52,7 @@
 	"H", "-H",	L"Ħℍ",
 	"I", "-J",	L"ƗIJ",
 	"L", "&-Jj|",	L"⋀ŁLJLj⋁",
-	"M", "48b#s",	L"♩♪♭♯",
+	"M", "#48bs",	L"♩♪♭♯",
 	"N", "JNj",	L"NJℕNj",
 	"O", "*+-./=EIcoprx",	L"⊛⊕⊖⊙⊘⊜ŒƢ©⊚℗®⊗",
 	"P", "P",	L"ℙ",

+ 11 - 3
sys/src/boot/pc/bootp.c

@@ -139,7 +139,7 @@ ip_csum(uchar *addr)
 void
 printea(uchar *ea)
 {
-	print("%2ux%2ux%2ux%2ux%2ux%2ux",
+	print("%2.2ux%2.2ux%2.2ux%2.2ux%2.2ux%2.2ux",
 		ea[0], ea[1], ea[2], ea[3], ea[4], ea[5]);
 }
 
@@ -395,11 +395,19 @@ tftpread(int ctlrno, Netaddr *a, Tftp *tftp, int dlen)
 
 		udpsend(ctlrno, a, buf, sizeof(buf));
 		len = udprecv(ctlrno, a, tftp, dlen);
-		if(len <= sizeof(tftp->header))
+		if(len <= sizeof(tftp->header)){
+			if(debug)
+				print("tftpread: too short %d <= %d\n",
+					len, sizeof(tftp->header));
 			continue;
+		}
 		blockno = (tftp->header[2]<<8)|tftp->header[3];
-		if(blockno <= tftpblockno)
+		if(blockno <= tftpblockno){
+			if(debug)
+				print("tftpread: blkno %d <= %d\n",
+					blockno, tftpblockno);
 			continue;
+		}
 
 		if(blockno == tftpblockno+1) {
 			tftpblockno++;

+ 59 - 29
sys/src/boot/pc/clock.c

@@ -26,10 +26,14 @@ enum
 	Freq=	1193182,	/* Real clock frequency */
 };
 
-static vlong cpufreq = 66000000;
+static uvlong cpuhz = 66000000;
 static int cpumhz = 66;
 static int loopconst = 100;
 int cpuidax, cpuiddx;
+int havetsc;
+
+extern void _cycles(uvlong*);		/* in l.s */
+extern void wrmsr(int, vlong);
 
 static void
 clockintr(Ureg*, void*)
@@ -129,27 +133,24 @@ static X86type x86amd[] =
 
 static X86type	*cputype;
 
-/*
- *  delay for l milliseconds more or less.  delayloop is set by
- *  clockinit() to match the actual CPU speed.
- */
+
 void
-delay(int l)
+delay(int millisecs)
 {
-	l *= loopconst;
-	if(l <= 0)
-		l = 1;
-	aamloop(l);
+	millisecs *= loopconst;
+	if(millisecs <= 0)
+		millisecs = 1;
+	aamloop(millisecs);
 }
 
 void
-microdelay(int l)
+microdelay(int microsecs)
 {
-	l *= loopconst;
-	l /= 1000;
-	if(l <= 0)
-		l = 1;
-	aamloop(l);
+	microsecs *= loopconst;
+	microsecs /= 1000;
+	if(microsecs <= 0)
+		microsecs = 1;
+	aamloop(microsecs);
 }
 
 extern void cpuid(char*, int*, int*);
@@ -182,14 +183,20 @@ cpuidentify(void)
 	if(t->name == nil)
 		panic("cpuidentify");
 
+	if(cpuiddx & 0x10){
+		havetsc = 1;
+		if(cpuiddx & 0x20)
+			wrmsr(0x10, 0);
+	}
+
 	return t;
 }
 
 void
 clockinit(void)
 {
-	int x, y;	/* change in counter */
-	int loops, incr;
+	uvlong a, b, cpufreq;
+	int loops, incr, x, y;
 	X86type *t;
 
 	/*
@@ -239,10 +246,14 @@ clockinit(void)
 		 *
 		 */
 		outb(Tmode, Latch0);
+		if(havetsc)
+			_cycles(&a);
 		x = inb(T0cntr);
 		x |= inb(T0cntr)<<8;
 		aamloop(loops);
 		outb(Tmode, Latch0);
+		if(havetsc)
+			_cycles(&b);
 		y = inb(T0cntr);
 		y |= inb(T0cntr)<<8;
 		x -= y;
@@ -255,21 +266,40 @@ clockinit(void)
 	}
 
 	/*
+ 	 *  figure out clock frequency and a loop multiplier for delay().
 	 *  counter  goes at twice the frequency, once per transition,
 	 *  i.e., twice per square wave
 	 */
-	x >>= 1;
-
-	/*
- 	 *  figure out clock frequency and a loop multiplier for delay().
-	 */
-	cpufreq = (vlong)loops*((t->aalcycles*Freq)/x);
+	cpufreq = (vlong)loops*((t->aalcycles*2*Freq)/x);
 	loopconst = (cpufreq/1000)/t->aalcycles;	/* AAM+LOOP's for 1 ms */
 
-	/*
-	 *  add in possible .2% error and convert to MHz
-	 */
-	cpumhz = (cpufreq + cpufreq/500)/1000000;
-	if (1)
+	if(havetsc){
+		/* counter goes up by 2*Freq */
+		b = (b-a)<<1;
+		b *= Freq;
+		b /= x;
+
+		/*
+		 *  round to the nearest megahz
+		 */
+		cpumhz = (b+500000)/1000000L;
+		cpuhz = b;
+	}
+	else{
+		/*
+		 *  add in possible .5% error and convert to MHz
+		 */
+		cpumhz = (cpufreq + cpufreq/200)/1000000;
+		cpuhz = cpufreq;
+	}
+
+	if(debug){
+		int timeo;
+
 		print("%dMHz %s loop %d\n", cpumhz, t->name, loopconst);
+		print("tick...");
+		for(timeo = 0; timeo < 10; timeo++)
+			delay(1000);
+		print("tock...\n");
+	}
 }

+ 4 - 3
sys/src/boot/pc/ether.c

@@ -21,6 +21,7 @@ extern int wd8003reset(Ether*);
 extern int ec2treset(Ether*);
 extern int amd79c970reset(Ether*);
 extern int rtl8139pnp(Ether*);
+extern int rtl8169pnp(Ether*);
 extern int ether83815reset(Ether*);
 extern int rhinepnp(Ether*);
 
@@ -44,6 +45,7 @@ struct {
 	{ "EC2T", ec2treset, 0, },
 	{ "AMD79C970", amd79c970reset, 0, },
 	{ "RTL8139", rtl8139pnp, 0, },
+	{ "RTL8169", rtl8169pnp, 0, },
 	{ "83815", ether83815reset, 0, },
 	{ "rhine", rhinepnp, 0, },
 
@@ -208,9 +210,8 @@ etherrxpkt(int ctlrno, Etherpkt* pkt, int timo)
 
 	ring = &ctlr->rb[ctlr->rh];
 	if(wait(ring, Interface, timo) == 0){
-		/*
-		print("ether%d: rx timeout\n", ctlrno);
-		 */
+		if(debug)
+			print("ether%d: rx timeout\n", ctlrno);
 		return 0;
 	}
 

+ 846 - 0
sys/src/boot/pc/ether8169.c

@@ -0,0 +1,846 @@
+/*
+ * Realtek RTL8110S/8169S.
+ * Mostly there. There are some magic register values used
+ * which are not described in any datasheet or driver but seem
+ * to be necessary.
+ * Why is the Fovf descriptor bit set for every received packet?
+ * Occasionally the hardware indicates an input TCP checksum error
+ * although the higher-level software seems to check the packet OK?
+ * No tuning has been done. Only tested on an RTL8110S, there
+ * are slight differences between the chips in the series so some
+ * tweaks may be needed.
+ */
+#include "u.h"
+#include "lib.h"
+#include "mem.h"
+#include "dat.h"
+#include "fns.h"
+#include "io.h"
+
+
+typedef struct QLock { int r; } QLock;
+#define qlock(i)	while(0)
+#define qunlock(i)	while(0)
+#define iallocb		allocb
+extern void mb386(void);
+#define coherence()	mb386()
+#define iprint		print
+#define mallocalign(n, a, o, s)	ialloc((n), (a))
+
+#include "etherif.h"
+#include "ethermii.h"
+
+enum {					/* registers */
+	Idr0		= 0x00,		/* MAC address */
+	Mar0		= 0x08,		/* Multicast address */
+	Dtccr		= 0x10,		/* Dump Tally Counter Command */
+	Tnpds		= 0x20,		/* Transmit Normal Priority Descriptors */
+	Thpds		= 0x28,		/* Transmit High Priority Descriptors */
+	Flash		= 0x30,		/* Flash Memory Read/Write */
+	Erbcr		= 0x34,		/* Early Receive Byte Count */
+	Ersr		= 0x36,		/* Early Receive Status */
+	Cr		= 0x37,		/* Command Register */
+	Tppoll		= 0x38,		/* Transmit Priority Polling */
+	Imr		= 0x3C,		/* Interrupt Mask */
+	Isr		= 0x3E,		/* Interrupt Status */
+	Tcr		= 0x40,		/* Transmit Configuration */
+	Rcr		= 0x44,		/* Receive Configuration */
+	Tctr		= 0x48,		/* Timer Count */
+	Mpc		= 0x4C,		/* Missed Packet Counter */
+	Cr9346		= 0x50,		/* 9346 Command Register */
+	Config0		= 0x51,		/* Configuration Register 0 */
+	Config1		= 0x52,		/* Configuration Register 1 */
+	Config2		= 0x53,		/* Configuration Register 2 */
+	Config3		= 0x54,		/* Configuration Register 3 */
+	Config4		= 0x55,		/* Configuration Register 4 */
+	Config5		= 0x56,		/* Configuration Register 5 */
+	Timerint	= 0x58,		/* Timer Interrupt */
+	Mulint		= 0x5C,		/* Multiple Interrupt Select */
+	Phyar		= 0x60,		/* PHY Access */
+	Tbicsr0		= 0x64,		/* TBI Control and Status */
+	Tbianar		= 0x68,		/* TBI Auto-Negotiation Advertisment */
+	Tbilpar		= 0x6A,		/* TBI Auto-Negotiation Link Partner */
+	Phystatus	= 0x6C,		/* PHY Status */
+
+	Rms		= 0xDA,		/* Receive Packet Maximum Size */
+	Cplusc		= 0xE0,		/* C+ Command */
+	Rdsar		= 0xE4,		/* Receive Descriptor Start Address */
+	Mtps		= 0xEC,		/* Max. Transmit Packet Size */
+};
+
+enum {					/* Dtccr */
+	Cmd		= 0x00000008,	/* Command */
+};
+
+enum {					/* Cr */
+	Te		= 0x04,		/* Transmitter Enable */
+	Re		= 0x08,		/* Receiver Enable */
+	Rst		= 0x10,		/* Software Reset */
+};
+
+enum {					/* Tppoll */
+	Fswint		= 0x01,		/* Forced Software Interrupt */
+	Npq		= 0x40,		/* Normal Priority Queue polling */
+	Hpq		= 0x80,		/* High Priority Queue polling */
+};
+
+enum {					/* Imr/Isr */
+	Rok		= 0x0001,	/* Receive OK */
+	Rer		= 0x0002,	/* Receive Error */
+	Tok		= 0x0004,	/* Transmit OK */
+	Ter		= 0x0008,	/* Transmit Error */
+	Rdu		= 0x0010,	/* Receive Descriptor Unavailable */
+	Punlc		= 0x0020,	/* Packet Underrun or Link Change */
+	Fovw		= 0x0040,	/* Receive FIFO Overflow */
+	Tdu		= 0x0080,	/* Transmit Descriptor Unavailable */
+	Swint		= 0x0100,	/* Software Interrupt */
+	Timeout		= 0x4000,	/* Timer */
+	Serr		= 0x8000,	/* System Error */
+};
+
+enum {					/* Tcr */
+	MtxdmaSHIFT	= 8,		/* Max. DMA Burst Size */
+	MtxdmaMASK	= 0x00000700,
+	Mtxdmaunlimited	= 0x00000700,
+	Acrc		= 0x00010000,	/* Append CRC (not) */
+	Lbk0		= 0x00020000,	/* Loopback Test 0 */
+	Lbk1		= 0x00040000,	/* Loopback Test 1 */
+	Ifg2		= 0x00080000,	/* Interframe Gap 2 */
+	HwveridSHIFT	= 23,		/* Hardware Version ID */
+	HwveridMASK	= 0x7C800000,
+	Ifg0		= 0x01000000,	/* Interframe Gap 0 */
+	Ifg1		= 0x02000000,	/* Interframe Gap 1 */
+};
+
+enum {					/* Rcr */
+	Aap		= 0x00000001,	/* Accept All Packets */
+	Apm		= 0x00000002,	/* Accept Physical Match */
+	Am		= 0x00000004,	/* Accept Multicast */
+	Ab		= 0x00000008,	/* Accept Broadcast */
+	Ar		= 0x00000010,	/* Accept Runt */
+	Aer		= 0x00000020,	/* Accept Error */
+	Sel9356		= 0x00000040,	/* 9356 EEPROM used */
+	MrxdmaSHIFT	= 8,		/* Max. DMA Burst Size */
+	MrxdmaMASK	= 0x00000700,
+	Mrxdmaunlimited	= 0x00000700,
+	RxfthSHIFT	= 13,		/* Receive Buffer Length */
+	RxfthMASK	= 0x0000E000,
+	Rxfth256	= 0x00008000,
+	Rxfthnone	= 0x0000E000,
+	Rer8		= 0x00010000,	/* Accept Error Packets > 8 bytes */
+	MulERINT	= 0x01000000,	/* Multiple Early Interrupt Select */
+};
+
+enum {					/* Cr9346 */
+	Eedo		= 0x01,		/* */
+	Eedi		= 0x02,		/* */
+	Eesk		= 0x04,		/* */
+	Eecs		= 0x08,		/* */
+	Eem0		= 0x40,		/* Operating Mode */
+	Eem1		= 0x80,
+};
+
+enum {					/* Phyar */
+	DataMASK	= 0x0000FFFF,	/* 16-bit GMII/MII Register Data */
+	DataSHIFT	= 0,
+	RegaddrMASK	= 0x001F0000,	/* 5-bit GMII/MII Register Address */
+	RegaddrSHIFT	= 16,
+	Flag		= 0x80000000,	/* */
+};
+
+enum {					/* Phystatus */
+	Fd		= 0x01,		/* Full Duplex */
+	Linksts		= 0x02,		/* Link Status */
+	Speed10		= 0x04,		/* */
+	Speed100	= 0x08,		/* */
+	Speed1000	= 0x10,		/* */
+	Rxflow		= 0x20,		/* */
+	Txflow		= 0x40,		/* */
+	Entbi		= 0x80,		/* */
+};
+
+enum {					/* Cplusc */
+	Mulrw		= 0x0008,	/* PCI Multiple R/W Enable */
+	Dac		= 0x0010,	/* PCI Dual Address Cycle Enable */
+	Rxchksum	= 0x0020,	/* Receive Checksum Offload Enable */
+	Rxvlan		= 0x0040,	/* Receive VLAN De-tagging Enable */
+	Endian		= 0x0200,	/* Endian Mode */
+};
+
+typedef struct D D;			/* Transmit/Receive Descriptor */
+struct D {
+	u32int	control;
+	u32int	vlan;
+	u32int	addrlo;
+	u32int	addrhi;
+};
+
+enum {					/* Transmit Descriptor control */
+	TxflMASK	= 0x0000FFFF,	/* Transmit Frame Length */
+	TxflSHIFT	= 0,
+	Tcps		= 0x00010000,	/* TCP Checksum Offload */
+	Udpcs		= 0x00020000,	/* UDP Checksum Offload */
+	Ipcs		= 0x00040000,	/* IP Checksum Offload */
+	Lgsen		= 0x08000000,	/* Large Send */
+};
+
+enum {					/* Receive Descriptor control */
+	RxflMASK	= 0x00003FFF,	/* Receive Frame Length */
+	RxflSHIFT	= 0,
+	Tcpf		= 0x00004000,	/* TCP Checksum Failure */
+	Udpf		= 0x00008000,	/* UDP Checksum Failure */
+	Ipf		= 0x00010000,	/* IP Checksum Failure */
+	Pid0		= 0x00020000,	/* Protocol ID0 */
+	Pid1		= 0x00040000,	/* Protocol ID1 */
+	Crce		= 0x00080000,	/* CRC Error */
+	Runt		= 0x00100000,	/* Runt Packet */
+	Res		= 0x00200000,	/* Receive Error Summary */
+	Rwt		= 0x00400000,	/* Receive Watchdog Timer Expired */
+	Fovf		= 0x00800000,	/* FIFO Overflow */
+	Bovf		= 0x01000000,	/* Buffer Overflow */
+	Bar		= 0x02000000,	/* Broadcast Address Received */
+	Pam		= 0x04000000,	/* Physical Address Matched */
+	Mar		= 0x08000000,	/* Multicast Address Received */
+};
+
+enum {					/* General Descriptor control */
+	Ls		= 0x10000000,	/* Last Segment Descriptor */
+	Fs		= 0x20000000,	/* First Segment Descriptor */
+	Eor		= 0x40000000,	/* End of Descriptor Ring */
+	Own		= 0x80000000,	/* Ownership */
+};
+
+/*
+ */
+enum {					/* Ring sizes  (<= 1024) */
+	Ntd		= 8,		/* Transmit Ring */
+	Nrd		= 32,		/* Receive Ring */
+
+	Mps		= ROUNDUP(ETHERMAXTU+4, 128),
+};
+
+typedef struct Dtcc Dtcc;
+struct Dtcc {
+	u64int	txok;
+	u64int	rxok;
+	u64int	txer;
+	u32int	rxer;
+	u16int	misspkt;
+	u16int	fae;
+	u32int	tx1col;
+	u32int	txmcol;
+	u64int	rxokph;
+	u64int	rxokbrd;
+	u32int	rxokmu;
+	u16int	txabt;
+	u16int	txundrn;
+};
+
+typedef struct Ctlr Ctlr;
+typedef struct Ctlr {
+	int	port;
+	Pcidev*	pcidev;
+	Ctlr*	next;
+	int	active;
+	uint	id;
+
+	QLock	alock;			/* attach */
+	Lock	ilock;			/* init */
+	int	init;			/*  */
+
+	Mii*	mii;
+
+	Lock	tlock;			/* transmit */
+	D*	td;			/* descriptor ring */
+	Block**	tb;			/* transmit buffers */
+	int	ntd;
+
+	int	tdh;			/* head - producer index (host) */
+	int	tdt;			/* tail - consumer index (NIC) */
+	int	ntdfree;
+	int	ntq;
+
+	int	mtps;			/* Max. Transmit Packet Size */
+
+	Lock	rlock;			/* receive */
+	D*	rd;			/* descriptor ring */
+	void**	rb;			/* receive buffers */
+	int	nrd;
+
+	int	rdh;			/* head - producer index (NIC) */
+	int	rdt;			/* tail - consumer index (host) */
+	int	nrdfree;
+
+	int	rcr;			/* receive configuration register */
+
+	QLock	slock;			/* statistics */
+	Dtcc*	dtcc;
+	uint	txdu;
+	uint	tcpf;
+	uint	udpf;
+	uint	ipf;
+	uint	fovf;
+	uint	ierrs;
+	uint	rer;
+	uint	rdu;
+	uint	punlc;
+	uint	fovw;
+} Ctlr;
+
+static Ctlr* ctlrhead;
+static Ctlr* ctlrtail;
+
+#define csr8r(c, r)	(inb((c)->port+(r)))
+#define csr16r(c, r)	(ins((c)->port+(r)))
+#define csr32r(c, r)	(inl((c)->port+(r)))
+#define csr8w(c, r, b)	(outb((c)->port+(r), (int)(b)))
+#define csr16w(c, r, w)	(outs((c)->port+(r), (ushort)(w)))
+#define csr32w(c, r, l)	(outl((c)->port+(r), (ulong)(l)))
+
+static int
+rtl8169miimir(Mii* mii, int pa, int ra)
+{
+	uint r;
+	int timeo;
+	Ctlr *ctlr;
+
+	if(pa != 1)
+		return -1;
+	ctlr = mii->ctlr;
+
+	r = (ra<<16) & RegaddrMASK;
+	csr32w(ctlr, Phyar, r);
+	delay(1);
+	for(timeo = 0; timeo < 2000; timeo++){
+		if((r = csr32r(ctlr, Phyar)) & Flag)
+			break;
+		microdelay(100);
+	}
+	if(!(r & Flag))
+		return -1;
+
+	return (r & DataMASK)>>DataSHIFT;
+}
+
+static int
+rtl8169miimiw(Mii* mii, int pa, int ra, int data)
+{
+	uint r;
+	int timeo;
+	Ctlr *ctlr;
+
+	if(pa != 1)
+		return -1;
+	ctlr = mii->ctlr;
+
+	r = Flag|((ra<<16) & RegaddrMASK)|((data<<DataSHIFT) & DataMASK);
+	csr32w(ctlr, Phyar, r);
+	delay(1);
+	for(timeo = 0; timeo < 2000; timeo++){
+		if(!((r = csr32r(ctlr, Phyar)) & Flag))
+			break;
+		microdelay(100);
+	}
+	if(r & Flag)
+		return -1;
+
+	return 0;
+}
+
+static int
+rtl8169mii(Ctlr* ctlr)
+{
+	MiiPhy *phy;
+
+	/*
+	 * Link management.
+	 */
+	if((ctlr->mii = malloc(sizeof(Mii))) == nil)
+		return -1;
+	ctlr->mii->mir = rtl8169miimir;
+	ctlr->mii->miw = rtl8169miimiw;
+	ctlr->mii->ctlr = ctlr;
+	rtl8169miimiw(ctlr->mii, 1, 0x0B, 0x0000);	/* magic */
+
+	if(mii(ctlr->mii, ~0) == 0 || (phy = ctlr->mii->curphy) == nil){
+		free(ctlr->mii);
+		ctlr->mii = nil;
+		return -1;
+	}
+	print("oui %X phyno %d\n", phy->oui, phy->phyno);
+
+	miiane(ctlr->mii, ~0, ~0, ~0);
+
+	return 0;
+}
+
+static int
+rtl8169reset(Ctlr* ctlr)
+{
+	int timeo;
+
+	/*
+	 * Soft reset the controller.
+	 */
+	csr8w(ctlr, Cr, Rst);
+	for(timeo = 0; timeo < 1000; timeo++){
+		if(!(csr8r(ctlr, Cr) & Rst))
+			return 0;
+		delay(1);
+	}
+
+	return -1;
+}
+
+static void
+rtl8169detach(Ether* edev)
+{
+	rtl8169reset(edev->ctlr);
+}
+
+static void
+rtl8169halt(Ctlr* ctlr)
+{
+	csr8w(ctlr, Cr, 0);
+	csr16w(ctlr, Imr, 0);
+	csr16w(ctlr, Isr, ~0);
+}
+
+static void
+rtl8169replenish(Ctlr* ctlr)
+{
+	D *d;
+	int rdt;
+	void *bp;
+
+	rdt = ctlr->rdt;
+	while(NEXT(rdt, ctlr->nrd) != ctlr->rdh){
+		d = &ctlr->rd[rdt];
+		if(ctlr->rb[rdt] == nil){
+			/*
+			 * simple allocation for now
+			 */
+			bp = malloc(Mps);
+			ctlr->rb[rdt] = bp;
+			d->addrlo = PCIWADDR(bp);
+			d->addrhi = 0;
+		}
+		coherence();
+		d->control |= Own|Mps;
+		rdt = NEXT(rdt, ctlr->nrd);
+		ctlr->nrdfree++;
+	}
+	ctlr->rdt = rdt;
+}
+
+static void
+rtl8169init(Ether* edev)
+{
+	uint r;
+	Ctlr *ctlr;
+
+	ctlr = edev->ctlr;
+	ilock(&ctlr->ilock);
+
+	rtl8169halt(ctlr);
+
+	/*
+	 * Setting Mulrw in Cplusc disables the Tx/Rx DMA burst settings
+	 * in Tcr/Rcr.
+	 */
+	csr16w(ctlr, Cplusc, (1<<14)|Rxchksum|Mulrw);	/* magic (1<<14) */
+
+	/*
+	 * MAC Address.
+	 * Must put chip into config register write enable mode.
+	 */
+	csr8w(ctlr, Cr9346, Eem1|Eem0);
+	r = (edev->ea[3]<<24)|(edev->ea[2]<<16)|(edev->ea[1]<<8)|edev->ea[0];
+	csr32w(ctlr, Idr0, r);
+	r = (edev->ea[5]<<8)|edev->ea[4];
+	csr32w(ctlr, Idr0+4, r);
+
+	/*
+	 * Enable receiver/transmitter.
+	 * Need to do this first or some of the settings below
+	 * won't take.
+	 */
+	csr8w(ctlr, Cr, Te|Re);
+
+	/*
+	 * Transmitter.
+	 * Mtps is in units of 128.
+	 */
+	memset(ctlr->td, 0, sizeof(D)*ctlr->ntd);
+	ctlr->tdh = ctlr->tdt = 0;
+	ctlr->td[ctlr->ntd-1].control = Eor;
+	ctlr->mtps = HOWMANY(Mps, 128);
+
+	/*
+	 * Receiver.
+	 */
+	memset(ctlr->rd, 0, sizeof(D)*ctlr->nrd);
+	ctlr->rdh = ctlr->rdt = 0;
+	ctlr->rd[ctlr->nrd-1].control = Eor;
+
+	//for(i = 0; i < ctlr->nrd; i++){
+	//	if((bp = ctlr->rb[i]) != nil){
+	//		ctlr->rb[i] = nil;
+	//		freeb(bp);
+	//	}
+	//}
+	rtl8169replenish(ctlr);
+	ctlr->rcr = Rxfth256|Mrxdmaunlimited|Ab|Apm;
+
+	/*
+	 * Interrupts.
+	 * Disable Tdu|Tok for now, the transmit routine will tidy.
+	 * Tdu means the NIC ran out of descritors to send, so it
+	 * doesn't really need to ever be on.
+	 */
+	csr32w(ctlr, Timerint, 0);
+	csr16w(ctlr, Imr, Serr|Timeout/*|Tdu*/|Fovw|Punlc|Rdu|Ter/*|Tok*/|Rer|Rok);
+
+	/*
+	 * Clear missed-packet counter;
+	 * initial early transmit threshold value;
+	 * set the descriptor ring base addresses;
+	 * set the maximum receive packet size;
+	 * no early-receive interrupts.
+	 */
+	csr32w(ctlr, Mpc, 0);
+	csr8w(ctlr, Mtps, ctlr->mtps);
+	csr32w(ctlr, Tnpds+4, 0);
+	csr32w(ctlr, Tnpds, PCIWADDR(ctlr->td));
+	csr32w(ctlr, Rdsar+4, 0);
+	csr32w(ctlr, Rdsar, PCIWADDR(ctlr->rd));
+	csr16w(ctlr, Rms, Mps);
+	csr16w(ctlr, Mulint, 0);
+
+	/*
+	 * Set configuration.
+	 */
+	csr32w(ctlr, Tcr, Ifg1|Ifg0|Mtxdmaunlimited);
+	csr32w(ctlr, Rcr, ctlr->rcr);
+	csr16w(ctlr, 0xE2, 0);			/* magic */
+
+	csr8w(ctlr, Cr9346, 0);
+
+	iunlock(&ctlr->ilock);
+
+	//rtl8169mii(ctlr);
+}
+
+static void
+rtl8169attach(Ether* edev)
+{
+	int timeo;
+	Ctlr *ctlr;
+
+	ctlr = edev->ctlr;
+	qlock(&ctlr->alock);
+	if(ctlr->init == 0){
+		/*
+		 * Handle allocation/init errors here.
+		 */
+		ctlr->td = xspanalloc(sizeof(D)*Ntd, 256, 0);
+		ctlr->tb = malloc(Ntd*sizeof(Block*));
+		ctlr->ntd = Ntd;
+		ctlr->rd = xspanalloc(sizeof(D)*Nrd, 256, 0);
+		ctlr->rb = malloc(Nrd*sizeof(Block*));
+		ctlr->nrd = Nrd;
+		ctlr->dtcc = xspanalloc(sizeof(Dtcc), 64, 0);
+		rtl8169init(edev);
+		ctlr->init = 1;
+	}
+	qunlock(&ctlr->alock);
+
+	for(timeo = 0; timeo < 3500; timeo++){
+		if(miistatus(ctlr->mii) == 0)
+			break;
+		delay(10);
+	}
+}
+
+static void
+rtl8169transmit(Ether* edev)
+{
+	D *d;
+	Block *bp;
+	Ctlr *ctlr;
+	int control, x;
+	RingBuf *tb;
+
+	ctlr = edev->ctlr;
+
+	ilock(&ctlr->tlock);
+	for(x = ctlr->tdh; ctlr->ntq > 0; x = NEXT(x, ctlr->ntd)){
+		d = &ctlr->td[x];
+		if((control = d->control) & Own)
+			break;
+
+		/*
+		 * Check errors and log here.
+		 */
+		USED(control);
+
+		/*
+		 * Free it up.
+		 * Need to clean the descriptor here? Not really.
+		 * Simple freeb for now (no chain and freeblist).
+		 * Use ntq count for now.
+		 */
+		freeb(ctlr->tb[x]);
+		ctlr->tb[x] = nil;
+		d->control &= Eor;
+
+		ctlr->ntq--;
+	}
+	ctlr->tdh = x;
+
+	x = ctlr->tdt;
+	while(ctlr->ntq < (ctlr->ntd-1)){
+		tb = &edev->tb[edev->ti];
+		if(tb->owner != Interface)
+			break;
+
+		bp = allocb(tb->len);
+		memmove(bp->wp, tb->pkt, tb->len);
+		memmove(bp->wp+Eaddrlen, edev->ea, Eaddrlen);
+		bp->wp += tb->len;
+
+		tb->owner = Host;
+		edev->ti = NEXT(edev->ti, edev->ntb);
+
+		d = &ctlr->td[x];
+		d->addrlo = PCIWADDR(bp->rp);
+		d->addrhi = 0;
+		ctlr->tb[x] = bp;
+		coherence();
+		d->control |= Own|Fs|Ls|((BLEN(bp)<<TxflSHIFT) & TxflMASK);
+
+		x = NEXT(x, ctlr->ntd);
+		ctlr->ntq++;
+	}
+	if(x != ctlr->tdt){
+		ctlr->tdt = x;
+		csr8w(ctlr, Tppoll, Npq);
+	}
+	else if(ctlr->ntq >= (ctlr->ntd-1))
+		ctlr->txdu++;
+
+	iunlock(&ctlr->tlock);
+}
+
+static void
+rtl8169receive(Ether* edev)
+{
+	D *d;
+	int len, rdh;
+	Ctlr *ctlr;
+	u32int control;
+	RingBuf *ring;
+
+	ctlr = edev->ctlr;
+
+	rdh = ctlr->rdh;
+	for(;;){
+		d = &ctlr->rd[rdh];
+	
+		if(d->control & Own)
+			break;
+
+		control = d->control;
+		if((control & (Fs|Ls|Res)) == (Fs|Ls)){
+			len = ((control & RxflMASK)>>RxflSHIFT) - 4;
+
+			ring = &edev->rb[edev->ri];
+			if(ring->owner == Interface){
+				ring->owner = Host;
+				ring->len = len;
+				memmove(ring->pkt, ctlr->rb[rdh], len);
+				edev->ri = NEXT(edev->ri, edev->nrb);
+			}
+		}
+		else{
+			/*
+			 * Error stuff here.
+			print("control %8.8uX\n", control);
+			 */
+		}
+		d->control &= Eor;
+		ctlr->nrdfree--;
+		rdh = NEXT(rdh, ctlr->nrd);
+	}
+	ctlr->rdh = rdh;
+	
+	if(ctlr->nrdfree < ctlr->nrd/2)
+		rtl8169replenish(ctlr);
+}
+
+static void
+rtl8169interrupt(Ureg*, void* arg)
+{
+	Ctlr *ctlr;
+	Ether *edev;
+	u32int isr;
+
+	edev = arg;
+	ctlr = edev->ctlr;
+
+	while((isr = csr16r(ctlr, Isr)) != 0){
+		csr16w(ctlr, Isr, isr);
+		if(isr & (Fovw|Punlc|Rdu|Rer|Rok)){
+			rtl8169receive(edev);
+			if(!(isr & (Punlc|Rok)))
+				ctlr->ierrs++;
+			if(isr & Rer)
+				ctlr->rer++;
+			if(isr & Rdu)
+				ctlr->rdu++;
+			if(isr & Punlc)
+				ctlr->punlc++;
+			if(isr & Fovw)
+				ctlr->fovw++;
+			isr &= ~(Fovw|Rdu|Rer|Rok);
+		}
+
+		if(isr & (Tdu|Ter|Tok)){
+			rtl8169transmit(edev);
+			isr &= ~(Tdu|Ter|Tok);
+		}
+
+		if(isr & Punlc){
+			//rtl8169link(edev);
+			isr &= ~Punlc;
+		}
+
+		/*
+		 * Some of the reserved bits get set sometimes...
+		 */
+		if(isr & (Serr|Timeout|Tdu|Fovw|Punlc|Rdu|Ter|Tok|Rer|Rok))
+			panic("rtl8139interrupt: imr %4.4uX isr %4.4uX\n",
+				csr16r(ctlr, Imr), isr);
+	}
+}
+
+static Ctlr*
+rtl8169match(Ether* edev, int id)
+{
+	Pcidev *p;
+	Ctlr *ctlr;
+	int port;
+
+	/*
+	 * Any adapter matches if no edev->port is supplied,
+	 * otherwise the ports must match.
+	 */
+	for(ctlr = ctlrhead; ctlr != nil; ctlr = ctlr->next){
+		if(ctlr->active)
+			continue;
+		p = ctlr->pcidev;
+		if(((p->did<<16)|p->vid) != id)
+			continue;
+		port = p->mem[0].bar & ~0x01;
+		if(edev->port != 0 && edev->port != port)
+			continue;
+
+		ctlr->port = port;
+		if(rtl8169reset(ctlr))
+			continue;
+
+		csr8w(ctlr, 0x82, 1);		/* magic */
+
+		rtl8169mii(ctlr);
+
+		pcisetbme(p);
+		ctlr->active = 1;
+		return ctlr;
+	}
+	return nil;
+}
+
+static struct {
+	char*	name;
+	int	id;
+} rtl8169pci[] = {
+	{ "rtl8169",	(0x8169<<16)|0x10EC, },	/* generic */
+	{ nil },
+};
+
+int
+rtl8169pnp(Ether* edev)
+{
+	Pcidev *p;
+	Ctlr *ctlr;
+	int i, id;
+	uchar ea[Eaddrlen];
+
+	/*
+	 * Make a list of all ethernet controllers
+	 * if not already done.
+	 */
+	if(ctlrhead == nil){
+		p = nil;
+		while(p = pcimatch(p, 0, 0)){
+			if(p->ccrb != 0x02 || p->ccru != 0)
+				continue;
+			ctlr = malloc(sizeof(Ctlr));
+			ctlr->pcidev = p;
+			ctlr->id = (p->did<<16)|p->vid;
+
+			if(ctlrhead != nil)
+				ctlrtail->next = ctlr;
+			else
+				ctlrhead = ctlr;
+			ctlrtail = ctlr;
+		}
+	}
+
+	/*
+	 * Is it an RTL8169 under a different name?
+	 * Normally a search is made through all the found controllers
+	 * for one which matches any of the known vid+did pairs.
+	 * If a vid+did pair is specified a search is made for that
+	 * specific controller only.
+	 */
+	id = 0;
+	for(i = 0; i < edev->nopt; i++){
+		if(cistrncmp(edev->opt[i], "id=", 3) == 0)
+			id = strtol(&edev->opt[i][3], nil, 0);
+	}
+
+	ctlr = nil;
+	if(id != 0)
+		ctlr = rtl8169match(edev, id);
+	else for(i = 0; rtl8169pci[i].name; i++){
+		if((ctlr = rtl8169match(edev, rtl8169pci[i].id)) != nil)
+			break;
+	}
+	if(ctlr == nil)
+		return -1;
+
+	edev->ctlr = ctlr;
+	edev->port = ctlr->port;
+	edev->irq = ctlr->pcidev->intl;
+	edev->tbdf = ctlr->pcidev->tbdf;
+
+	/*
+	 */
+	memset(ea, 0, Eaddrlen);
+	i = csr32r(ctlr, Idr0);
+	edev->ea[0] = i;
+	edev->ea[1] = i>>8;
+	edev->ea[2] = i>>16;
+	edev->ea[3] = i>>24;
+	i = csr32r(ctlr, Idr0+4);
+	edev->ea[4] = i;
+	edev->ea[5] = i>>8;
+
+	edev->attach = rtl8169attach;
+	edev->transmit = rtl8169transmit;
+	edev->interrupt = rtl8169interrupt;
+	edev->detach = rtl8169detach;
+
+	return 0;
+}

+ 0 - 7
sys/src/boot/pc/ethermii.c

@@ -169,14 +169,10 @@ miistatus(Mii* mii)
 	 */
 	bmsr = mii->mir(mii, phyno, Bmsr);
 	if(!(bmsr & (BmsrAnc|BmsrAna)))
-{
-print("miistatus 1\n");
 		return -1;
-}
 
 	bmsr = mii->mir(mii, phyno, Bmsr);
 	if(!(bmsr & BmsrLs)){
-print("miistatus 2\n");
 		phy->link = 0;
 		return -1;
 	}
@@ -209,10 +205,7 @@ print("miistatus 2\n");
 			phy->speed = 10;
 	}
 	if(phy->speed == 0)
-{
-print("miistatus 3\n");
 		return -1;
-}
 
 	if(phy->fd){
 		p = phy->fc;

+ 34 - 1
sys/src/boot/pc/l.s

@@ -1,6 +1,10 @@
 #include "x16.h"
 #include "mem.h"
 
+#define WRMSR		BYTE $0x0F; BYTE $0x30	/* WRMSR, argument in AX/DX (lo/hi) */
+#define RDTSC 		BYTE $0x0F; BYTE $0x31	/* RDTSC, result in AX/DX (lo/hi) */
+#define RDMSR		BYTE $0x0F; BYTE $0x32	/* RDMSR, result in AX/DX (lo/hi) */
+
 #ifdef PXE
 #define PDB		0x90000		/* temporary page tables (24KB) */
 #else
@@ -533,10 +537,39 @@ TEXT	getcr3(SB),$0		/* page directory base */
 	MOVL	CR3,AX
 	RET
 
-TEXT getcr4(SB), $0		/* CR4 - extensions */
+TEXT	getcr4(SB), $0		/* CR4 - extensions */
 	MOVL	CR4, AX
 	RET
 
+TEXT _cycles(SB), $0				/* time stamp counter */
+	RDTSC
+	MOVL	vlong+0(FP), CX			/* &vlong */
+	MOVL	AX, 0(CX)			/* lo */
+	MOVL	DX, 4(CX)			/* hi */
+	RET
+
+TEXT rdmsr(SB), $0				/* model-specific register */
+	MOVL	index+0(FP), CX
+	RDMSR
+	MOVL	vlong+4(FP), CX			/* &vlong */
+	MOVL	AX, 0(CX)			/* lo */
+	MOVL	DX, 4(CX)			/* hi */
+	RET
+	
+TEXT wrmsr(SB), $0
+	MOVL	index+0(FP), CX
+	MOVL	lo+4(FP), AX
+	MOVL	hi+8(FP), DX
+	WRMSR
+	RET
+
+TEXT mb386(SB), $0
+	POPL	AX				/* return PC */
+	PUSHFL
+	PUSHL	CS
+	PUSHL	AX
+	IRETL
+
 /*
  *  special traps
  */

+ 2 - 2
sys/src/boot/pc/mem.h

@@ -18,10 +18,10 @@
 /*
  * Time
  */
-#define	HZ		(20)				/* clock frequency */
+#define	HZ		(100)				/* clock frequency */
 #define	MS2HZ		(1000/HZ)			/* millisec per clock tick */
 #define	TK2SEC(t)	((t)/HZ)			/* ticks to seconds */
-#define	TK2MS(t)	((((ulong)(t))*1000)/HZ)	/* ticks to milliseconds */
+#define	TK2MS(x)	((x)*(1000/HZ))
 #define	MS2TK(t)	((((ulong)(t))*HZ)/1000)	/* milliseconds to ticks */
 
 /*

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

@@ -56,6 +56,7 @@ ETHER=\
 	ether79c970.$O\
 	ether8003.$O\
 	ether8139.$O\
+	ether8169.$O\
 	ether82557.$O\
 	ether83815.$O\
 	ether8390.$O\

+ 1 - 1
sys/src/cmd/acme/text.c

@@ -44,7 +44,7 @@ textredraw(Text *t, Rectangle r, Font *f, Image *b, int odx)
 
 	frinit(t, r, f, b, t->Frame.cols);
 	rr = t->r;
-	rr.min.x -= Scrollwid;	/* back fill to scroll bar */
+	rr.min.x -= Scrollwid+Scrollgap;	/* back fill to scroll bar */
 	draw(t->b, rr, t->cols[BACK], nil, ZP);
 	/* use no wider than 3-space tabs in a directory */
 	maxt = maxtab;

+ 4 - 2
sys/src/cmd/tar.c

@@ -455,8 +455,10 @@ putfile(char *dir, char *longname, char *sname)
 		fprint(2, "tar: %s: name too long (max %d)\n", sname, sizeof shortname - 3);
 		return;
 	}
-	
-	snprint(shortname, sizeof shortname, "./%s", sname);
+	if (sname[0] != '/')		/* protect relative names like #foo */
+		snprint(shortname, sizeof shortname, "./%s", sname);
+	else
+		strcpy(shortname, sname);
 	infile = open(shortname, OREAD);
 	if (infile < 0) {
 		fprint(2, "tar: %s: cannot open file - %r\n", longname);