Browse Source

Plan 9 from Bell Labs 2006-02-18

David du Colombier 15 years ago
parent
commit
a46b828b14
100 changed files with 12063 additions and 4137 deletions
  1. 125 98
      dist/replica/_plan9.db
  2. 125 98
      dist/replica/plan9.db
  3. 143 0
      dist/replica/plan9.log
  4. BIN
      sys/doc/fs/fs.pdf
  5. 539 477
      sys/doc/fs/fs.ps
  6. 8 4
      sys/doc/fs/mkfile
  7. 52 9
      sys/doc/fs/p0
  8. 23 15
      sys/doc/fs/p1
  9. 98 92
      sys/doc/fs/p2
  10. 73 13
      sys/doc/fs/p4
  11. 3 3
      sys/doc/fs/p5
  12. 57 49
      sys/doc/fs/p6
  13. 1 1
      sys/doc/fs/p7
  14. 24 0
      sys/doc/fs/p9
  15. 76 0
      sys/doc/fs/pa
  16. 17 0
      sys/man/4/consolefs
  17. 17 0
      sys/man/8/fsconfig
  18. 20 20
      sys/src/fs/9netics32.16k/9net32.16kfs.c
  19. 6 4
      sys/src/fs/9netics32.16k/dat.h
  20. 15 15
      sys/src/fs/9netics32.16k/fns.h
  21. 6 2
      sys/src/fs/9netics32.16k/io.h
  22. 85 0
      sys/src/fs/9netics32.16k/mem.h
  23. 18 17
      sys/src/fs/9netics32.16k/mkfile
  24. 21 19
      sys/src/fs/9netics64.8k/9net64.8kfs.c
  25. 7 3
      sys/src/fs/9netics64.8k/dat.h
  26. 15 15
      sys/src/fs/9netics64.8k/fns.h
  27. 6 2
      sys/src/fs/9netics64.8k/io.h
  28. 85 0
      sys/src/fs/9netics64.8k/mem.h
  29. 23 21
      sys/src/fs/9netics64.8k/mkfile
  30. 11 12
      sys/src/fs/choline/9cholinefs.c
  31. 5 4
      sys/src/fs/choline/dat.h
  32. 15 15
      sys/src/fs/choline/fns.h
  33. 6 2
      sys/src/fs/choline/io.h
  34. 1 1
      sys/src/fs/choline/mem.h
  35. 19 16
      sys/src/fs/choline/mkfile
  36. 773 0
      sys/src/fs/dev/apc.c
  37. 199 181
      sys/src/fs/dev/cw.c
  38. 17 18
      sys/src/fs/dev/fworm.c
  39. 31 46
      sys/src/fs/dev/juke.c
  40. 28 28
      sys/src/fs/dev/mworm.c
  41. 0 961
      sys/src/fs/dev/sony.c
  42. 15 15
      sys/src/fs/dev/wren.c
  43. 68 0
      sys/src/fs/doc/changes
  44. 15 0
      sys/src/fs/doc/words
  45. 128 0
      sys/src/fs/doc/worm.fs
  46. 81 0
      sys/src/fs/doc/worm.fs64
  47. 0 0
      sys/src/fs/doc/worms.32-bit
  48. 11 12
      sys/src/fs/emelie/9emeliefs.c
  49. 6 4
      sys/src/fs/emelie/dat.h
  50. 15 15
      sys/src/fs/emelie/fns.h
  51. 6 2
      sys/src/fs/emelie/io.h
  52. 1 1
      sys/src/fs/emelie/mem.h
  53. 20 15
      sys/src/fs/emelie/mkfile
  54. 181 0
      sys/src/fs/fs/9fsfs.c
  55. 35 0
      sys/src/fs/fs/dat.h
  56. 79 0
      sys/src/fs/fs/fns.h
  57. 246 0
      sys/src/fs/fs/io.h
  58. 1 1
      sys/src/fs/fs/mem.h
  59. 144 0
      sys/src/fs/fs/mkfile
  60. 179 0
      sys/src/fs/fs64/9fsfs64.c
  61. 35 0
      sys/src/fs/fs64/dat.h
  62. 79 0
      sys/src/fs/fs64/fns.h
  63. 246 0
      sys/src/fs/fs64/io.h
  64. 1 1
      sys/src/fs/fs64/mem.h
  65. 143 0
      sys/src/fs/fs64/mkfile
  66. 2 2
      sys/src/fs/ip/arp.c
  67. 78 79
      sys/src/fs/ip/il.c
  68. 2 2
      sys/src/fs/ip/ip.c
  69. 5 5
      sys/src/fs/ip/ip.h
  70. 3 7
      sys/src/fs/ip/iproute.c
  71. 4 1
      sys/src/fs/mkfile
  72. 17 9
      sys/src/fs/pc/8250.c
  73. 66 18
      sys/src/fs/pc/8253.c
  74. 63 0
      sys/src/fs/pc/compat.c
  75. 32 1
      sys/src/fs/pc/compat.h
  76. 0 1289
      sys/src/fs/pc/devata.c
  77. 32 29
      sys/src/fs/pc/dosfs.c
  78. 12 12
      sys/src/fs/pc/dosfs.h
  79. 20 11
      sys/src/fs/pc/ether8139.c
  80. 171 117
      sys/src/fs/pc/ether83815.c
  81. 1363 0
      sys/src/fs/pc/ether83815.mii.c
  82. 20 20
      sys/src/fs/pc/etherdp83820.c
  83. 8 7
      sys/src/fs/pc/etherga620.c
  84. 11 9
      sys/src/fs/pc/etherif.c
  85. 2060 0
      sys/src/fs/pc/etherigbe.c
  86. 185 10
      sys/src/fs/pc/ethermii.c
  87. 77 9
      sys/src/fs/pc/ethermii.h
  88. 14 14
      sys/src/fs/pc/floppy.c
  89. 11 2
      sys/src/fs/pc/l.s
  90. 1 2
      sys/src/fs/pc/malloc.c
  91. 2 1
      sys/src/fs/pc/mkfile
  92. 2 2
      sys/src/fs/pc/pc.c
  93. 27 1
      sys/src/fs/pc/pci.c
  94. 29 24
      sys/src/fs/pc/scsincr53c8xx.c
  95. 2729 0
      sys/src/fs/pc/sdata.c
  96. 375 0
      sys/src/fs/pc/sdscsi.c
  97. 3 3
      sys/src/fs/pc/toy.c
  98. 82 107
      sys/src/fs/port/9p1.c
  99. 2 2
      sys/src/fs/port/9p1.h
  100. 27 15
      sys/src/fs/port/9p1lib.c

+ 125 - 98
dist/replica/_plan9.db

@@ -5635,18 +5635,20 @@ sys/doc/fossil.ms - 664 sys sys 1138396406 31439
 sys/doc/fossil.pdf - 664 sys sys 1042123169 63200
 sys/doc/fossil.ps - 664 sys sys 1135487951 313552
 sys/doc/fs - 20000000775 sys sys 945616779 0
-sys/doc/fs/fs.pdf - 664 sys sys 1020384351 47177
-sys/doc/fs/fs.ps - 664 sys sys 960837905 276918
-sys/doc/fs/mkfile - 664 sys sys 1138459286 273
-sys/doc/fs/p0 - 664 sys sys 1138396562 682
-sys/doc/fs/p1 - 664 sys sys 953844581 989
-sys/doc/fs/p2 - 664 sys sys 953844581 3749
+sys/doc/fs/fs.pdf - 664 sys sys 1140157478 64965
+sys/doc/fs/fs.ps - 664 sys sys 1140157389 298023
+sys/doc/fs/mkfile - 664 sys sys 1140157064 366
+sys/doc/fs/p0 - 664 sys sys 1138445459 1677
+sys/doc/fs/p1 - 664 sys sys 1094002291 800
+sys/doc/fs/p2 - 664 sys sys 1094112719 3775
 sys/doc/fs/p3 - 664 sys sys 944959592 1475
-sys/doc/fs/p4 - 664 sys sys 953844581 3662
-sys/doc/fs/p5 - 664 sys sys 944959592 1143
-sys/doc/fs/p6 - 664 sys sys 953844573 6235
-sys/doc/fs/p7 - 664 sys sys 953844581 958
+sys/doc/fs/p4 - 664 sys sys 1094178190 5764
+sys/doc/fs/p5 - 664 sys sys 1094002662 1140
+sys/doc/fs/p6 - 664 sys sys 1094177480 6091
+sys/doc/fs/p7 - 664 sys sys 1094000398 960
 sys/doc/fs/p8 - 664 sys sys 953844574 881
+sys/doc/fs/p9 - 664 sys sys 1140157346 659
+sys/doc/fs/pa - 664 sys sys 1094002902 2027
 sys/doc/il - 20000000775 sys sys 945616779 0
 sys/doc/il/il.ms - 664 sys sys 1138396552 11390
 sys/doc/il/il.pdf - 664 sys sys 1020384351 44630
@@ -7583,7 +7585,7 @@ sys/man/4/acme - 664 sys sys 1134233060 10274
 sys/man/4/archfs - 664 sys sys 960000712 533
 sys/man/4/cdfs - 664 sys sys 1026846913 3638
 sys/man/4/cfs - 664 sys sys 1015024813 1758
-sys/man/4/consolefs - 664 sys sys 1069179473 3920
+sys/man/4/consolefs - 664 sys sys 1140209468 4241
 sys/man/4/dossrv - 664 sys sys 1015024813 4176
 sys/man/4/execnet - 664 sys sys 1019866708 1069
 sys/man/4/exportfs - 664 sys sys 1115314261 4653
@@ -7696,7 +7698,7 @@ sys/man/8/dhcpd - 664 sys sys 1032654987 5237
 sys/man/8/drawterm - 664 sys sys 1135901219 1741
 sys/man/8/fossilcons - 664 sys sys 1138466274 18276
 sys/man/8/fs - 664 sys sys 1055701170 15029
-sys/man/8/fsconfig - 664 sys sys 1045501600 8142
+sys/man/8/fsconfig - 664 sys sys 1107841165 8350
 sys/man/8/getflags - 664 sys sys 1139839200 1712
 sys/man/8/gpsfs - 664 sys sys 1123643451 4924
 sys/man/8/httpd - 664 sys sys 1121198377 6675
@@ -14269,120 +14271,145 @@ sys/src/cmd/winwatch.c - 664 sys sys 1113312596 4869
 sys/src/cmd/xd.c - 664 sys sys 1124993597 5770
 sys/src/cmd/yacc.c - 664 sys sys 1116770313 57945
 sys/src/fs - 20000000775 sys sys 1015110109 0
+sys/src/fs/9netics32.16k - 20000000775 sys sys 1140158691 0
+sys/src/fs/9netics32.16k/9net32.16kfs.c - 664 sys sys 1140167903 3208
+sys/src/fs/9netics32.16k/dat.h - 664 sys sys 1140167904 612
+sys/src/fs/9netics32.16k/fns.h - 664 sys sys 1140167905 1961
+sys/src/fs/9netics32.16k/io.h - 664 sys sys 1097661949 6688
+sys/src/fs/9netics32.16k/mem.h - 664 sys sys 1140167906 2907
+sys/src/fs/9netics32.16k/mkfile - 664 sys sys 1140167908 1615
+sys/src/fs/9netics64.8k - 20000000775 sys sys 1140158692 0
+sys/src/fs/9netics64.8k/9net64.8kfs.c - 664 sys sys 1140167920 3235
+sys/src/fs/9netics64.8k/dat.h - 664 sys sys 1095751680 611
+sys/src/fs/9netics64.8k/fns.h - 664 sys sys 1140167922 1961
+sys/src/fs/9netics64.8k/io.h - 664 sys sys 1097661949 6688
+sys/src/fs/9netics64.8k/mem.h - 664 sys sys 1140167924 2907
+sys/src/fs/9netics64.8k/mkfile - 664 sys sys 1140167925 1608
 sys/src/fs/choline - 20000000775 sys sys 1015110109 0
-sys/src/fs/choline/9cholinefs.c - 664 sys sys 1041361226 2962
-sys/src/fs/choline/dat.h - 664 sys sys 1037805081 528
-sys/src/fs/choline/fns.h - 664 sys sys 1037805081 1968
-sys/src/fs/choline/io.h - 664 sys sys 1037805081 6576
-sys/src/fs/choline/mem.h - 664 sys sys 1015110108 2865
-sys/src/fs/choline/mkfile - 664 sys sys 1091803608 1676
+sys/src/fs/choline/9cholinefs.c - 664 sys sys 1140168020 2989
+sys/src/fs/choline/dat.h - 664 sys sys 1140168017 612
+sys/src/fs/choline/fns.h - 664 sys sys 1140168018 1961
+sys/src/fs/choline/io.h - 664 sys sys 1140168018 6688
+sys/src/fs/choline/mem.h - 664 sys sys 1140168019 2909
+sys/src/fs/choline/mkfile - 664 sys sys 1140168021 1751
 sys/src/fs/dev - 20000000775 sys sys 1015109978 0
-sys/src/fs/dev/cw.c - 664 sys sys 1047663897 42252
-sys/src/fs/dev/fworm.c - 664 sys sys 1015109971 1737
-sys/src/fs/dev/juke.c - 664 sys sys 1055699807 22892
+sys/src/fs/dev/apc.c - 664 sys sys 1140167918 14910
+sys/src/fs/dev/cw.c - 664 sys sys 1097712558 43252
+sys/src/fs/dev/fworm.c - 664 sys sys 1140167912 1845
+sys/src/fs/dev/juke.c - 664 sys sys 1097578476 22885
 sys/src/fs/dev/mkfile - 664 sys sys 1015109974 132
-sys/src/fs/dev/mworm.c - 664 sys sys 1037805087 4138
-sys/src/fs/dev/sony.c - 664 sys sys 1037805088 17049
-sys/src/fs/dev/wren.c - 664 sys sys 1015109978 2327
+sys/src/fs/dev/mworm.c - 664 sys sys 1140167915 4264
+sys/src/fs/dev/wren.c - 664 sys sys 1140167916 2392
+sys/src/fs/doc - 20000000775 sys sys 1140158639 0
+sys/src/fs/doc/changes - 664 sys sys 1140168029 2967
+sys/src/fs/doc/words - 664 sys sys 1140168029 507
+sys/src/fs/doc/worm.fs - 664 sys sys 1140168030 4057
+sys/src/fs/doc/worm.fs64 - 664 sys sys 1101811981 1554
+sys/src/fs/doc/worms.32-bit - 664 sys sys 1140168032 2806
 sys/src/fs/emelie - 20000000775 sys sys 1015110098 0
-sys/src/fs/emelie/9pcfs.c - 664 sys sys 1041361237 2962
-sys/src/fs/emelie/dat.h - 664 sys sys 1037805101 502
-sys/src/fs/emelie/fns.h - 664 sys sys 1037805101 1968
-sys/src/fs/emelie/io.h - 664 sys sys 1037805101 6576
-sys/src/fs/emelie/mem.h - 664 sys sys 1015110098 2865
-sys/src/fs/emelie/mkfile - 664 sys sys 1091803614 1697
+sys/src/fs/emelie/9emeliefs.c - 664 sys sys 1140168026 2989
+sys/src/fs/emelie/dat.h - 664 sys sys 1140168023 612
+sys/src/fs/emelie/fns.h - 664 sys sys 1140168023 1961
+sys/src/fs/emelie/io.h - 664 sys sys 1140168024 6688
+sys/src/fs/emelie/mem.h - 664 sys sys 1140168025 2909
+sys/src/fs/emelie/mkfile - 664 sys sys 1140168027 1750
+sys/src/fs/fs - 20000000775 sys sys 1140158693 0
+sys/src/fs/fs/9fsfs.c - 664 sys sys 1140168015 3308
+sys/src/fs/fs/dat.h - 664 sys sys 1140168010 611
+sys/src/fs/fs/fns.h - 664 sys sys 1140168011 1961
+sys/src/fs/fs/io.h - 664 sys sys 1097661949 6688
+sys/src/fs/fs/mem.h - 664 sys sys 1140168013 2909
+sys/src/fs/fs/mkfile - 664 sys sys 1140168014 1663
+sys/src/fs/fs64 - 20000000775 sys sys 1140158693 0
+sys/src/fs/fs64/9fsfs64.c - 664 sys sys 1140168004 3294
+sys/src/fs/fs64/dat.h - 664 sys sys 1140168005 611
+sys/src/fs/fs64/fns.h - 664 sys sys 1140168005 1961
+sys/src/fs/fs64/io.h - 664 sys sys 1140168006 6688
+sys/src/fs/fs64/mem.h - 664 sys sys 1020579319 2909
+sys/src/fs/fs64/mkfile - 664 sys sys 1140168008 1603
 sys/src/fs/ip - 20000000775 sys sys 1015109990 0
-sys/src/fs/ip/arp.c - 664 sys sys 1015109981 8696
+sys/src/fs/ip/arp.c - 664 sys sys 1097578954 8696
 sys/src/fs/ip/icmp.c - 664 sys sys 1015109981 991
-sys/src/fs/ip/il.c - 664 sys sys 1015109983 19423
-sys/src/fs/ip/ip.c - 664 sys sys 1015109984 3859
-sys/src/fs/ip/ip.h - 664 sys sys 1015109985 6691
+sys/src/fs/ip/il.c - 664 sys sys 1140167928 19479
+sys/src/fs/ip/ip.c - 664 sys sys 1097578933 3859
+sys/src/fs/ip/ip.h - 664 sys sys 1140167930 6691
 sys/src/fs/ip/ipaux.c - 664 sys sys 1015109986 1041
-sys/src/fs/ip/iproute.c - 664 sys sys 1015109987 7421
+sys/src/fs/ip/iproute.c - 664 sys sys 1097579099 7386
 sys/src/fs/ip/mkfile - 664 sys sys 1015109988 127
 sys/src/fs/ip/sntp.c - 664 sys sys 1037805108 5539
 sys/src/fs/ip/udp.c - 664 sys sys 1015109990 754
-sys/src/fs/mkfile - 664 sys sys 1015110109 195
+sys/src/fs/mkfile - 664 sys sys 1140167932 231
 sys/src/fs/pc - 20000000775 sys sys 1015110085 0
-sys/src/fs/pc/8250.c - 664 sys sys 1015110032 6795
-sys/src/fs/pc/8253.c - 664 sys sys 1032062036 6206
+sys/src/fs/pc/8250.c - 664 sys sys 1140161725 6957
+sys/src/fs/pc/8253.c - 664 sys sys 1097579039 7264
 sys/src/fs/pc/cga.c - 664 sys sys 1015110034 1484
-sys/src/fs/pc/compat.c - 664 sys sys 1037805115 546
-sys/src/fs/pc/compat.h - 664 sys sys 1039794577 1636
-sys/src/fs/pc/devata.c - 664 sys sys 1037805116 26981
-sys/src/fs/pc/dosfs.c - 664 sys sys 1015110040 16461
-sys/src/fs/pc/dosfs.h - 664 sys sys 1037805116 2667
+sys/src/fs/pc/compat.c - 664 sys sys 1140164905 1575
+sys/src/fs/pc/compat.h - 664 sys sys 1140167957 2426
+sys/src/fs/pc/dosfs.c - 664 sys sys 1097712365 16637
+sys/src/fs/pc/dosfs.h - 664 sys sys 1140167937 2696
 sys/src/fs/pc/ether2114x.c - 664 sys sys 1015110044 31874
-sys/src/fs/pc/ether8139.c - 664 sys sys 1039794573 18318
+sys/src/fs/pc/ether8139.c - 664 sys sys 1086569718 18552
 sys/src/fs/pc/ether82557.c - 664 sys sys 1037805116 24037
-sys/src/fs/pc/ether83815.c - 664 sys sys 1037805116 27025
-sys/src/fs/pc/etherdp83820.c - 664 sys sys 1084469622 30749
+sys/src/fs/pc/ether83815.c - 664 sys sys 1079341568 28160
+sys/src/fs/pc/ether83815.mii.c - 664 sys sys 1049156663 31622
+sys/src/fs/pc/etherdp83820.c - 664 sys sys 1092268058 30976
 sys/src/fs/pc/etherelnk3.c - 664 sys sys 1015110054 42732
-sys/src/fs/pc/etherga620.c - 664 sys sys 1032126774 24721
+sys/src/fs/pc/etherga620.c - 664 sys sys 1140166315 24732
 sys/src/fs/pc/etherga620fw.h - 664 sys sys 1032126775 222295
-sys/src/fs/pc/etherif.c - 664 sys sys 1037805117 6324
+sys/src/fs/pc/etherif.c - 664 sys sys 1140162742 6375
 sys/src/fs/pc/etherif.h - 664 sys sys 1015110057 730
-sys/src/fs/pc/ethermii.c - 664 sys sys 1037805117 1247
-sys/src/fs/pc/ethermii.h - 664 sys sys 1037805117 980
-sys/src/fs/pc/floppy.c - 664 sys sys 1047663990 13993
+sys/src/fs/pc/etherigbe.c - 664 sys sys 1131948319 46571
+sys/src/fs/pc/ethermii.c - 664 sys sys 1140167954 4689
+sys/src/fs/pc/ethermii.h - 664 sys sys 1140167955 3259
+sys/src/fs/pc/floppy.c - 664 sys sys 1097579636 14022
 sys/src/fs/pc/kbd.c - 664 sys sys 1015110060 6030
-sys/src/fs/pc/l.s - 664 sys sys 1032062001 10656
+sys/src/fs/pc/l.s - 664 sys sys 1096008336 10838
 sys/src/fs/pc/lock.c - 664 sys sys 1045502910 3591
-sys/src/fs/pc/malloc.c - 664 sys sys 1037805118 2854
-sys/src/fs/pc/mkfile - 664 sys sys 1037805118 369
+sys/src/fs/pc/malloc.c - 664 sys sys 1096789023 2840
+sys/src/fs/pc/mkfile - 664 sys sys 1140167942 426
 sys/src/fs/pc/mmu.c - 664 sys sys 1015110065 8414
 sys/src/fs/pc/nvr.c - 664 sys sys 1015110066 669
-sys/src/fs/pc/pc.c - 664 sys sys 1047663991 7938
-sys/src/fs/pc/pci.c - 664 sys sys 1037805118 11638
+sys/src/fs/pc/pc.c - 664 sys sys 1140167943 7985
+sys/src/fs/pc/pci.c - 664 sys sys 1094949424 12118
 sys/src/fs/pc/script.i - 664 sys sys 1015110072 27323
 sys/src/fs/pc/scsi.c - 664 sys sys 1091803674 8661
 sys/src/fs/pc/scsibuslogic.c - 664 sys sys 1015110077 28645
-sys/src/fs/pc/scsincr53c8xx.c - 664 sys sys 1037805119 53483
-sys/src/fs/pc/toy.c - 664 sys sys 1015110085 2166
+sys/src/fs/pc/scsincr53c8xx.c - 664 sys sys 1112488792 53673
+sys/src/fs/pc/sdata.c - 664 sys sys 1097712291 61793
+sys/src/fs/pc/sdscsi.c - 664 sys sys 1140164880 7042
+sys/src/fs/pc/toy.c - 664 sys sys 1140167948 2166
 sys/src/fs/pc/trap.c - 664 sys sys 1055699801 7946
 sys/src/fs/port - 20000000775 sys sys 1015110029 0
-sys/src/fs/port/9p1.c - 664 sys sys 1015109993 30114
-sys/src/fs/port/9p1.h - 664 sys sys 1015109994 2122
-sys/src/fs/port/9p1lib.c - 664 sys sys 1015109996 7629
-sys/src/fs/port/9p2.c - 664 sys sys 1044290935 36142
-sys/src/fs/port/all.h - 664 sys sys 1045502862 1927
-sys/src/fs/port/auth.c - 664 sys sys 1041361345 7608
-sys/src/fs/port/chk.c - 664 sys sys 1047663951 14533
-sys/src/fs/port/clock.c - 664 sys sys 1015110006 4033
-sys/src/fs/port/con.c - 664 sys sys 1037805158 16254
-sys/src/fs/port/config.c - 664 sys sys 1047663951 18054
-sys/src/fs/port/console.c - 664 sys sys 1015110011 4821
-sys/src/fs/port/data.c - 664 sys sys 1041361346 4411
-sys/src/fs/port/dentry.c - 664 sys sys 1015110013 3801
-sys/src/fs/port/devcons.c - 664 sys sys 1015110014 4329
+sys/src/fs/port/9p1.c - 664 sys sys 1140167971 29982
+sys/src/fs/port/9p1.h - 664 sys sys 1140167972 2128
+sys/src/fs/port/9p1lib.c - 664 sys sys 1101627232 7911
+sys/src/fs/port/9p2.c - 664 sys sys 1098094593 36248
+sys/src/fs/port/all.h - 664 sys sys 1140167977 1932
+sys/src/fs/port/auth.c - 664 sys sys 1097573906 7609
+sys/src/fs/port/chk.c - 664 sys sys 1097832483 15683
+sys/src/fs/port/clock.c - 664 sys sys 1097580538 4033
+sys/src/fs/port/con.c - 664 sys sys 1097580641 16327
+sys/src/fs/port/config.c - 664 sys sys 1107835943 20264
+sys/src/fs/port/console.c - 664 sys sys 1101627646 4886
+sys/src/fs/port/data.c - 664 sys sys 1140167986 4510
+sys/src/fs/port/dentry.c - 664 sys sys 1098156404 6345
+sys/src/fs/port/devcons.c - 664 sys sys 1095983755 4451
+sys/src/fs/port/devsd.c - 664 sys sys 1097712378 10993
 sys/src/fs/port/fcmd.c - 664 sys sys 1015110015 1266
-sys/src/fs/port/iobuf.c - 664 sys sys 1045502864 4845
-sys/src/fs/port/lib.h - 664 sys sys 1091803590 3339
+sys/src/fs/port/fs.h - 664 sys sys 1140168001 682
+sys/src/fs/port/iobuf.c - 664 sys sys 1140167988 4956
+sys/src/fs/port/lib.h - 664 sys sys 1091960844 3701
 sys/src/fs/port/lrand.c - 664 sys sys 1091803568 1093
-sys/src/fs/port/main.c - 664 sys sys 1047663952 5698
-sys/src/fs/port/mkfile - 664 sys sys 1015110018 189
-sys/src/fs/port/portdat.h - 664 sys sys 1091849428 16750
-sys/src/fs/port/portfns.h - 664 sys sys 1037805159 7454
+sys/src/fs/port/main.c - 664 sys sys 1140167990 7639
+sys/src/fs/port/mkfile - 664 sys sys 1140167991 214
+sys/src/fs/port/portdat.h - 664 sys sys 1140163786 19670
+sys/src/fs/port/portfns.h - 664 sys sys 1140167994 7526
 sys/src/fs/port/print.c - 664 sys sys 1015110022 153
-sys/src/fs/port/proc.c - 664 sys sys 1015110023 5244
-sys/src/fs/port/sub.c - 664 sys sys 1045502866 23708
-sys/src/fs/port/time.c - 664 sys sys 1041361347 6179
-sys/src/fs/port/uidgid.c - 664 sys sys 1015110030 9194
-sys/src/fs/roro - 20000000775 sys sys 1015110093 0
-sys/src/fs/roro/9rorofs.c - 664 sys sys 1041361248 2914
-sys/src/fs/roro/dat.h - 664 sys sys 1037805167 502
-sys/src/fs/roro/fns.h - 664 sys sys 1037805167 1968
-sys/src/fs/roro/io.h - 664 sys sys 1037805168 6576
-sys/src/fs/roro/mem.h - 664 sys sys 1015110092 2865
-sys/src/fs/roro/mkfile - 664 sys sys 1091803629 1650
-sys/src/fs/sony - 20000000775 sys sys 1015110104 0
-sys/src/fs/sony/9sonyfs.c - 664 sys sys 1041361261 2962
-sys/src/fs/sony/dat.h - 664 sys sys 1037805175 490
-sys/src/fs/sony/fns.h - 664 sys sys 1037805175 1968
-sys/src/fs/sony/io.h - 664 sys sys 1037805175 6576
-sys/src/fs/sony/mem.h - 664 sys sys 1015110103 2865
-sys/src/fs/sony/mkfile - 664 sys sys 1091803623 1594
-sys/src/fs/worms - 664 sys sys 1015110031 2806
+sys/src/fs/port/proc.c - 664 sys sys 1097580775 5364
+sys/src/fs/port/sd.h - 664 sys sys 1097577251 2167
+sys/src/fs/port/sub.c - 664 sys sys 1098157264 25628
+sys/src/fs/port/time.c - 664 sys sys 1140167998 6222
+sys/src/fs/port/uidgid.c - 664 sys sys 1097574050 9192
 sys/src/games - 20000000775 sys sys 1095792091 0
 sys/src/games/4s.c - 664 sys sys 1128271724 1285
 sys/src/games/5s.c - 664 sys sys 1128271724 3621
@@ -14397,7 +14424,7 @@ sys/src/games/mahjongg/mahjongg.c - 664 sys sys 1137080360 3631
 sys/src/games/mahjongg/mahjongg.h - 664 sys sys 1137080360 1687
 sys/src/games/mahjongg/mkfile - 664 sys sys 1095792293 230
 sys/src/games/memo.c - 664 sys sys 1130853201 6471
-sys/src/games/mkfile - 664 sys sys 1128271766 586
+sys/src/games/mkfile - 664 sys sys 1140203009 595
 sys/src/games/music - 20000000775 sys sys 1103793915 0
 sys/src/games/music/Readme - 664 sys sys 1103793914 488
 sys/src/games/music/debug.h - 664 sys sys 1103793914 201

+ 125 - 98
dist/replica/plan9.db

@@ -5635,18 +5635,20 @@ sys/doc/fossil.ms - 664 sys sys 1138396406 31439
 sys/doc/fossil.pdf - 664 sys sys 1042123169 63200
 sys/doc/fossil.ps - 664 sys sys 1135487951 313552
 sys/doc/fs - 20000000775 sys sys 945616779 0
-sys/doc/fs/fs.pdf - 664 sys sys 1020384351 47177
-sys/doc/fs/fs.ps - 664 sys sys 960837905 276918
-sys/doc/fs/mkfile - 664 sys sys 1138459286 273
-sys/doc/fs/p0 - 664 sys sys 1138396562 682
-sys/doc/fs/p1 - 664 sys sys 953844581 989
-sys/doc/fs/p2 - 664 sys sys 953844581 3749
+sys/doc/fs/fs.pdf - 664 sys sys 1140157478 64965
+sys/doc/fs/fs.ps - 664 sys sys 1140157389 298023
+sys/doc/fs/mkfile - 664 sys sys 1140157064 366
+sys/doc/fs/p0 - 664 sys sys 1138445459 1677
+sys/doc/fs/p1 - 664 sys sys 1094002291 800
+sys/doc/fs/p2 - 664 sys sys 1094112719 3775
 sys/doc/fs/p3 - 664 sys sys 944959592 1475
-sys/doc/fs/p4 - 664 sys sys 953844581 3662
-sys/doc/fs/p5 - 664 sys sys 944959592 1143
-sys/doc/fs/p6 - 664 sys sys 953844573 6235
-sys/doc/fs/p7 - 664 sys sys 953844581 958
+sys/doc/fs/p4 - 664 sys sys 1094178190 5764
+sys/doc/fs/p5 - 664 sys sys 1094002662 1140
+sys/doc/fs/p6 - 664 sys sys 1094177480 6091
+sys/doc/fs/p7 - 664 sys sys 1094000398 960
 sys/doc/fs/p8 - 664 sys sys 953844574 881
+sys/doc/fs/p9 - 664 sys sys 1140157346 659
+sys/doc/fs/pa - 664 sys sys 1094002902 2027
 sys/doc/il - 20000000775 sys sys 945616779 0
 sys/doc/il/il.ms - 664 sys sys 1138396552 11390
 sys/doc/il/il.pdf - 664 sys sys 1020384351 44630
@@ -7583,7 +7585,7 @@ sys/man/4/acme - 664 sys sys 1134233060 10274
 sys/man/4/archfs - 664 sys sys 960000712 533
 sys/man/4/cdfs - 664 sys sys 1026846913 3638
 sys/man/4/cfs - 664 sys sys 1015024813 1758
-sys/man/4/consolefs - 664 sys sys 1069179473 3920
+sys/man/4/consolefs - 664 sys sys 1140209468 4241
 sys/man/4/dossrv - 664 sys sys 1015024813 4176
 sys/man/4/execnet - 664 sys sys 1019866708 1069
 sys/man/4/exportfs - 664 sys sys 1115314261 4653
@@ -7696,7 +7698,7 @@ sys/man/8/dhcpd - 664 sys sys 1032654987 5237
 sys/man/8/drawterm - 664 sys sys 1135901219 1741
 sys/man/8/fossilcons - 664 sys sys 1138466274 18276
 sys/man/8/fs - 664 sys sys 1055701170 15029
-sys/man/8/fsconfig - 664 sys sys 1045501600 8142
+sys/man/8/fsconfig - 664 sys sys 1107841165 8350
 sys/man/8/getflags - 664 sys sys 1139839200 1712
 sys/man/8/gpsfs - 664 sys sys 1123643451 4924
 sys/man/8/httpd - 664 sys sys 1121198377 6675
@@ -14269,120 +14271,145 @@ sys/src/cmd/winwatch.c - 664 sys sys 1113312596 4869
 sys/src/cmd/xd.c - 664 sys sys 1124993597 5770
 sys/src/cmd/yacc.c - 664 sys sys 1116770313 57945
 sys/src/fs - 20000000775 sys sys 1015110109 0
+sys/src/fs/9netics32.16k - 20000000775 sys sys 1140158691 0
+sys/src/fs/9netics32.16k/9net32.16kfs.c - 664 sys sys 1140167903 3208
+sys/src/fs/9netics32.16k/dat.h - 664 sys sys 1140167904 612
+sys/src/fs/9netics32.16k/fns.h - 664 sys sys 1140167905 1961
+sys/src/fs/9netics32.16k/io.h - 664 sys sys 1097661949 6688
+sys/src/fs/9netics32.16k/mem.h - 664 sys sys 1140167906 2907
+sys/src/fs/9netics32.16k/mkfile - 664 sys sys 1140167908 1615
+sys/src/fs/9netics64.8k - 20000000775 sys sys 1140158692 0
+sys/src/fs/9netics64.8k/9net64.8kfs.c - 664 sys sys 1140167920 3235
+sys/src/fs/9netics64.8k/dat.h - 664 sys sys 1095751680 611
+sys/src/fs/9netics64.8k/fns.h - 664 sys sys 1140167922 1961
+sys/src/fs/9netics64.8k/io.h - 664 sys sys 1097661949 6688
+sys/src/fs/9netics64.8k/mem.h - 664 sys sys 1140167924 2907
+sys/src/fs/9netics64.8k/mkfile - 664 sys sys 1140167925 1608
 sys/src/fs/choline - 20000000775 sys sys 1015110109 0
-sys/src/fs/choline/9cholinefs.c - 664 sys sys 1041361226 2962
-sys/src/fs/choline/dat.h - 664 sys sys 1037805081 528
-sys/src/fs/choline/fns.h - 664 sys sys 1037805081 1968
-sys/src/fs/choline/io.h - 664 sys sys 1037805081 6576
-sys/src/fs/choline/mem.h - 664 sys sys 1015110108 2865
-sys/src/fs/choline/mkfile - 664 sys sys 1091803608 1676
+sys/src/fs/choline/9cholinefs.c - 664 sys sys 1140168020 2989
+sys/src/fs/choline/dat.h - 664 sys sys 1140168017 612
+sys/src/fs/choline/fns.h - 664 sys sys 1140168018 1961
+sys/src/fs/choline/io.h - 664 sys sys 1140168018 6688
+sys/src/fs/choline/mem.h - 664 sys sys 1140168019 2909
+sys/src/fs/choline/mkfile - 664 sys sys 1140168021 1751
 sys/src/fs/dev - 20000000775 sys sys 1015109978 0
-sys/src/fs/dev/cw.c - 664 sys sys 1047663897 42252
-sys/src/fs/dev/fworm.c - 664 sys sys 1015109971 1737
-sys/src/fs/dev/juke.c - 664 sys sys 1055699807 22892
+sys/src/fs/dev/apc.c - 664 sys sys 1140167918 14910
+sys/src/fs/dev/cw.c - 664 sys sys 1097712558 43252
+sys/src/fs/dev/fworm.c - 664 sys sys 1140167912 1845
+sys/src/fs/dev/juke.c - 664 sys sys 1097578476 22885
 sys/src/fs/dev/mkfile - 664 sys sys 1015109974 132
-sys/src/fs/dev/mworm.c - 664 sys sys 1037805087 4138
-sys/src/fs/dev/sony.c - 664 sys sys 1037805088 17049
-sys/src/fs/dev/wren.c - 664 sys sys 1015109978 2327
+sys/src/fs/dev/mworm.c - 664 sys sys 1140167915 4264
+sys/src/fs/dev/wren.c - 664 sys sys 1140167916 2392
+sys/src/fs/doc - 20000000775 sys sys 1140158639 0
+sys/src/fs/doc/changes - 664 sys sys 1140168029 2967
+sys/src/fs/doc/words - 664 sys sys 1140168029 507
+sys/src/fs/doc/worm.fs - 664 sys sys 1140168030 4057
+sys/src/fs/doc/worm.fs64 - 664 sys sys 1101811981 1554
+sys/src/fs/doc/worms.32-bit - 664 sys sys 1140168032 2806
 sys/src/fs/emelie - 20000000775 sys sys 1015110098 0
-sys/src/fs/emelie/9pcfs.c - 664 sys sys 1041361237 2962
-sys/src/fs/emelie/dat.h - 664 sys sys 1037805101 502
-sys/src/fs/emelie/fns.h - 664 sys sys 1037805101 1968
-sys/src/fs/emelie/io.h - 664 sys sys 1037805101 6576
-sys/src/fs/emelie/mem.h - 664 sys sys 1015110098 2865
-sys/src/fs/emelie/mkfile - 664 sys sys 1091803614 1697
+sys/src/fs/emelie/9emeliefs.c - 664 sys sys 1140168026 2989
+sys/src/fs/emelie/dat.h - 664 sys sys 1140168023 612
+sys/src/fs/emelie/fns.h - 664 sys sys 1140168023 1961
+sys/src/fs/emelie/io.h - 664 sys sys 1140168024 6688
+sys/src/fs/emelie/mem.h - 664 sys sys 1140168025 2909
+sys/src/fs/emelie/mkfile - 664 sys sys 1140168027 1750
+sys/src/fs/fs - 20000000775 sys sys 1140158693 0
+sys/src/fs/fs/9fsfs.c - 664 sys sys 1140168015 3308
+sys/src/fs/fs/dat.h - 664 sys sys 1140168010 611
+sys/src/fs/fs/fns.h - 664 sys sys 1140168011 1961
+sys/src/fs/fs/io.h - 664 sys sys 1097661949 6688
+sys/src/fs/fs/mem.h - 664 sys sys 1140168013 2909
+sys/src/fs/fs/mkfile - 664 sys sys 1140168014 1663
+sys/src/fs/fs64 - 20000000775 sys sys 1140158693 0
+sys/src/fs/fs64/9fsfs64.c - 664 sys sys 1140168004 3294
+sys/src/fs/fs64/dat.h - 664 sys sys 1140168005 611
+sys/src/fs/fs64/fns.h - 664 sys sys 1140168005 1961
+sys/src/fs/fs64/io.h - 664 sys sys 1140168006 6688
+sys/src/fs/fs64/mem.h - 664 sys sys 1020579319 2909
+sys/src/fs/fs64/mkfile - 664 sys sys 1140168008 1603
 sys/src/fs/ip - 20000000775 sys sys 1015109990 0
-sys/src/fs/ip/arp.c - 664 sys sys 1015109981 8696
+sys/src/fs/ip/arp.c - 664 sys sys 1097578954 8696
 sys/src/fs/ip/icmp.c - 664 sys sys 1015109981 991
-sys/src/fs/ip/il.c - 664 sys sys 1015109983 19423
-sys/src/fs/ip/ip.c - 664 sys sys 1015109984 3859
-sys/src/fs/ip/ip.h - 664 sys sys 1015109985 6691
+sys/src/fs/ip/il.c - 664 sys sys 1140167928 19479
+sys/src/fs/ip/ip.c - 664 sys sys 1097578933 3859
+sys/src/fs/ip/ip.h - 664 sys sys 1140167930 6691
 sys/src/fs/ip/ipaux.c - 664 sys sys 1015109986 1041
-sys/src/fs/ip/iproute.c - 664 sys sys 1015109987 7421
+sys/src/fs/ip/iproute.c - 664 sys sys 1097579099 7386
 sys/src/fs/ip/mkfile - 664 sys sys 1015109988 127
 sys/src/fs/ip/sntp.c - 664 sys sys 1037805108 5539
 sys/src/fs/ip/udp.c - 664 sys sys 1015109990 754
-sys/src/fs/mkfile - 664 sys sys 1015110109 195
+sys/src/fs/mkfile - 664 sys sys 1140167932 231
 sys/src/fs/pc - 20000000775 sys sys 1015110085 0
-sys/src/fs/pc/8250.c - 664 sys sys 1015110032 6795
-sys/src/fs/pc/8253.c - 664 sys sys 1032062036 6206
+sys/src/fs/pc/8250.c - 664 sys sys 1140161725 6957
+sys/src/fs/pc/8253.c - 664 sys sys 1097579039 7264
 sys/src/fs/pc/cga.c - 664 sys sys 1015110034 1484
-sys/src/fs/pc/compat.c - 664 sys sys 1037805115 546
-sys/src/fs/pc/compat.h - 664 sys sys 1039794577 1636
-sys/src/fs/pc/devata.c - 664 sys sys 1037805116 26981
-sys/src/fs/pc/dosfs.c - 664 sys sys 1015110040 16461
-sys/src/fs/pc/dosfs.h - 664 sys sys 1037805116 2667
+sys/src/fs/pc/compat.c - 664 sys sys 1140164905 1575
+sys/src/fs/pc/compat.h - 664 sys sys 1140167957 2426
+sys/src/fs/pc/dosfs.c - 664 sys sys 1097712365 16637
+sys/src/fs/pc/dosfs.h - 664 sys sys 1140167937 2696
 sys/src/fs/pc/ether2114x.c - 664 sys sys 1015110044 31874
-sys/src/fs/pc/ether8139.c - 664 sys sys 1039794573 18318
+sys/src/fs/pc/ether8139.c - 664 sys sys 1086569718 18552
 sys/src/fs/pc/ether82557.c - 664 sys sys 1037805116 24037
-sys/src/fs/pc/ether83815.c - 664 sys sys 1037805116 27025
-sys/src/fs/pc/etherdp83820.c - 664 sys sys 1084469622 30749
+sys/src/fs/pc/ether83815.c - 664 sys sys 1079341568 28160
+sys/src/fs/pc/ether83815.mii.c - 664 sys sys 1049156663 31622
+sys/src/fs/pc/etherdp83820.c - 664 sys sys 1092268058 30976
 sys/src/fs/pc/etherelnk3.c - 664 sys sys 1015110054 42732
-sys/src/fs/pc/etherga620.c - 664 sys sys 1032126774 24721
+sys/src/fs/pc/etherga620.c - 664 sys sys 1140166315 24732
 sys/src/fs/pc/etherga620fw.h - 664 sys sys 1032126775 222295
-sys/src/fs/pc/etherif.c - 664 sys sys 1037805117 6324
+sys/src/fs/pc/etherif.c - 664 sys sys 1140162742 6375
 sys/src/fs/pc/etherif.h - 664 sys sys 1015110057 730
-sys/src/fs/pc/ethermii.c - 664 sys sys 1037805117 1247
-sys/src/fs/pc/ethermii.h - 664 sys sys 1037805117 980
-sys/src/fs/pc/floppy.c - 664 sys sys 1047663990 13993
+sys/src/fs/pc/etherigbe.c - 664 sys sys 1131948319 46571
+sys/src/fs/pc/ethermii.c - 664 sys sys 1140167954 4689
+sys/src/fs/pc/ethermii.h - 664 sys sys 1140167955 3259
+sys/src/fs/pc/floppy.c - 664 sys sys 1097579636 14022
 sys/src/fs/pc/kbd.c - 664 sys sys 1015110060 6030
-sys/src/fs/pc/l.s - 664 sys sys 1032062001 10656
+sys/src/fs/pc/l.s - 664 sys sys 1096008336 10838
 sys/src/fs/pc/lock.c - 664 sys sys 1045502910 3591
-sys/src/fs/pc/malloc.c - 664 sys sys 1037805118 2854
-sys/src/fs/pc/mkfile - 664 sys sys 1037805118 369
+sys/src/fs/pc/malloc.c - 664 sys sys 1096789023 2840
+sys/src/fs/pc/mkfile - 664 sys sys 1140167942 426
 sys/src/fs/pc/mmu.c - 664 sys sys 1015110065 8414
 sys/src/fs/pc/nvr.c - 664 sys sys 1015110066 669
-sys/src/fs/pc/pc.c - 664 sys sys 1047663991 7938
-sys/src/fs/pc/pci.c - 664 sys sys 1037805118 11638
+sys/src/fs/pc/pc.c - 664 sys sys 1140167943 7985
+sys/src/fs/pc/pci.c - 664 sys sys 1094949424 12118
 sys/src/fs/pc/script.i - 664 sys sys 1015110072 27323
 sys/src/fs/pc/scsi.c - 664 sys sys 1091803674 8661
 sys/src/fs/pc/scsibuslogic.c - 664 sys sys 1015110077 28645
-sys/src/fs/pc/scsincr53c8xx.c - 664 sys sys 1037805119 53483
-sys/src/fs/pc/toy.c - 664 sys sys 1015110085 2166
+sys/src/fs/pc/scsincr53c8xx.c - 664 sys sys 1112488792 53673
+sys/src/fs/pc/sdata.c - 664 sys sys 1097712291 61793
+sys/src/fs/pc/sdscsi.c - 664 sys sys 1140164880 7042
+sys/src/fs/pc/toy.c - 664 sys sys 1140167948 2166
 sys/src/fs/pc/trap.c - 664 sys sys 1055699801 7946
 sys/src/fs/port - 20000000775 sys sys 1015110029 0
-sys/src/fs/port/9p1.c - 664 sys sys 1015109993 30114
-sys/src/fs/port/9p1.h - 664 sys sys 1015109994 2122
-sys/src/fs/port/9p1lib.c - 664 sys sys 1015109996 7629
-sys/src/fs/port/9p2.c - 664 sys sys 1044290935 36142
-sys/src/fs/port/all.h - 664 sys sys 1045502862 1927
-sys/src/fs/port/auth.c - 664 sys sys 1041361345 7608
-sys/src/fs/port/chk.c - 664 sys sys 1047663951 14533
-sys/src/fs/port/clock.c - 664 sys sys 1015110006 4033
-sys/src/fs/port/con.c - 664 sys sys 1037805158 16254
-sys/src/fs/port/config.c - 664 sys sys 1047663951 18054
-sys/src/fs/port/console.c - 664 sys sys 1015110011 4821
-sys/src/fs/port/data.c - 664 sys sys 1041361346 4411
-sys/src/fs/port/dentry.c - 664 sys sys 1015110013 3801
-sys/src/fs/port/devcons.c - 664 sys sys 1015110014 4329
+sys/src/fs/port/9p1.c - 664 sys sys 1140167971 29982
+sys/src/fs/port/9p1.h - 664 sys sys 1140167972 2128
+sys/src/fs/port/9p1lib.c - 664 sys sys 1101627232 7911
+sys/src/fs/port/9p2.c - 664 sys sys 1098094593 36248
+sys/src/fs/port/all.h - 664 sys sys 1140167977 1932
+sys/src/fs/port/auth.c - 664 sys sys 1097573906 7609
+sys/src/fs/port/chk.c - 664 sys sys 1097832483 15683
+sys/src/fs/port/clock.c - 664 sys sys 1097580538 4033
+sys/src/fs/port/con.c - 664 sys sys 1097580641 16327
+sys/src/fs/port/config.c - 664 sys sys 1107835943 20264
+sys/src/fs/port/console.c - 664 sys sys 1101627646 4886
+sys/src/fs/port/data.c - 664 sys sys 1140167986 4510
+sys/src/fs/port/dentry.c - 664 sys sys 1098156404 6345
+sys/src/fs/port/devcons.c - 664 sys sys 1095983755 4451
+sys/src/fs/port/devsd.c - 664 sys sys 1097712378 10993
 sys/src/fs/port/fcmd.c - 664 sys sys 1015110015 1266
-sys/src/fs/port/iobuf.c - 664 sys sys 1045502864 4845
-sys/src/fs/port/lib.h - 664 sys sys 1091803590 3339
+sys/src/fs/port/fs.h - 664 sys sys 1140168001 682
+sys/src/fs/port/iobuf.c - 664 sys sys 1140167988 4956
+sys/src/fs/port/lib.h - 664 sys sys 1091960844 3701
 sys/src/fs/port/lrand.c - 664 sys sys 1091803568 1093
-sys/src/fs/port/main.c - 664 sys sys 1047663952 5698
-sys/src/fs/port/mkfile - 664 sys sys 1015110018 189
-sys/src/fs/port/portdat.h - 664 sys sys 1091849428 16750
-sys/src/fs/port/portfns.h - 664 sys sys 1037805159 7454
+sys/src/fs/port/main.c - 664 sys sys 1140167990 7639
+sys/src/fs/port/mkfile - 664 sys sys 1140167991 214
+sys/src/fs/port/portdat.h - 664 sys sys 1140163786 19670
+sys/src/fs/port/portfns.h - 664 sys sys 1140167994 7526
 sys/src/fs/port/print.c - 664 sys sys 1015110022 153
-sys/src/fs/port/proc.c - 664 sys sys 1015110023 5244
-sys/src/fs/port/sub.c - 664 sys sys 1045502866 23708
-sys/src/fs/port/time.c - 664 sys sys 1041361347 6179
-sys/src/fs/port/uidgid.c - 664 sys sys 1015110030 9194
-sys/src/fs/roro - 20000000775 sys sys 1015110093 0
-sys/src/fs/roro/9rorofs.c - 664 sys sys 1041361248 2914
-sys/src/fs/roro/dat.h - 664 sys sys 1037805167 502
-sys/src/fs/roro/fns.h - 664 sys sys 1037805167 1968
-sys/src/fs/roro/io.h - 664 sys sys 1037805168 6576
-sys/src/fs/roro/mem.h - 664 sys sys 1015110092 2865
-sys/src/fs/roro/mkfile - 664 sys sys 1091803629 1650
-sys/src/fs/sony - 20000000775 sys sys 1015110104 0
-sys/src/fs/sony/9sonyfs.c - 664 sys sys 1041361261 2962
-sys/src/fs/sony/dat.h - 664 sys sys 1037805175 490
-sys/src/fs/sony/fns.h - 664 sys sys 1037805175 1968
-sys/src/fs/sony/io.h - 664 sys sys 1037805175 6576
-sys/src/fs/sony/mem.h - 664 sys sys 1015110103 2865
-sys/src/fs/sony/mkfile - 664 sys sys 1091803623 1594
-sys/src/fs/worms - 664 sys sys 1015110031 2806
+sys/src/fs/port/proc.c - 664 sys sys 1097580775 5364
+sys/src/fs/port/sd.h - 664 sys sys 1097577251 2167
+sys/src/fs/port/sub.c - 664 sys sys 1098157264 25628
+sys/src/fs/port/time.c - 664 sys sys 1140167998 6222
+sys/src/fs/port/uidgid.c - 664 sys sys 1097574050 9192
 sys/src/games - 20000000775 sys sys 1095792091 0
 sys/src/games/4s.c - 664 sys sys 1128271724 1285
 sys/src/games/5s.c - 664 sys sys 1128271724 3621
@@ -14397,7 +14424,7 @@ sys/src/games/mahjongg/mahjongg.c - 664 sys sys 1137080360 3631
 sys/src/games/mahjongg/mahjongg.h - 664 sys sys 1137080360 1687
 sys/src/games/mahjongg/mkfile - 664 sys sys 1095792293 230
 sys/src/games/memo.c - 664 sys sys 1130853201 6471
-sys/src/games/mkfile - 664 sys sys 1128271766 586
+sys/src/games/mkfile - 664 sys sys 1140203009 595
 sys/src/games/music - 20000000775 sys sys 1103793915 0
 sys/src/games/music/Readme - 664 sys sys 1103793914 488
 sys/src/games/music/debug.h - 664 sys sys 1103793914 201

+ 143 - 0
dist/replica/plan9.log

@@ -27617,3 +27617,146 @@
 1140112894 0 c 386/bin/iostats - 775 sys sys 1140112236 100160
 1140121896 0 c 386/bin/fossil/fossil - 775 sys sys 1140121256 363650
 1140139901 0 d sys/doc/fs/xx - 664 sys sys 944959592 0
+1140157906 0 c sys/doc/fs/fs.pdf - 664 sys sys 1140157478 64965
+1140157906 1 c sys/doc/fs/fs.ps - 664 sys sys 1140157389 298023
+1140157906 2 c sys/doc/fs/mkfile - 664 sys sys 1140157064 366
+1140157906 3 c sys/doc/fs/p0 - 664 sys sys 1138445459 1677
+1140157906 4 c sys/doc/fs/p1 - 664 sys sys 1094002291 800
+1140157906 5 c sys/doc/fs/p2 - 664 sys sys 1094112719 3775
+1140157906 6 c sys/doc/fs/p4 - 664 sys sys 1094178190 5764
+1140157906 7 c sys/doc/fs/p5 - 664 sys sys 1094002662 1140
+1140157906 8 c sys/doc/fs/p6 - 664 sys sys 1094177480 6091
+1140157906 9 c sys/doc/fs/p7 - 664 sys sys 1094000398 960
+1140157906 10 a sys/doc/fs/p9 - 664 sys sys 1140157346 659
+1140157906 11 a sys/doc/fs/pa - 664 sys sys 1094002902 2027
+1140157906 12 c sys/man/8/fsconfig - 664 sys sys 1107841165 8350
+1140159707 0 a sys/src/fs/9netics32.16k - 20000000775 sys sys 1140158691 0
+1140159707 1 a sys/src/fs/9netics64.8k - 20000000775 sys sys 1140158692 0
+1140159707 2 a sys/src/fs/doc - 20000000775 sys sys 1140158639 0
+1140159707 3 a sys/src/fs/fs - 20000000775 sys sys 1140158693 0
+1140159707 4 a sys/src/fs/fs64 - 20000000775 sys sys 1140158693 0
+1140159707 5 d sys/src/fs/sony/mkfile - 664 sys sys 1091803623 0
+1140159707 6 d sys/src/fs/sony/mem.h - 664 sys sys 1015110103 0
+1140159707 7 d sys/src/fs/sony/io.h - 664 sys sys 1037805175 0
+1140159707 8 d sys/src/fs/sony/fns.h - 664 sys sys 1037805175 0
+1140159707 9 d sys/src/fs/sony/dat.h - 664 sys sys 1037805175 0
+1140159707 10 d sys/src/fs/sony/9sonyfs.c - 664 sys sys 1041361261 0
+1140159707 11 d sys/src/fs/sony - 20000000775 sys sys 1015110104 0
+1140159707 12 d sys/src/fs/roro/mkfile - 664 sys sys 1091803629 0
+1140159707 13 d sys/src/fs/roro/mem.h - 664 sys sys 1015110092 0
+1140159707 14 d sys/src/fs/roro/io.h - 664 sys sys 1037805168 0
+1140159707 15 d sys/src/fs/roro/fns.h - 664 sys sys 1037805167 0
+1140159707 16 d sys/src/fs/roro/dat.h - 664 sys sys 1037805167 0
+1140159707 17 d sys/src/fs/roro/9rorofs.c - 664 sys sys 1041361248 0
+1140159707 18 d sys/src/fs/roro - 20000000775 sys sys 1015110093 0
+1140168708 0 a sys/src/fs/9netics32.16k/9net32.16kfs.c - 664 sys sys 1140167903 3208
+1140168708 1 a sys/src/fs/9netics32.16k/dat.h - 664 sys sys 1140167904 612
+1140168708 2 a sys/src/fs/9netics32.16k/fns.h - 664 sys sys 1140167905 1961
+1140168708 3 a sys/src/fs/9netics32.16k/io.h - 664 sys sys 1097661949 6688
+1140168708 4 a sys/src/fs/9netics32.16k/mem.h - 664 sys sys 1140167906 2907
+1140168708 5 a sys/src/fs/9netics32.16k/mkfile - 664 sys sys 1140167908 1615
+1140168708 6 a sys/src/fs/9netics64.8k/9net64.8kfs.c - 664 sys sys 1140167920 3235
+1140168708 7 a sys/src/fs/9netics64.8k/dat.h - 664 sys sys 1095751680 611
+1140168708 8 a sys/src/fs/9netics64.8k/fns.h - 664 sys sys 1140167922 1961
+1140168708 9 a sys/src/fs/9netics64.8k/io.h - 664 sys sys 1097661949 6688
+1140168708 10 a sys/src/fs/9netics64.8k/mem.h - 664 sys sys 1140167924 2907
+1140168708 11 a sys/src/fs/9netics64.8k/mkfile - 664 sys sys 1140167925 1608
+1140168708 12 c sys/src/fs/choline/9cholinefs.c - 664 sys sys 1140168020 2989
+1140168708 13 c sys/src/fs/choline/dat.h - 664 sys sys 1140168017 612
+1140168708 14 c sys/src/fs/choline/fns.h - 664 sys sys 1140168018 1961
+1140168708 15 c sys/src/fs/choline/io.h - 664 sys sys 1140168018 6688
+1140168708 16 c sys/src/fs/choline/mem.h - 664 sys sys 1140168019 2909
+1140168708 17 c sys/src/fs/choline/mkfile - 664 sys sys 1140168021 1751
+1140168708 18 a sys/src/fs/dev/apc.c - 664 sys sys 1140167918 14910
+1140168708 19 c sys/src/fs/dev/cw.c - 664 sys sys 1097712558 43252
+1140168708 20 c sys/src/fs/dev/fworm.c - 664 sys sys 1140167912 1845
+1140168708 21 c sys/src/fs/dev/juke.c - 664 sys sys 1097578476 22885
+1140168708 22 c sys/src/fs/dev/mworm.c - 664 sys sys 1140167915 4264
+1140168708 23 c sys/src/fs/dev/wren.c - 664 sys sys 1140167916 2392
+1140168708 24 a sys/src/fs/doc/changes - 664 sys sys 1140168029 2967
+1140168708 25 a sys/src/fs/doc/words - 664 sys sys 1140168029 507
+1140168708 26 a sys/src/fs/doc/worm.fs - 664 sys sys 1140168030 4057
+1140168708 27 a sys/src/fs/doc/worm.fs64 - 664 sys sys 1101811981 1554
+1140168708 28 a sys/src/fs/doc/worms.32-bit - 664 sys sys 1140168032 2806
+1140168708 29 a sys/src/fs/emelie/9emeliefs.c - 664 sys sys 1140168026 2989
+1140168708 30 c sys/src/fs/emelie/dat.h - 664 sys sys 1140168023 612
+1140168708 31 c sys/src/fs/emelie/fns.h - 664 sys sys 1140168023 1961
+1140168708 32 c sys/src/fs/emelie/io.h - 664 sys sys 1140168024 6688
+1140168708 33 c sys/src/fs/emelie/mem.h - 664 sys sys 1140168025 2909
+1140168708 34 c sys/src/fs/emelie/mkfile - 664 sys sys 1140168027 1750
+1140168708 35 a sys/src/fs/fs/9fsfs.c - 664 sys sys 1140168015 3308
+1140168708 36 a sys/src/fs/fs/dat.h - 664 sys sys 1140168010 611
+1140168708 37 a sys/src/fs/fs/fns.h - 664 sys sys 1140168011 1961
+1140168708 38 a sys/src/fs/fs/io.h - 664 sys sys 1097661949 6688
+1140168708 39 a sys/src/fs/fs/mem.h - 664 sys sys 1140168013 2909
+1140168708 40 a sys/src/fs/fs/mkfile - 664 sys sys 1140168014 1663
+1140168708 41 a sys/src/fs/fs64/9fsfs64.c - 664 sys sys 1140168004 3294
+1140168708 42 a sys/src/fs/fs64/dat.h - 664 sys sys 1140168005 611
+1140168708 43 a sys/src/fs/fs64/fns.h - 664 sys sys 1140168005 1961
+1140168708 44 a sys/src/fs/fs64/io.h - 664 sys sys 1140168006 6688
+1140168708 45 a sys/src/fs/fs64/mem.h - 664 sys sys 1020579319 2909
+1140168708 46 a sys/src/fs/fs64/mkfile - 664 sys sys 1140168008 1603
+1140168708 47 c sys/src/fs/ip/arp.c - 664 sys sys 1097578954 8696
+1140168708 48 c sys/src/fs/ip/il.c - 664 sys sys 1140167928 19479
+1140168708 49 c sys/src/fs/ip/ip.c - 664 sys sys 1097578933 3859
+1140168708 50 c sys/src/fs/ip/ip.h - 664 sys sys 1140167930 6691
+1140168708 51 c sys/src/fs/ip/iproute.c - 664 sys sys 1097579099 7386
+1140168708 52 c sys/src/fs/mkfile - 664 sys sys 1140167932 231
+1140168708 53 c sys/src/fs/pc/8250.c - 664 sys sys 1140161725 6957
+1140168708 54 c sys/src/fs/pc/8253.c - 664 sys sys 1097579039 7264
+1140168708 55 c sys/src/fs/pc/compat.c - 664 sys sys 1140164905 1575
+1140168708 56 c sys/src/fs/pc/compat.h - 664 sys sys 1140167957 2426
+1140168708 57 c sys/src/fs/pc/dosfs.c - 664 sys sys 1097712365 16637
+1140168708 58 c sys/src/fs/pc/dosfs.h - 664 sys sys 1140167937 2696
+1140168708 59 c sys/src/fs/pc/ether8139.c - 664 sys sys 1086569718 18552
+1140168708 60 c sys/src/fs/pc/ether83815.c - 664 sys sys 1079341568 28160
+1140168708 61 a sys/src/fs/pc/ether83815.mii.c - 664 sys sys 1049156663 31622
+1140168708 62 c sys/src/fs/pc/etherdp83820.c - 664 sys sys 1092268058 30976
+1140168708 63 c sys/src/fs/pc/etherga620.c - 664 sys sys 1140166315 24732
+1140168708 64 c sys/src/fs/pc/etherif.c - 664 sys sys 1140162742 6375
+1140168708 65 a sys/src/fs/pc/etherigbe.c - 664 sys sys 1131948319 46571
+1140168708 66 c sys/src/fs/pc/ethermii.c - 664 sys sys 1140167954 4689
+1140168708 67 c sys/src/fs/pc/ethermii.h - 664 sys sys 1140167955 3259
+1140168708 68 c sys/src/fs/pc/floppy.c - 664 sys sys 1097579636 14022
+1140168708 69 c sys/src/fs/pc/l.s - 664 sys sys 1096008336 10838
+1140168708 70 c sys/src/fs/pc/malloc.c - 664 sys sys 1096789023 2840
+1140168708 71 c sys/src/fs/pc/mkfile - 664 sys sys 1140167942 426
+1140168708 72 c sys/src/fs/pc/pc.c - 664 sys sys 1140167943 7985
+1140168708 73 c sys/src/fs/pc/pci.c - 664 sys sys 1094949424 12118
+1140168708 74 c sys/src/fs/pc/scsincr53c8xx.c - 664 sys sys 1112488792 53673
+1140168708 75 a sys/src/fs/pc/sdata.c - 664 sys sys 1097712291 61793
+1140168708 76 a sys/src/fs/pc/sdscsi.c - 664 sys sys 1140164880 7042
+1140168708 77 c sys/src/fs/pc/toy.c - 664 sys sys 1140167948 2166
+1140168708 78 c sys/src/fs/port/9p1.c - 664 sys sys 1140167971 29982
+1140168708 79 c sys/src/fs/port/9p1.h - 664 sys sys 1140167972 2128
+1140168708 80 c sys/src/fs/port/9p1lib.c - 664 sys sys 1101627232 7911
+1140168708 81 c sys/src/fs/port/9p2.c - 664 sys sys 1098094593 36248
+1140168708 82 c sys/src/fs/port/all.h - 664 sys sys 1140167977 1932
+1140168708 83 c sys/src/fs/port/auth.c - 664 sys sys 1097573906 7609
+1140168708 84 c sys/src/fs/port/chk.c - 664 sys sys 1097832483 15683
+1140168708 85 c sys/src/fs/port/clock.c - 664 sys sys 1097580538 4033
+1140168708 86 c sys/src/fs/port/con.c - 664 sys sys 1097580641 16327
+1140168708 87 c sys/src/fs/port/config.c - 664 sys sys 1107835943 20264
+1140168708 88 c sys/src/fs/port/console.c - 664 sys sys 1101627646 4886
+1140168708 89 c sys/src/fs/port/data.c - 664 sys sys 1140167986 4510
+1140168708 90 c sys/src/fs/port/dentry.c - 664 sys sys 1098156404 6345
+1140168708 91 c sys/src/fs/port/devcons.c - 664 sys sys 1095983755 4451
+1140168708 92 a sys/src/fs/port/devsd.c - 664 sys sys 1097712378 10993
+1140168708 93 a sys/src/fs/port/fs.h - 664 sys sys 1140168001 682
+1140168708 94 c sys/src/fs/port/iobuf.c - 664 sys sys 1140167988 4956
+1140168708 95 c sys/src/fs/port/lib.h - 664 sys sys 1091960844 3701
+1140168708 96 c sys/src/fs/port/main.c - 664 sys sys 1140167990 7639
+1140168708 97 c sys/src/fs/port/mkfile - 664 sys sys 1140167991 214
+1140168708 98 c sys/src/fs/port/portdat.h - 664 sys sys 1140163786 19670
+1140168708 99 c sys/src/fs/port/portfns.h - 664 sys sys 1140167994 7526
+1140168708 100 c sys/src/fs/port/proc.c - 664 sys sys 1097580775 5364
+1140168708 101 a sys/src/fs/port/sd.h - 664 sys sys 1097577251 2167
+1140168708 102 c sys/src/fs/port/sub.c - 664 sys sys 1098157264 25628
+1140168708 103 c sys/src/fs/port/time.c - 664 sys sys 1140167998 6222
+1140168708 104 c sys/src/fs/port/uidgid.c - 664 sys sys 1097574050 9192
+1140168708 105 d sys/src/fs/worms - 664 sys sys 1015110031 0
+1140168708 106 d sys/src/fs/pc/devata.c - 664 sys sys 1037805116 0
+1140168708 107 d sys/src/fs/emelie/9pcfs.c - 664 sys sys 1041361237 0
+1140168708 108 d sys/src/fs/dev/sony.c - 664 sys sys 1037805088 0
+1140202918 0 c sys/src/games/mkfile - 664 sys sys 1140203009 595
+1140210121 0 c sys/man/4/consolefs - 664 sys sys 1140209468 4241

BIN
sys/doc/fs/fs.pdf


File diff suppressed because it is too large
+ 539 - 477
sys/doc/fs/fs.ps


+ 8 - 4
sys/doc/fs/mkfile

@@ -9,14 +9,18 @@ OBJ=\
 	p6\
 	p7\
 	p8\
+	p9\
+	pa\
 
 fs.ps:D:	$OBJ
-	{echo $FONTS; cat $OBJ } | troff -ms | lp -dstdout >fs.ps
-	../cleanps fs.ps
+	{echo $FONTS; tbl $OBJ } | eqn | troff -ms | lp -dstdout >$target
+	../cleanps $target
 
 fs.trout:D:	$OBJ
-	{echo $FONTS; cat $OBJ } | troff -ms >fs.trout
+	{echo $FONTS; tbl $OBJ } | eqn | troff -ms >$target
 
 fs.html:D:
-	htmlroff -ms -mhtml $OBJ >fs.html
+	{echo $FONTS; tbl $OBJ } | eqn | htmlroff -ms -mhtml >$target
 
+clean:V:
+	rm -f fs.^(html trout ps pdf)

+ 52 - 9
sys/doc/fs/p0

@@ -1,20 +1,51 @@
-.HTML "The Plan 9 File Server
+.HTML "The 64-bit Standalone Plan 9 File Server
+.de Ex
+.TA 0.5i 1i 1.5i 2i 2.5i 3i 3.5i 4i 4.5i 5i 5.5i
+.P1
+.TA 0.5i 1i 1.5i 2i 2.5i 3i 3.5i 4i 4.5i 5i 5.5i
+..
+.de Ee
+.P2
+..
+
+.EQ
+delim $$
+.EN
 .FP lucidasans
+
 .TL
-The Plan 9 File Server
+The 64-bit Standalone Plan 9 File Server
 .AU
-Ken Thompson
+Ken Thompson*
 ken@plan9.bell-labs.com
+.FS
+\l'4i'
+.br
+* now
+.CW ken@entrisphere.com
+.FE
+.AU
+Geoff Collyer
+.CW geoff@collyer.net
 .AB
-This paper describes the structure
-and the operation of Plan 9 file servers.
-The specifics apply to
-our main Plan 9 file server
+This paper is a revision of Thompson's
+.I "The Plan 9 File Server" ,
+and describes the structure
+and the operation of the new 64-bit Plan 9 file servers.
+Some specifics apply to the 32-bit
+Plan 9 file server
 Emelie,
-but
-the code is also the basis for
+which code is also the basis for
 the user level file server
 .CW kfs .
+.PP
+Collyer recently created a 64-bit version of
+Thompson's 32-bit file server, updating all file
+offsets, sizes and block numbers to 64 bits.
+In addition, triple- and quadruple-indirect
+blocks were implemented.
+File name components were extended from 27 to 55 bytes.
+Further work is planned, notably improved peripheral and protocol support.
 .AE
 .SH
 Introduction
@@ -30,3 +61,15 @@ portable,
 but it has slowly come to terms with
 its particular set of cranky computers
 and devices.
+.PP
+The file server
+.I fs64
+runs a revision of Emelie's code
+with 64-bit file sizes, offsets and block numbers
+and indirect blocks from single to quadruple.
+Actually these are 63-bit values, since the type used is
+.I vlong
+(signed
+.I "long long"
+integer),
+but 63 bits should suffice for a little while.

+ 23 - 15
sys/doc/fs/p1

@@ -14,18 +14,26 @@ virtual memory.
 The structure of the file system server
 is a set of kernel processes
 synchronizing mostly through message passing.
-In Emelie there are 26 processes of 10 types:
-.P1
-.ft R
-number name  function
-  15       \f(CWsrv\fP   Main file system server processes
-  \01       \f(CWrah\fP   Block read-ahead processes
-  \h'\w'0'u'1       \f(CWscp\fP   Sync process
-  \h'\w'0'u'1       \f(CWwcp\fP   WORM copy process
-  \h'\w'0'u'1       \f(CWcon\fP   Console process
-  \h'\w'0'u'1       \f(CWilo\fP   IL protocol process
-  \h'\w'0'u'1       \f(CWilt\fP   IL timer process
-  \h'\w'0'u'2       \f(CWethi\fP   Ethernet input process
-  \h'\w'0'u'2       \f(CWetho\fP   Ethernet output process
-  \h'\w'0'u'1       \f(CWflo\fP   Floppy disk process
-.P2
+In
+.I fs64
+there are 27 processes of 11 types:
+.KS
+.TS
+center ;
+c l c
+n lf(CW) l .
+number	name	function
+_
+15	srv	Main file system server processes
+1	rah	Block read-ahead processes
+1	scp	Sync process
+1	wcp	WORM copy process
+1	con	Console process
+1	ilo	IL protocol process
+1	ilt	IL timer process
+2	ethi	Ethernet input process
+2	etho	Ethernet output process
+1	flo	Floppy disk process
+1	snt	sntp clock-synchronisation process
+.TE
+.KE

+ 98 - 92
sys/doc/fs/p2

@@ -21,33 +21,36 @@ and sends the
 response back to the reply queue.
 .PP
 The unit of storage is a
-block of data on a device:
-.P1
-    enum
-    {
-        RBUFSIZE = 16*1024
-    };
+logical block
+(not physical sector) of data on a device:
+.Ex
+.TA 0.5i 1i 1.5i 2i 2.5i 3i 3.5i 4i 4.5i 5i 5.5i
+	enum
+	{
+		RBUFSIZE = 8*1024
+	};
 
-    typedef
-    struct
-    {
-        short   pad;
-        short	tag;
-        long	path;
-    } Tag;
+	typedef vlong Off;
+	typedef
+	struct
+	{
+		short	pad;
+		short	tag;
+		Off	path;
+	} Tag;
 
-    enum
-    {
-        BUFSIZE = RBUFSIZE - sizeof(Tag)
-    };
+	enum
+	{
+		BUFSIZE = RBUFSIZE - sizeof(Tag)
+	};
 
-    typedef
-    struct
-    {
-        uchar   data[BUFSIZE];
-        Tag     tag;
-    } Block;
-.P2
+	typedef
+	struct
+	{
+		uchar	data[BUFSIZE];
+		Tag	tag;
+	} Block;
+.Ee
 All devices are idealized as a perfect disk
 of contiguously numbered blocks each of size
 .CW RBUFSIZE .
@@ -65,31 +68,31 @@ defines the set of block addresses that comprise a file or directory.
 Unlike the i-node,
 the directory entry also has the name of the
 file or directory in it:
-.P1
-    enum
-    {
-        NAMELEN = 28,
-        NDBLOCK = 6
-    };
-.P2
-.P1
-    typedef
-    struct
-    {
-        char    name[NAMELEN];
-        short   uid;
-        short   gid;
-        ushort  mode;
-        short   wuid;
-        Qid     qid;
-        long    size;
-        long    dblock[NDBLOCK];
-        long    iblock;
-        long    diblock;
-        long    atime;
-        long    mtime;
-    } Dentry;
-.P2
+.Ex
+	enum
+	{
+		NAMELEN = 56,
+		NDBLOCK = 6,
+		NIBLOCK = 4,
+	};
+.Ee
+.Ex
+	typedef
+	struct
+	{
+		char	name[NAMELEN];
+		short	uid;
+		short	gid;
+		ushort	mode;
+		short	wuid;
+		Qid	qid;
+		Off	size;
+		Off	dblock[NDBLOCK];
+		Off	iblocks[NIBLOCK];
+		long	atime;
+		long	mtime;
+	} Dentry;
+.Ee
 Each directory entry holds the file or directory
 name, protection mode, access times, user-id, group-id, and addressing
 information.
@@ -99,64 +102,65 @@ is the user-id of the last writer of the file
 and
 .CW size
 is the size of the file in bytes.
-The first 6
+The addresses of the first 6
 blocks of the file are held in the
 .CW dblock
 array.
 If the file is larger than that,
 an indirect block is allocated that holds
 the next
-.CW BUFSIZE/sizeof(long)
-blocks of the file.
-The indirect block address is held in the structure member
-.CW iblock .
+.CW BUFSIZE/sizeof(Off)
+block addresses of the file.
+The indirect block address is held in
+.CW iblocks[0] .
 If the file is larger yet,
 then there is a double indirect block that points
 at indirect blocks.
 The double indirect address is held in
-.CW diblock
+.CW iblocks[1]
 and can point at another
-.CW (BUFSIZE/sizeof(long))\u\s-2\&2\s+2\d
+.CW (BUFSIZE/sizeof(Off))\u\s-2\&2\s+2\d
 blocks of data.
+This is extended through a quadruple indirect block at
+.CW iblocks[3]
+but the code is now parameterised to permit easily changing the
+number of direct blocks and the depth of indirect blocks,
+and also the maximum size of a file name component.
 The maximum addressable size of a file is
-therefore 275 Gbytes.
-There is a tighter restriction of
-2\u\s-2\&32\s+2\d
-bytes because the length of a file is maintained in
-a long.
-Even so,
-sloppy use of long arithmetic restricts the length to
-2\u\s-2\&31\s+2\d
-bytes.
-These numbers are based on Emelie
-which has a block size of 16K and
-.CW sizeof(long)
-is 4.
-It would be different if the size of a block
-changed.
+therefore 7.93 petabytes at a block size of 8k,
+but 7.98 exabytes (just under $2 sup 63$ bytes) at a block size of 32k.
+File size is restricted to $2 sup 63 - 1$ bytes in any case
+because the length of a file is maintained in a
+(signed)
+.I vlong .
+These numbers are based on
+.I fs64
+which has a block size of 8k and
+.CW sizeof(Off)
+is 8.
 .PP
 The declarations of the indirect and double indirect blocks
 are as follows.
-.P1
-    enum
-    {
-        INDPERBUF = BUFSIZE/sizeof(long),
-    };
-.P2
-.P1
-    typedef
-    {
-        long    dblock[INDPERBUF];
-        Tag     ibtag;
-    } Iblock;
-.P2
-.P1
-    typedef
-    {
-        long    iblock[INDPERBUF];
-        Tag     dibtag;
-    } Diblock;
-.P2
+.Ex
+	enum
+	{
+		INDPERBUF = BUFSIZE/sizeof(Off),
+	};
+.Ee
+.Ex
+	typedef
+	{
+		Off	dblock[INDPERBUF];
+		Tag	ibtag;
+	} Iblock;
+.Ee
+.Ex
+	typedef
+	{
+		Off	iblock[INDPERBUF];
+		Tag	dibtag;
+	} Diblock;
+.Ee
 .PP
 The root of a file system is a single directory entry
 at a known block address.
@@ -164,7 +168,9 @@ A directory is a file that consists of a list of
 directory entries.
 To make access easier,
 a directory entry cannot cross blocks.
-In Emelie there are 233 directory entries per block.
+In
+.I fs64
+there are 47 directory entries per block.
 .PP
 The device on which the blocks reside is implicit
 and ultimately comes from the 9P

+ 73 - 13
sys/doc/fs/p4

@@ -42,6 +42,18 @@ then the pseudo-device is the N-way block
 interleaving of the sub-devices.
 The size of the interleaved device is
 N times the size of the smallest sub-device.
+.IP "\fID\fP = {\fIDD\fP...}"
+.br
+This is a set of devices that
+constitute a `mirror' of the first sub-device, and form a single device.
+A write to the device is performed,
+at the same block address,
+on the sub-devices, in right-to-left order.
+A read from the device is performed on each sub-device,
+in left-to-right order, until a read succeeds without error,
+or the set is exhausted.
+One can think of this as a poor man's RAID 1.
+The size of the device is the size of the smallest sub-device.
 .IP "\fID\fP = \f(CWp\fP\fIDN1.N2\fP"
 .br
 This is a partition of a sub-device.
@@ -62,6 +74,20 @@ This second device is partitioned
 into a set of block flags and a set of blocks.
 The flags are used to generate errors if a
 block is ever written twice or read without being written first.
+.IP "\fID\fP = \f(CWx\fP\fID\fP"
+.br
+This is a byte-swapped version of the file system on D.
+Since the file server currently writes integers in metadata to disk
+in native byte order, moving a file system to a machine of the other
+major byte order (e.g., MIPS to Pentium)
+requires the use of
+.CW x .
+It knows the sizes of the various integer fields in the file system metadata.
+Ideally, the file server would follow the Plan 9 religion and write a consistent
+byte order on disk, regardless of processor.
+In the mean time, it should be possible to automatically determine the need
+for byte-swapping by examining data in the super-block of each file system,
+though this has not been implemented yet.
 .IP "\fID\fP = \f(CWc\fP\fIDD\fP"
 .br
 This is the cache/WORM device made up of a cache (read-write)
@@ -78,13 +104,27 @@ be referenced as
 in this pseudo device.
 The second dump taken that day will be
 .CW /1995/02181 .
-.IP "\fID\fP = \f(CWw\fP\fIN1.N2\fP"
+.IP "\fID\fP = \f(CWw\fP\fIN1.N2.N3\fP"
+.br
+This is a SCSI disk on controller N1, target N2 and logical unit number N3.
+.IP "\fID\fP = \f(CWh\fP\fIN1.N2.0\fP"
 .br
-This is a SCSI disk on controller N1 and target N2.
-.IP "\fID\fP = \f(CWl\fP\fIN1.N2\fP"
+This is an (E)IDE or *ATA disk on controller N1, target N2
+(target 0 is the IDE master, 1 the slave device).
+These disks are currently run via programmed I/O, not DMA,
+so they tend to be slower to access than SCSI disks.
+.IP "\fID\fP = \f(CWr\fP\fIN1\fP"
 .br
 This is the same as
 .CW w ,
+but refers to a side of a WORM disc.
+See the
+.I j
+device.
+.IP "\fID\fP = \f(CWl\fP\fIN1\fP"
+.br
+This is the same as
+.CW r ,
 but one block from the SCSI disk is removed for labeling.
 .IP "\fID\fP = \f(CWj(\fP\fID\d\s-2\&1\s+2\u\fID\d\s-2\&2\s+2\u\f(CW*)\fID\d\s-2\&3\s+2\u\f1"
 .br
@@ -93,7 +133,7 @@ is the juke box SCSI interface.
 The
 .I D\d\s-2\&2\s+2\u 's
 are the SCSI drives in the juke box
-and  the
+and the
 .I D\d\s-2\&3\s+2\u 's
 are the demountable platters in the juke box.
 .I D\d\s-2\&1\s+2\u
@@ -103,32 +143,52 @@ must be
 .CW w .
 .I D\d\s-2\&3\s+2\u
 must be pseudo devices of
-.CW w
+.CW w ,
+.CW r ,
 or
 .CW l
 devices.
 .PP
-For both
-.CW w
+For
+.CW w ,
+.CW h ,
+.CW l ,
 and
 .CW r
 devices any of the configuration numbers
 can be replaced by an iterator of the form
 .CW <\fIN1-N2\fP> .
+N1 can be greater than N2, indicating a descending sequence.
 Thus
-.P1
-    [w0.<2-6>]
-.P2
+.Ex
+	[w0.<2-6>]
+.Ee
 is the interleaved SCSI disks on SCSI targets
 2 through 6 of SCSI controller 0.
 The main file system on
 Emelie
 is defined by the configuration string
-.P1
-    c[w1.<0-5>.0]j(w6w5w4w3w2)l(<0-236>l<238-474>)
-.P2
+.Ex
+	c[w1.<0-5>.0]j(w6w5w4w3w2)(l<0-236>l<238-474>)
+.Ee
 This is a cache/WORM driver.
 The cache is three interleaved disks on SCSI controller 1
 targets 0, 1, 2, 3, 4, and 5.
 The WORM half of the cache/WORM
 is 474 jukebox disks.
+Another file server,
+.I choline ,
+has a main file system defined by
+.Ex
+	c[w<1-3>]j(w1.<6-0>.0)(l<0-124>l<128-252>)
+.Ee
+The order of
+.CW w1.<6-0>.0
+matters here, since the optical jukebox's WORM drives's
+SCSI target ids,
+as delivered,
+run in descending order relative to the numbers of the drives
+in SCSI commands
+(e.g., the jukebox controller is SCSI target 6,
+drive #1 is SCSI target 5,
+and drive #6 is SCSI target 0).

+ 3 - 3
sys/doc/fs/p5

@@ -32,8 +32,8 @@ since the relative block mark is set to 1
 and only block offset 0 is read.
 This is to prevent some
 fairly common action such as
-.P1
-    file *
-.P2
+.Ex
+	file *
+.Ee
 from swamping the file system with read-ahead
 requests that will never be used.

+ 57 - 49
sys/doc/fs/p6

@@ -10,9 +10,13 @@ by performing operations on its two constituent devices
 the read-write c-device and the write-once-read-many
 w-device.
 The block numbers on the four devices are distinct,
-although the cw addresses,
+although the
+.I cw
+addresses,
 dump addresses,
-and the w addresses are
+and the
+.I w
+addresses are
 highly correlated.
 .PP
 The cw-driver uses the w-device as the
@@ -26,34 +30,34 @@ mapped through a hash table kept on a partition of the c-device.
 .PP
 The map portion of the c-device consists of blocks of buckets of entries.
 The declarations follow.
-.P1
-    enum
-    {
-        BKPERBLK = 10,
-        CEPERBK  = (BUFSIZE - BKPERBLK*sizeof(long)) /
-                   (sizeof(Centry)*BKPERBLK),
-    };
-.P2
-.P1
-    typedef
-    struct
-    {
-        ushort   age;
-        short    state;
-        long     waddr;
-    } Centry;
-.P2
-.P1
-    typedef
-    struct
-    {
-        long     agegen;
-        Centry   entry[CEPERBK];
-    } Bucket;
-.P2
-.P1
-    Bucket   bucket[BKPERBLK];
-.P2
+.Ex
+	enum
+	{
+		BKPERBLK = 10,
+		CEPERBK	= (BUFSIZE - BKPERBLK*sizeof(Off)) /
+				(sizeof(Centry)*BKPERBLK),
+	};
+.Ee
+.Ex
+	typedef
+	struct
+	{
+		ushort	age;
+		short	state;
+		Off	waddr;
+	} Centry;
+.Ee
+.Ex
+	typedef
+	struct
+	{
+		long	agegen;
+		Centry	entry[CEPERBK];
+	} Bucket;
+.Ee
+.Ex
+	Bucket	bucket[BKPERBLK];
+.Ee
 There is exactly one entry structure for each block in the
 data partition of the c-device.
 A bucket contains all of the w-addresses that have
@@ -69,10 +73,10 @@ from zero.
 .PP
 The following steps go into converting a w-address into a c-address.
 The bucket is found by
-.P1
-    bucket_number = w-address % total_buckets
-    getbuf(c-device, bucket_offset + bucket_number/BKPERBLK);
-.P2
+.Ex
+	bucket_number = w-address % total_buckets;
+	getbuf(c-device, bucket_offset + bucket_number/BKPERBLK);
+.Ee
 After the desired bucket is found,
 the desired entry is found by a linear search within the bucket for the
 entry with the desired
@@ -80,17 +84,17 @@ entry with the desired
 .PP
 The state variable in the entry is
 one of the following.
-.P1
-    enum
-    {
-        Cnone    = 0,
-        Cdirty,
-        Cdump,
-        Cread,
-        Cwrite,
-        Cdump1,
-    };
-.P2
+.Ex
+	enum
+	{
+		Cnone	= 0,
+		Cdirty,
+		Cdump,
+		Cread,
+		Cwrite,
+		Cdump1,
+	};
+.Ee
 Every w-address has a state.
 Blocks that are not in the
 c-device have the implied
@@ -157,7 +161,8 @@ blocks with
 state.
 .PP
 The dump algorithm is as follows:
-a) The tree on the cw-device is walked
+.IP a)
+The tree on the cw-device is walked
 as long as the blocks visited have been
 modified since the last dump.
 These are the blocks with state
@@ -175,7 +180,8 @@ The directory containing that directory must be
 modified for the same reason.
 The tree walk is thus drastically restrained and the
 tree walk does not take much time.
-b) All
+.IP b)
+All
 .CW Cwrite
 blocks found in the tree search
 are relocated to new blank blocks on the w-device
@@ -195,13 +201,15 @@ These blocks are marked for later
 writing to the w-device
 with the state
 .CW Cdump .
-c) All open files that were pointing to modified
+.IP c)
+All open files that were pointing to modified
 blocks are reopened to point at the corresponding
 reallocated blocks.
 This causes the directories leading to the
 open files to be modified.
 Thus the invariant discussed in a) is maintained.
-d) The background dumping process will slowly
+.IP d)
+The background dumping process will slowly
 go through the map of the c-device and write out
 all blocks with
 .CW Cdump

+ 1 - 1
sys/doc/fs/p7

@@ -45,4 +45,4 @@ side of disk 0.
 On Emelie,
 the main file system is configured
 on both sides of the first 237 disks,
-platters 0-236 and 238-474.
+platters 0\-236 and 238\-474.

+ 24 - 0
sys/doc/fs/p9

@@ -0,0 +1,24 @@
+.SH
+Acknowledgements
+.PP
+Ken Thompson created the Plan 9 file server
+and maintained it for many years.
+The cached WORM driver is based upon
+Sean Quinlan's PhD. thesis and prototype.
+Jim McKie maintained the IBM-PC-dependent code,
+a thankless job.
+Bruce Ellis modified the
+.I 8c
+compiler in 2004
+to generate much faster code for common
+.I vlong
+operations, which made the 64-bit file server feasible.
+Nigel Roles contributed support for the APC UPS
+and the NCR/Symbios/LSI-Logic SCSI host adaptors.
+.
+.SH
+References
+.IP [1]
+Sean Quinlan, ``A Cached WORM File System,''
+.I "Software\(emPractice and Experience" ,
+Vol 21., No 12., December 1991, pp. 1289\-1299.

+ 76 - 0
sys/doc/fs/pa

@@ -0,0 +1,76 @@
+.bp
+.SH
+Appendix:
+Maximum File Sizes in the 64-bit File Server
+.PP
+The maximum size of a single file in a Plan 9 file server's
+file system with 64-bit block numbers
+is determined by the file system block size
+(there are single, double, triple and quadruple indirect blocks).
+The maximum size is thus
+$d ( 6 + x + x sup 2 + x sup 3 + x sup 4 )$
+bytes, where
+$d = blocksize - ( 2 + 2 + 8 )$
+and
+$x = left floor d over 8 right floor$,
+8 being the size in bytes of a
+.I "long long"
+block number.
+.LP
+Note that
+$2 sup 63 ~ = ~ 9,223,372,036,854,775,808 ~ = ~ 8$
+EB (binary exabytes).
+.LP
+.KS
+.TS
+center ;
+c s s
+c c c
+n n n .
+Maximum File Sizes
+blocksize	max. file size	in bytes
+_
+1k	239.455G	257,112,525,120
+2k	7.73795T	8,507,967,771,456
+3k	59.4174T	65,330,091,351,360
+4k	251.779T	276,833,619,879,744
+5k	770.93T	847,646,649,807,168
+6k	1.87752P	2,113,900,586,253,120
+7k	4.0645P	4,576,215,491,839,296
+8k	7.93382P	8,932,685,435,522,880
+_
+9k	14.3102P	16,111,863,841,429,824
+10k	24.2524P	27,305,748,837,688,128
+11k	39.0823P	44,002,768,605,261,120
+12k	60.4146P	68,020,766,726,780,736
+13k	90.1856P	101,539,987,535,380,800
+14k	130.683P	147,136,061,463,530,304
+15k	184.575P	207,812,990,391,866,688
+16k	254.939P	287,036,132,998,029,120
+_
+17k	345.293P	388,765,190,105,491,776
+18k	459.621P	517,487,190,032,397,120
+19k	602.407P	678,249,473,940,389,184
+20k	778.66P	876,692,681,183,446,848
+21k	993.946P	1,119,083,734,656,717,120
+22k	1.22502E	1,412,348,826,145,348,416
+23k	1.53012E	1,764,106,401,673,323,840
+24k	1.89319E	2,182,700,146,852,294,464
+25k	2.32213E	2,677,231,972,230,412,608
+26k	2.82551E	3,257,594,998,641,165,120
+27k	3.41264E	3,934,506,542,552,206,656
+28k	4.09355E	4,719,541,101,414,192,960
+29k	4.87905E	5,625,163,339,009,614,144
+30k	5.78076E	6,664,761,070,801,627,968
+31k	6.81111E	7,852,678,249,282,893,120
+32k	7.98341E	9,204,247,949,324,402,496
+_
+33k	9.31184E	10,735,825,353,524,316,480
+\&...
+48k	60.666E	69,943,138,363,646,533,440
+\&...
+56k	131.149E	151,204,569,706,075,533,120
+\&...
+64k	255.734E	294,841,790,119,418,167,104
+.TE
+.KE

+ 17 - 0
sys/man/4/consolefs

@@ -190,6 +190,11 @@ by the ASCII time to the file
 An example of 2 consoles complete with console logging is:
 .IP
 .EX
+% cat /lib/ndb/consoledb
+group=sys
+	uid=glenda
+console=bootes dev=/dev/eia0 gid=sys
+console=fornax dev=/dev/eia1 gid=sys
 % aux/consolefs
 % ls -p /mnt/consoles
 bootes
@@ -199,6 +204,18 @@ fornaxctl
 % clog /mnt/consoles/fornax /sys/log/fornax &
 % clog /mnt/consoles/bootes /sys/log/bootes &
 .EE
+.PP
+The console server's default name space must 
+mount the consoles for 
+.I C
+to import.
+This can be arranged by adding
+.IP
+.EX
+mount /srv/consoles /mnt/consoles
+.EE
+to
+.BR /lib/namespace.$sysname .
 .SH FILES
 .TF /lib/ndb/consoledb
 .TP

+ 17 - 0
sys/man/8/fsconfig

@@ -46,6 +46,10 @@ fsconfig \- configuring a file server
 .PP
 .B copyworm
 .PP
+.B copydev
+.I from-dev
+.I to-dev
+.PP
 .B halt
 .PP
 .B end
@@ -324,6 +328,19 @@ will cause the server to
 .I immediately
 exit and reboot.
 .PP
+.I Copydev
+will copy the device
+.I from-dev
+to the device
+.IR to-dev .
+block by block,
+and panic.
+.PP
+.I Halt
+will cause the server to
+.I immediately
+exit and reboot.
+.PP
 The various configuration commands only record what to do; they write
 no data to disk.  The command
 .I end

+ 20 - 20
sys/src/fs/sony/9sonyfs.c → sys/src/fs/9netics32.16k/9net32.16kfs.c

@@ -13,36 +13,34 @@
 int FIXEDSIZE = 1;
 
 #ifndef	DATE
-#define	DATE	568011600L+4*3600
+#define	DATE	1094098624L
 #endif
 
-ulong	mktime		= DATE;				/* set by mkfile */
+Timet	mktime		= DATE;				/* set by mkfile */
 Startsb	startsb[] =
 {
-	"main",		2,
+	"main",		2,	/* */
 	0
 };
 
 Dos dos;
 
-static
-struct
+static struct
 {
 	char	*name;
-	long	(*read)(int, void*, long);
-	vlong	(*seek)(int, vlong);
-	long	(*write)(int, void*, long);
+	Off	(*read)(int, void*, long);
+	Devsize	(*seek)(int, Devsize);
+	Off	(*write)(int, void*, long);
 	int	(*part)(int, char*);
-} nvrdevs[] =
-{
+} nvrdevs[] = {
 	{ "fd", floppyread, floppyseek, floppywrite, 0, },
 	{ "hd", ataread,   ataseek,   atawrite,   setatapart, },
-	/*
-	{ "sd", scsiread,   scsiseek,   scsiwrite,   setscsipart, },
-	 */
+	/* { "sd", scsiread,   scsiseek,   scsiwrite,   setscsipart, },  */
 	{ 0, },
 };
 
+void apcinit(void);
+
 void
 otherinit(void)
 {
@@ -53,6 +51,7 @@ otherinit(void)
 	printcpufreq();
 	etherinit();
 	scsiinit();
+	apcinit();
 
 	s = spllo();
 	nhd = atainit();
@@ -159,20 +158,21 @@ touser(void)
 void
 localconfinit(void)
 {
-	conf.nfile = 40000;
+	/* conf.nfile = 60000; */	/* from emelie */
 	conf.nodump = 0;
-	conf.firstsb = 13219302;
-	conf.recovsb = 0;
+	conf.dumpreread = 0;
+	conf.firstsb = 0;	/* time- & jukebox-dependent optimisation */
+	conf.recovsb = 0;	/* 971531 is 24 june 2003, before w3 died */
 	conf.ripoff = 1;
-	conf.nlgmsg = 100;
-	conf.nsmmsg = 500;
+	conf.nlgmsg = 1100;	/* @8576 bytes, for packets */
+	conf.nsmmsg = 500;	/* @128 bytes */
 
-	conf.minuteswest = 5*60;
+	conf.minuteswest = 8*60;
 	conf.dsttime = 1;
 }
 
 int (*fsprotocol[])(Msgbuf*) = {
-	serve9p1,
+	serve9p1,		/* TODO: do we still need 9P1? */
 	serve9p2,
 	nil,
 };

+ 6 - 4
sys/src/fs/roro/dat.h → sys/src/fs/9netics32.16k/dat.h

@@ -1,9 +1,11 @@
-#define RBUFSIZE	(16*1024)	/* raw buffer size */
 /*
- * verify that the kernel prints this size
- * when you first boot this kernel.
- * #define	DSIZE		157933
+ * The most fundamental constant.
+ * The code will not compile with RBUFSIZE made a variable;
+ * for one thing, RBUFSIZE determines FEPERBUF, which determines
+ * the number of elements in a free-list-block array.
  */
+#define RBUFSIZE	(16*1024)	/* raw buffer size */
+
 #include "../port/portdat.h"
 
 extern	Mach	mach0;

+ 15 - 15
sys/src/fs/roro/fns.h → sys/src/fs/9netics32.16k/fns.h

@@ -12,9 +12,9 @@ void	etherinit(void);
 void	etherstart(void);
 int	floppyinit(void);
 void	floppyproc(void);
-long	floppyread(int, void*, long);
-vlong	floppyseek(int, vlong);
-long	floppywrite(int, void*, long);
+Off	floppyread(int, void*, long);
+Devsize	floppyseek(int, Devsize);
+Off	floppywrite(int, void*, long);
 void	fpinit(void);
 char*	getconf(char*);
 ulong	getcr0(void);
@@ -23,12 +23,11 @@ ulong	getcr4(void);
 int	getfields(char*, char**, int, char);
 ulong	getstatus(void);
 int	atainit(void);
-long	ataread(int, void*, long);
-vlong	ataseek(int, vlong);
-long	atawrite(int, void*, long);
+Off	ataread(int, void*, long);
+Devsize	ataseek(int, Devsize);
+Off	atawrite(int, void*, long);
 void	i8042a20(void);
 void	i8042reset(void);
-void	idecheck(Device*);
 int	inb(int);
 void	insb(int, void*, int);
 ushort	ins(int);
@@ -55,11 +54,12 @@ void	putcr3(ulong);
 void	putcr4(ulong);
 void	puttr(ulong);
 void	rdmsr(int, vlong*);
-void	rdtsc(uvlong*);
+void	wrmsr(int, vlong);
+void	(*cycles)(uvlong*);
 void	scsiinit(void);
-long	scsiread(int, void*, long);
-long	scsiseek(int, long);
-long	scsiwrite(int, void*, long);
+Off	scsiread(int, void*, long);
+Devsize	scsiseek(int, Devsize);
+Off	scsiwrite(int, void*, long);
 int	setatapart(int, char*);
 int	setscsipart(int, char*);
 void	setvec(int, void (*)(Ureg*, void*), void*);
@@ -70,10 +70,10 @@ int	uartgetc(void);
 void	uartputc(int);
 void	wbflush(void);
 void	cpuid(char*, int*, int*);
+
 #define PADDR(a)	((ulong)(a)&~KZERO)
 
 void	ideinit(Device *d);
-int	ideread(Device *d, long,  void*);
-int idewrite(Device *d, long, void*);
-long	atasize(Device *d);
-void	atainitstub(Device *d);
+Devsize	idesize(Device *d);
+int	ideread(Device *d,  Devsize, void*);
+int	idewrite(Device *d, Devsize, void*);

+ 6 - 2
sys/src/fs/roro/io.h → sys/src/fs/9netics32.16k/io.h

@@ -161,9 +161,12 @@ typedef struct Pcidev {
 		int	size;
 	} mem[6];
 
+	uchar	rid;
+	uchar	ccrp;
+	uchar	ccrb;
 	uchar	intl;			/* interrupt line */
-	ushort	ccru;
-
+	ushort	ccru;			/* is uchar in cpu kernel */
+	ulong	pcr;
 
 	Pcidev*	list;
 	Pcidev*	bridge;			/* down a bus */
@@ -181,6 +184,7 @@ extern Pcidev* pcimatch(Pcidev*, int, int);
 extern Pcidev* pcimatchtbdf(int);
 extern void pcireset(void);
 extern void pcisetbme(Pcidev*);
+extern void pciclrbme(Pcidev*);
 
 /*
  *  a parsed plan9.ini line

+ 85 - 0
sys/src/fs/9netics32.16k/mem.h

@@ -0,0 +1,85 @@
+#define	BY2WD		4			/* bytes per word */
+#define BY2V		8			/* bytes per vlong */
+#define	BY2PG		4096			/* bytes per page */
+#define	PGSHIFT		12			/* log(BY2PG) */
+#define PGROUND(s)	(((s)+(BY2PG-1))&~(BY2PG-1))
+#define MB		(1024*1024)
+
+#define	HZ		(82)			/* clock frequency */
+#define	TK2MS(t)	(((ulong)(t)*1000)/HZ)	/* ticks to milliseconds - beware rounding */
+#define	MS2TK(t)	(((ulong)(t)*HZ)/1000)	/* milliseconds to ticks - beware rounding */
+#define	TK2SEC(t)	((t)/HZ)		/* ticks to seconds */
+
+/*
+ * Fundamental addresses
+ */
+#define IDTADDR		0x80000800		/* idt */
+#define APBOOTSTRAP	0x80001000		/* AP bootstrap code */
+#define CONFADDR	0x80001200		/* info passed from boot loader */
+#define CPU0PDB		0x80002000		/* bootstrap processor PDB */
+#define CPU0PTE		0x80003000		/* bootstrap processor PTE's for 0-2MB */
+#define CPU0MACHPTE	0x80004000		/* bootstrap processor PTE for MACHADDR */
+#define CPU0MACH	0x80005000		/* Mach for bootstrap processor */
+
+#define	KZERO		0x80000000		/* base of kernel address space */
+#define	KTZERO		0x80100000		/* first address in kernel text */
+
+#define	MACHSIZE	4096
+
+/*
+ *  known 80386 segments (in GDT) and their selectors
+ */
+#define	NULLSEG	0	/* null segment */
+#define	KDSEG	1	/* kernel data/stack */
+#define	KESEG	2	/* kernel executable */
+#define	UDSEG	3	/* user data/stack */
+#define	UESEG	4	/* user executable */
+#define TSSSEG	5	/* task segment */
+#define N386SEG	6	/* number of segments */
+
+#define SELGDT	(0<<3)	/* selector is in gdt */
+#define	SELLDT	(1<<3)	/* selector is in ldt */
+
+#define SELECTOR(i, t, p)	(((i)<<3) | (t) | (p))
+
+#define NULLSEL	SELECTOR(NULLSEG, SELGDT, 0)
+#define KESEL	SELECTOR(KESEG, SELGDT, 0)
+#define KDSEL	SELECTOR(KDSEG, SELGDT, 0)
+#define UESEL	SELECTOR(UESEG, SELGDT, 3)
+#define UDSEL	SELECTOR(UDSEG, SELGDT, 3)
+#define TSSSEL	SELECTOR(TSSSEG, SELGDT, 0)
+
+/*
+ *  fields in segment descriptors
+ */
+#define SEGDATA	(0x10<<8)	/* data/stack segment */
+#define SEGEXEC	(0x18<<8)	/* executable segment */
+#define	SEGTSS	(0x9<<8)	/* TSS segment */
+#define SEGCG	(0x0C<<8)	/* call gate */
+#define	SEGIG	(0x0E<<8)	/* interrupt gate */
+#define SEGTG	(0x0F<<8)	/* task gate */
+#define SEGTYPE	(0x1F<<8)
+
+#define SEGP	(1<<15)		/* segment present */
+#define SEGPL(x) ((x)<<13)	/* priority level */
+#define SEGB	(1<<22)		/* granularity 1==4k (for expand-down) */
+#define SEGG	(1<<23)		/* granularity 1==4k (for other) */
+#define SEGE	(1<<10)		/* expand down */
+#define SEGW	(1<<9)		/* writable (for data/stack) */
+#define	SEGR	(1<<9)		/* readable (for code) */
+#define SEGD	(1<<22)		/* default 1==32bit (for code) */
+
+/*
+ *  physical MMU
+ */
+#define	PTEVALID	(1<<0)
+#define	PTEUNCACHED	(1<<4)
+#define PTEWRITE	(1<<1)
+#define	PTERONLY	(0<<1)
+#define	PTEKERNEL	(0<<2)
+#define	PTEUSER		(1<<2)
+#define PTESIZE		(1<<7)
+
+#define MACHADDR	((ulong)&mach0)		/* hack number 1 */
+
+#define IFLAG		0x200	/* psw: interrupt enable, to be accurate */

+ 18 - 17
sys/src/fs/roro/mkfile → sys/src/fs/9netics32.16k/mkfile

@@ -1,4 +1,4 @@
-CONF=roro
+CONF=net32.16k
 p=9
 
 objtype=386
@@ -7,6 +7,7 @@ objtype=386
 TARG=$p$CONF'fs'
 
 DEV=\
+	apc.$O\
 	cw.$O\
 	fworm.$O\
 	juke.$O\
@@ -51,7 +52,9 @@ PC=\
 	8250.$O\
 	8253.$O\
 	cga.$O\
-	devata.$O\
+	devsd.$O\
+	sdscsi.$O\
+	sdata.$O\
 	dosfs.$O\
 	floppy.$O\
 	kbd.$O\
@@ -65,16 +68,17 @@ PC=\
 	trap.$O\
 
 ETHER=\
-	etherif.$O\
+	compat.$O\
 	ether2114x.$O\
-	etherelnk3.$O\
+	ether8139.$O\
 	ether82557.$O\
-	compat.$O\
-	ethermii.$O\
 	ether83815.$O\
 	etherdp83820.$O\
-	ether8139.$O\
+	etherelnk3.$O\
 	etherga620.$O\
+	etherif.$O\
+	etherigbe.$O\
+	ethermii.$O\
 
 SCSI=\
 	scsi.$O\
@@ -88,7 +92,7 @@ OBJ=\
 	$IP\
 	$ETHER\
 	$SCSI\
-	
+
 HFILES=\
 	../port/all.h\
 	../port/lib.h\
@@ -103,11 +107,11 @@ HFILES=\
 
 LIB=\
 	-lauthsrv\
-	/$objtype/lib/libc.a\
+	-lc\
 	-lsec\
 
 # -I../pc & -DFS are for compat.h
-CFLAGS=-FVw -I. -I../port -I../pc -DFS
+CFLAGS=-FTVw -I. -I../port -I../pc -DFS -DOLD
 
 all:V:	$TARG
 
@@ -116,17 +120,14 @@ all:V:	$TARG
 <../dev/mkfile
 <../ip/mkfile
 
-$TARG:	$OBJ $TARG.$O
-	$LD -o $target -l -T0x80100020 $prereq $LIB
-	size $target
-
-$TARG.$O:	$TARG.c
+$TARG:	$TARG.c $OBJ
 	$CC $CFLAGS -DDATE'='`{date -n} $TARG.c
+	$LD -o $target -l -T0x80100020 $OBJ $TARG.$O $LIB
+	size $target
 
 install:V: $TARG
 	cp $TARG /$objtype/
-	#9fs dinar && cp $TARG /n/dinar/$objtype/
-	#import lookout / /n/lookout && cp $TARG /n/lookout/$objtype/
+#	9fs stand && cp -x $TARG /n/stand/$objtype
 
 $TARG.$O:	../pc/dosfs.h
 

+ 21 - 19
sys/src/fs/roro/9rorofs.c → sys/src/fs/9netics64.8k/9net64.8kfs.c

@@ -13,36 +13,34 @@
 int FIXEDSIZE = 1;
 
 #ifndef	DATE
-#define	DATE	568011600L+4*3600
+#define	DATE	1094098624L
 #endif
 
-ulong	mktime		= DATE;				/* set by mkfile */
+Timet	mktime		= DATE;				/* set by mkfile */
 Startsb	startsb[] =
 {
-	"main",		2,
+	"main",		2,	/* */
 	0
 };
 
 Dos dos;
 
-static
-struct
+static struct
 {
 	char	*name;
-	long	(*read)(int, void*, long);
-	vlong	(*seek)(int, vlong);
-	long	(*write)(int, void*, long);
+	Off	(*read)(int, void*, long);
+	Devsize	(*seek)(int, Devsize);
+	Off	(*write)(int, void*, long);
 	int	(*part)(int, char*);
-} nvrdevs[] =
-{
+} nvrdevs[] = {
 	{ "fd", floppyread, floppyseek, floppywrite, 0, },
 	{ "hd", ataread,   ataseek,   atawrite,   setatapart, },
-	/*
-	{ "sd", scsiread,   scsiseek,   scsiwrite,   setscsipart, },
-	 */
+	/* { "sd", scsiread,   scsiseek,   scsiwrite,   setscsipart, },  */
 	{ 0, },
 };
 
+void apcinit(void);
+
 void
 otherinit(void)
 {
@@ -53,6 +51,7 @@ otherinit(void)
 	printcpufreq();
 	etherinit();
 	scsiinit();
+	apcinit();
 
 	s = spllo();
 	nhd = atainit();
@@ -159,18 +158,21 @@ touser(void)
 void
 localconfinit(void)
 {
-	conf.nfile = 5000;
-	conf.nodump = 1;
-	conf.firstsb = 0;
-	conf.recovsb = 0;
+	/* conf.nfile = 60000; */	/* from emelie */
+	conf.nodump = 0;
+	conf.dumpreread = 0;
+	conf.firstsb = 0;	/* time- & jukebox-dependent optimisation */
+	conf.recovsb = 0;	/* 971531 is 24 june 2003, before w3 died */
 	conf.ripoff = 1;
+	conf.nlgmsg = 1100;	/* @8576 bytes, for packets */
+	conf.nsmmsg = 500;	/* @128 bytes */
 
-	conf.minuteswest = 5*60;
+	conf.minuteswest = 8*60;
 	conf.dsttime = 1;
 }
 
 int (*fsprotocol[])(Msgbuf*) = {
-	serve9p1,
+	/* 64-bit file servers can't serve 9P1 correctly: NAMELEN is too big */
 	serve9p2,
 	nil,
 };

+ 7 - 3
sys/src/fs/sony/dat.h → sys/src/fs/9netics64.8k/dat.h

@@ -1,6 +1,10 @@
-#define RBUFSIZE	(16*1024)	/* raw buffer size */
-/* this kernel still uses DSIZE because it uses sony.c instead of juke.c */
-#define	DSIZE		157933
+/*
+ * The most fundamental constant.
+ * The code will not compile with RBUFSIZE made a variable;
+ * for one thing, RBUFSIZE determines FEPERBUF, which determines
+ * the number of elements in a free-list-block array.
+ */
+#define RBUFSIZE	(8*1024)	/* raw buffer size */
 
 #include "../port/portdat.h"
 

+ 15 - 15
sys/src/fs/sony/fns.h → sys/src/fs/9netics64.8k/fns.h

@@ -12,9 +12,9 @@ void	etherinit(void);
 void	etherstart(void);
 int	floppyinit(void);
 void	floppyproc(void);
-long	floppyread(int, void*, long);
-vlong	floppyseek(int, vlong);
-long	floppywrite(int, void*, long);
+Off	floppyread(int, void*, long);
+Devsize	floppyseek(int, Devsize);
+Off	floppywrite(int, void*, long);
 void	fpinit(void);
 char*	getconf(char*);
 ulong	getcr0(void);
@@ -23,12 +23,11 @@ ulong	getcr4(void);
 int	getfields(char*, char**, int, char);
 ulong	getstatus(void);
 int	atainit(void);
-long	ataread(int, void*, long);
-vlong	ataseek(int, vlong);
-long	atawrite(int, void*, long);
+Off	ataread(int, void*, long);
+Devsize	ataseek(int, Devsize);
+Off	atawrite(int, void*, long);
 void	i8042a20(void);
 void	i8042reset(void);
-void	idecheck(Device*);
 int	inb(int);
 void	insb(int, void*, int);
 ushort	ins(int);
@@ -55,11 +54,12 @@ void	putcr3(ulong);
 void	putcr4(ulong);
 void	puttr(ulong);
 void	rdmsr(int, vlong*);
-void	rdtsc(uvlong*);
+void	wrmsr(int, vlong);
+void	(*cycles)(uvlong*);
 void	scsiinit(void);
-long	scsiread(int, void*, long);
-long	scsiseek(int, long);
-long	scsiwrite(int, void*, long);
+Off	scsiread(int, void*, long);
+Devsize	scsiseek(int, Devsize);
+Off	scsiwrite(int, void*, long);
 int	setatapart(int, char*);
 int	setscsipart(int, char*);
 void	setvec(int, void (*)(Ureg*, void*), void*);
@@ -70,10 +70,10 @@ int	uartgetc(void);
 void	uartputc(int);
 void	wbflush(void);
 void	cpuid(char*, int*, int*);
+
 #define PADDR(a)	((ulong)(a)&~KZERO)
 
 void	ideinit(Device *d);
-int	ideread(Device *d, long,  void*);
-int idewrite(Device *d, long, void*);
-long	atasize(Device *d);
-void	atainitstub(Device *d);
+Devsize	idesize(Device *d);
+int	ideread(Device *d,  Devsize, void*);
+int	idewrite(Device *d, Devsize, void*);

+ 6 - 2
sys/src/fs/sony/io.h → sys/src/fs/9netics64.8k/io.h

@@ -161,9 +161,12 @@ typedef struct Pcidev {
 		int	size;
 	} mem[6];
 
+	uchar	rid;
+	uchar	ccrp;
+	uchar	ccrb;
 	uchar	intl;			/* interrupt line */
-	ushort	ccru;
-
+	ushort	ccru;			/* is uchar in cpu kernel */
+	ulong	pcr;
 
 	Pcidev*	list;
 	Pcidev*	bridge;			/* down a bus */
@@ -181,6 +184,7 @@ extern Pcidev* pcimatch(Pcidev*, int, int);
 extern Pcidev* pcimatchtbdf(int);
 extern void pcireset(void);
 extern void pcisetbme(Pcidev*);
+extern void pciclrbme(Pcidev*);
 
 /*
  *  a parsed plan9.ini line

+ 85 - 0
sys/src/fs/9netics64.8k/mem.h

@@ -0,0 +1,85 @@
+#define	BY2WD		4			/* bytes per word */
+#define BY2V		8			/* bytes per vlong */
+#define	BY2PG		4096			/* bytes per page */
+#define	PGSHIFT		12			/* log(BY2PG) */
+#define PGROUND(s)	(((s)+(BY2PG-1))&~(BY2PG-1))
+#define MB		(1024*1024)
+
+#define	HZ		(82)			/* clock frequency */
+#define	TK2MS(t)	(((ulong)(t)*1000)/HZ)	/* ticks to milliseconds - beware rounding */
+#define	MS2TK(t)	(((ulong)(t)*HZ)/1000)	/* milliseconds to ticks - beware rounding */
+#define	TK2SEC(t)	((t)/HZ)		/* ticks to seconds */
+
+/*
+ * Fundamental addresses
+ */
+#define IDTADDR		0x80000800		/* idt */
+#define APBOOTSTRAP	0x80001000		/* AP bootstrap code */
+#define CONFADDR	0x80001200		/* info passed from boot loader */
+#define CPU0PDB		0x80002000		/* bootstrap processor PDB */
+#define CPU0PTE		0x80003000		/* bootstrap processor PTE's for 0-2MB */
+#define CPU0MACHPTE	0x80004000		/* bootstrap processor PTE for MACHADDR */
+#define CPU0MACH	0x80005000		/* Mach for bootstrap processor */
+
+#define	KZERO		0x80000000		/* base of kernel address space */
+#define	KTZERO		0x80100000		/* first address in kernel text */
+
+#define	MACHSIZE	4096
+
+/*
+ *  known 80386 segments (in GDT) and their selectors
+ */
+#define	NULLSEG	0	/* null segment */
+#define	KDSEG	1	/* kernel data/stack */
+#define	KESEG	2	/* kernel executable */
+#define	UDSEG	3	/* user data/stack */
+#define	UESEG	4	/* user executable */
+#define TSSSEG	5	/* task segment */
+#define N386SEG	6	/* number of segments */
+
+#define SELGDT	(0<<3)	/* selector is in gdt */
+#define	SELLDT	(1<<3)	/* selector is in ldt */
+
+#define SELECTOR(i, t, p)	(((i)<<3) | (t) | (p))
+
+#define NULLSEL	SELECTOR(NULLSEG, SELGDT, 0)
+#define KESEL	SELECTOR(KESEG, SELGDT, 0)
+#define KDSEL	SELECTOR(KDSEG, SELGDT, 0)
+#define UESEL	SELECTOR(UESEG, SELGDT, 3)
+#define UDSEL	SELECTOR(UDSEG, SELGDT, 3)
+#define TSSSEL	SELECTOR(TSSSEG, SELGDT, 0)
+
+/*
+ *  fields in segment descriptors
+ */
+#define SEGDATA	(0x10<<8)	/* data/stack segment */
+#define SEGEXEC	(0x18<<8)	/* executable segment */
+#define	SEGTSS	(0x9<<8)	/* TSS segment */
+#define SEGCG	(0x0C<<8)	/* call gate */
+#define	SEGIG	(0x0E<<8)	/* interrupt gate */
+#define SEGTG	(0x0F<<8)	/* task gate */
+#define SEGTYPE	(0x1F<<8)
+
+#define SEGP	(1<<15)		/* segment present */
+#define SEGPL(x) ((x)<<13)	/* priority level */
+#define SEGB	(1<<22)		/* granularity 1==4k (for expand-down) */
+#define SEGG	(1<<23)		/* granularity 1==4k (for other) */
+#define SEGE	(1<<10)		/* expand down */
+#define SEGW	(1<<9)		/* writable (for data/stack) */
+#define	SEGR	(1<<9)		/* readable (for code) */
+#define SEGD	(1<<22)		/* default 1==32bit (for code) */
+
+/*
+ *  physical MMU
+ */
+#define	PTEVALID	(1<<0)
+#define	PTEUNCACHED	(1<<4)
+#define PTEWRITE	(1<<1)
+#define	PTERONLY	(0<<1)
+#define	PTEKERNEL	(0<<2)
+#define	PTEUSER		(1<<2)
+#define PTESIZE		(1<<7)
+
+#define MACHADDR	((ulong)&mach0)		/* hack number 1 */
+
+#define IFLAG		0x200	/* psw: interrupt enable, to be accurate */

+ 23 - 21
sys/src/fs/sony/mkfile → sys/src/fs/9netics64.8k/mkfile

@@ -1,4 +1,4 @@
-CONF=sony
+CONF=net64.8k
 p=9
 
 objtype=386
@@ -7,10 +7,11 @@ objtype=386
 TARG=$p$CONF'fs'
 
 DEV=\
+	apc.$O\
 	cw.$O\
 	fworm.$O\
+	juke.$O\
 	mworm.$O\
-	sony.$O\
 	wren.$O\
 
 IP=\
@@ -51,7 +52,9 @@ PC=\
 	8250.$O\
 	8253.$O\
 	cga.$O\
-	devata.$O\
+	devsd.$O\
+	sdscsi.$O\
+	sdata.$O\
 	dosfs.$O\
 	floppy.$O\
 	kbd.$O\
@@ -65,16 +68,17 @@ PC=\
 	trap.$O\
 
 ETHER=\
-	etherif.$O\
+	compat.$O\
 	ether2114x.$O\
-	etherelnk3.$O\
+	ether8139.$O\
 	ether82557.$O\
-	compat.$O\
-	ethermii.$O\
 	ether83815.$O\
 	etherdp83820.$O\
-	ether8139.$O\
+	etherelnk3.$O\
 	etherga620.$O\
+	etherif.$O\
+	etherigbe.$O\
+	ethermii.$O\
 
 SCSI=\
 	scsi.$O\
@@ -88,26 +92,26 @@ OBJ=\
 	$IP\
 	$ETHER\
 	$SCSI\
-	
+
 HFILES=\
 	../port/all.h\
 	../port/lib.h\
 	../port/portdat.h\
 	../port/portfns.h\
-	./dat.h\
-	./fns.h\
-	./io.h\
-	./mem.h\
+	dat.h\
+	fns.h\
+	io.h\
+	mem.h\
 	/$objtype/include/u.h\
 	/$objtype/include/ureg.h\
 
 LIB=\
 	-lauthsrv\
-	/$objtype/lib/libc.a\
+	-lc\
 	-lsec\
 
 # -I../pc & -DFS are for compat.h
-CFLAGS=-FVw -I. -I../port -I../pc -DFS
+CFLAGS=-FTVw -I. -I../port -I../pc -DFS
 
 all:V:	$TARG
 
@@ -116,16 +120,14 @@ all:V:	$TARG
 <../dev/mkfile
 <../ip/mkfile
 
-$TARG:	$OBJ $TARG.$O
-	$LD -o $target -l -T0x80100020 $prereq $LIB
-	size $target
-
-$TARG.$O:	$TARG.c
+$TARG:	$TARG.c $OBJ
 	$CC $CFLAGS -DDATE'='`{date -n} $TARG.c
+	$LD -o $target -l -T0x80100020 $OBJ $TARG.$O $LIB
+	size $target
 
 install:V: $TARG
 	cp $TARG /$objtype/
-	9fs dinar && cp $TARG /n/dinar/$objtype/
+#	9fs stand && cp -x $TARG /n/stand/$objtype
 
 $TARG.$O:	../pc/dosfs.h
 

+ 11 - 12
sys/src/fs/choline/9cholinefs.c

@@ -13,10 +13,10 @@
 int FIXEDSIZE = 1;
 
 #ifndef	DATE
-#define	DATE	568011600L+4*3600
+#define	DATE	1094098624L
 #endif
 
-ulong	mktime		= DATE;				/* set by mkfile */
+Timet	mktime		= DATE;				/* set by mkfile */
 Startsb	startsb[] =
 {
 	"main",		2,
@@ -25,24 +25,22 @@ Startsb	startsb[] =
 
 Dos dos;
 
-static
-struct
+static struct
 {
 	char	*name;
-	long	(*read)(int, void*, long);
-	vlong	(*seek)(int, vlong);
-	long	(*write)(int, void*, long);
+	Off	(*read)(int, void*, long);
+	Devsize	(*seek)(int, Devsize);
+	Off	(*write)(int, void*, long);
 	int	(*part)(int, char*);
-} nvrdevs[] =
-{
+} nvrdevs[] = {
 	{ "fd", floppyread, floppyseek, floppywrite, 0, },
 	{ "hd", ataread,   ataseek,   atawrite,   setatapart, },
-	/*
-	{ "sd", scsiread,   scsiseek,   scsiwrite,   setscsipart, },
-	 */
+	/* { "sd", scsiread,   scsiseek,   scsiwrite,   setscsipart, },  */
 	{ 0, },
 };
 
+void apcinit(void);
+
 void
 otherinit(void)
 {
@@ -53,6 +51,7 @@ otherinit(void)
 	printcpufreq();
 	etherinit();
 	scsiinit();
+	apcinit();
 
 	s = spllo();
 	nhd = atainit();

+ 5 - 4
sys/src/fs/choline/dat.h

@@ -1,9 +1,10 @@
-#define RBUFSIZE	(16*1024)	/* raw buffer size */
 /*
- * verify that the kernel reports the right size when you
- * first boot this kernel.
+ * The most fundamental constant.
+ * The code will not compile with RBUFSIZE made a variable;
+ * for one thing, RBUFSIZE determines FEPERBUF, which determines
+ * the number of elements in a free-list-block array.
  */
-/* #define	DSIZE		(79563-1)	/* worm size */
+#define RBUFSIZE	(16*1024)	/* raw buffer size */
 
 #include "../port/portdat.h"
 

+ 15 - 15
sys/src/fs/choline/fns.h

@@ -12,9 +12,9 @@ void	etherinit(void);
 void	etherstart(void);
 int	floppyinit(void);
 void	floppyproc(void);
-long	floppyread(int, void*, long);
-vlong	floppyseek(int, vlong);
-long	floppywrite(int, void*, long);
+Off	floppyread(int, void*, long);
+Devsize	floppyseek(int, Devsize);
+Off	floppywrite(int, void*, long);
 void	fpinit(void);
 char*	getconf(char*);
 ulong	getcr0(void);
@@ -23,12 +23,11 @@ ulong	getcr4(void);
 int	getfields(char*, char**, int, char);
 ulong	getstatus(void);
 int	atainit(void);
-long	ataread(int, void*, long);
-vlong	ataseek(int, vlong);
-long	atawrite(int, void*, long);
+Off	ataread(int, void*, long);
+Devsize	ataseek(int, Devsize);
+Off	atawrite(int, void*, long);
 void	i8042a20(void);
 void	i8042reset(void);
-void	idecheck(Device*);
 int	inb(int);
 void	insb(int, void*, int);
 ushort	ins(int);
@@ -55,11 +54,12 @@ void	putcr3(ulong);
 void	putcr4(ulong);
 void	puttr(ulong);
 void	rdmsr(int, vlong*);
-void	rdtsc(uvlong*);
+void	wrmsr(int, vlong);
+void	(*cycles)(uvlong*);
 void	scsiinit(void);
-long	scsiread(int, void*, long);
-long	scsiseek(int, long);
-long	scsiwrite(int, void*, long);
+Off	scsiread(int, void*, long);
+Devsize	scsiseek(int, Devsize);
+Off	scsiwrite(int, void*, long);
 int	setatapart(int, char*);
 int	setscsipart(int, char*);
 void	setvec(int, void (*)(Ureg*, void*), void*);
@@ -70,10 +70,10 @@ int	uartgetc(void);
 void	uartputc(int);
 void	wbflush(void);
 void	cpuid(char*, int*, int*);
+
 #define PADDR(a)	((ulong)(a)&~KZERO)
 
 void	ideinit(Device *d);
-int	ideread(Device *d, long,  void*);
-int idewrite(Device *d, long, void*);
-long	atasize(Device *d);
-void	atainitstub(Device *d);
+Devsize	idesize(Device *d);
+int	ideread(Device *d,  Devsize, void*);
+int	idewrite(Device *d, Devsize, void*);

+ 6 - 2
sys/src/fs/choline/io.h

@@ -161,9 +161,12 @@ typedef struct Pcidev {
 		int	size;
 	} mem[6];
 
+	uchar	rid;
+	uchar	ccrp;
+	uchar	ccrb;
 	uchar	intl;			/* interrupt line */
-	ushort	ccru;
-
+	ushort	ccru;			/* is uchar in cpu kernel */
+	ulong	pcr;
 
 	Pcidev*	list;
 	Pcidev*	bridge;			/* down a bus */
@@ -181,6 +184,7 @@ extern Pcidev* pcimatch(Pcidev*, int, int);
 extern Pcidev* pcimatchtbdf(int);
 extern void pcireset(void);
 extern void pcisetbme(Pcidev*);
+extern void pciclrbme(Pcidev*);
 
 /*
  *  a parsed plan9.ini line

+ 1 - 1
sys/src/fs/choline/mem.h

@@ -82,4 +82,4 @@
 
 #define MACHADDR	((ulong)&mach0)		/* hack number 1 */
 
-#define IFLAG		0x200
+#define IFLAG		0x200	/* psw: interrupt enable, to be accurate */

+ 19 - 16
sys/src/fs/choline/mkfile

@@ -7,6 +7,7 @@ objtype=386
 TARG=$p$CONF'fs'
 
 DEV=\
+	apc.$O\
 	cw.$O\
 	fworm.$O\
 	juke.$O\
@@ -51,7 +52,9 @@ PC=\
 	8250.$O\
 	8253.$O\
 	cga.$O\
-	devata.$O\
+	devsd.$O\
+	sdscsi.$O\
+	sdata.$O\
 	dosfs.$O\
 	floppy.$O\
 	kbd.$O\
@@ -65,16 +68,17 @@ PC=\
 	trap.$O\
 
 ETHER=\
-	etherif.$O\
+	compat.$O\
 	ether2114x.$O\
-	etherelnk3.$O\
+	ether8139.$O\
 	ether82557.$O\
-	compat.$O\
-	ethermii.$O\
 	ether83815.$O\
 	etherdp83820.$O\
-	ether8139.$O\
+	etherelnk3.$O\
 	etherga620.$O\
+	etherif.$O\
+	etherigbe.$O\
+	ethermii.$O\
 
 SCSI=\
 	scsi.$O\
@@ -88,7 +92,7 @@ OBJ=\
 	$IP\
 	$ETHER\
 	$SCSI\
-	
+
 HFILES=\
 	../port/all.h\
 	../port/lib.h\
@@ -103,11 +107,12 @@ HFILES=\
 
 LIB=\
 	-lauthsrv\
-	/$objtype/lib/libc.a\
+	-lc\
 	-lsec\
 
 # -I../pc & -DFS are for compat.h
-CFLAGS=-FVw -I. -I../port -I../pc -DFS
+# -DOLD uses 32-bit file offsets instead of 64-bit ones
+CFLAGS=-FTVw -I. -I../port -I../pc -DFS -DOLD
 
 all:V:	$TARG
 
@@ -116,17 +121,15 @@ all:V:	$TARG
 <../dev/mkfile
 <../ip/mkfile
 
-$TARG:	$OBJ $TARG.$O
-	$LD -o $target -l -T0x80100020 $prereq $LIB
-	size $target
-
-$TARG.$O:	$TARG.c
+$TARG:	$TARG.c $OBJ
 	$CC $CFLAGS -DDATE'='`{date -n} $TARG.c
+	$LD -o $target -l -T0x80100020 $OBJ $TARG.$O $LIB
+	size $target
 
 install:V: $TARG
 	cp $TARG /$objtype/
-	#import lookout / /n/lookout && cp $TARG /n/lookout/$objtype/
-	#import boundary / /n/boundary && cp $TARG /n/boundary/$objtype/
+	import lookout / /n/lookout && cp $TARG /n/lookout/$objtype/
+	import boundary / /n/boundary && cp $TARG /n/boundary/$objtype/