Initial import from FreeBSD RELENG_4:
[games.git] / sys / bus / firewire / 00README
1 $FreeBSD: src/sys/dev/firewire/00README,v 1.1.4.2 2003/02/10 07:17:25 simokawa Exp $
2
3 IEEE 1394 support for FreeBSD-5.X and 4.X.
4
5 1. Introduction
6
7           This tarball contains IEEE1394(FireWire) driver which is first
8         written by Katsushi Kobayashi[1] <ikob@koganei.wide.ad.jp> and
9         modified by Hidetoshi Shimokawa <simokawa@freebsd.org>.
10         Please note this driver is still under development.
11         You can find latest snapshots under:
12                 http://people.freebsd.org/~simokawa/
13         named firewire-2002XXXX.tar.gz
14
15         The driver consists of 6 parts:
16
17         - fwohci.c/fwohci_pci.c
18                 OHCI[2] driver
19                         - IEEE1394 link/phy chip control
20         - firewire.c
21                 Chip independent driver 
22                         - CSR
23                         - Transaction
24                         - Character devices for userland
25         - fwmem.c
26                 /dev/fwmem0: physical memory of a remote node.
27         - sbp.c
28                 SBP-II[3] (a.k.a. SCSI over FireWire) driver
29
30         - if_fwe.c
31                 NON-Standard implementation of Ethernet over FireWire.
32
33         - bus_mgm.c (userland)
34                 Bus management function for user. 
35                 show topology map, change gap count, bus reset, etc.
36
37 2. Installation
38
39         Suppose you have kernel source at /sys.
40
41         - Extract tarball at root directory.
42         - cd /sys/dev/firewire
43         - make 
44         - make install
45         - make load
46
47         For FreeBSD-4 user:
48
49         - ./MAKEDEV
50
51 3. SBP-II support (sbp)
52
53         - You need CAM(SCSI) support in your kernel.
54           If you are using FreeBSD-5 before 2002/03/23 or FreeBSD-4 before
55           2002/4/8, you need to apply CAM-patch in this archive
56           to handle HDD's(T_RBC or T_DIRECT which doesn't support READ_6).
57
58         - If you connect a few firewire devices only, try the following to
59           reduce gap overhead.
60
61                 - ./bus_mgm -g 8
62
63 4. Ethernet over FireWire (if_fwe)
64
65           This is a sample driver for ethernet emulation. Please note this
66         does NOT conform to any standards like IP over FireWire(RFC2734[4]).
67         It just sends ethernet frames encapsulated in asynchronous stream
68         packets. It doesn't scale because it does something like unicast over           multicast, but it's easy to be implemented and you can use any
69         facilities what ethernet can do. (ipv6, bridging, vlan etc.)
70
71           It also has DEVICE_POLLING[5] support. To enable it, edit your
72         kernel config file and Makefile.fwe then rebuild kernel and if_fwe.ko.
73         Note this driver checks kern.polling.enable only when enabling the
74         interface. When you enable polling after the interface is up,
75         try 'ifconfig fwe0 down;ifconfig fwe0 up'.
76
77 5. FireWire for Kernel Hackers
78
79           As you know, IEEE1394 is a bus and OHCI supports physical access
80         to the host memory. This means that you can access the remote
81         host over firewire without software support at the remote host.
82         In other words, you can investigate remote host's physical memory
83         whether its OS is alive or crashed or hangs up.
84
85           You need to apply KVMLIB-patch and rebuild libkvm then rebuild ps,
86         dmesg and gdb those are statically linked.
87         You may want to apply GDB-patch in this archive to get same behavior
88         as gdb with /dev/mem or want to insert savectx(&dumppcb) into panic(),
89         breakpoint() and so on to emulation crash dump.
90
91           You have to determine target node_id manually at this point.
92         (guess using bus_mgm -t or dmesg)
93         (Targets should be specified by EUI64 in the future)
94
95         # sysctl kern.firewire.fwmem_node=[node_id]
96
97         # ps -agx -M /dev/fwmem0 -N /sys/i386/compile/GENERIC/kernel
98         # dmesg -M /dev/fwmem0 -N /sys/i386/compile/GENERIC/kernel
99         # gdb -k -c /dev/fwmem0 /sys/i386/compile/GENERIC/kernel.debug
100         # dd if=/dev/fwmem0 of=vmcore bs=1m count=[phys. memory in MB]
101
102         remote gdb at 400,000,000 bps :-)
103
104         
105 6. DV
106         I have not tested yet.
107
108 7. Tested HW
109
110         OS
111         - FreeBSD-4/i386
112         - FreeBSD-4/alpha
113         - FreeBSD-5/i386
114
115         * Not tested on SMP.
116         * Not tested on big-endian machine...
117
118         OHCI
119         - Texas Instruments TSB12LV26 (PCI)
120         - Texas Instruments TSB43AA22 (PCI/Cardbus)
121
122         * There might be phy probing problem but most of the OHCI
123           chips should work.
124         * Tested with multiple firewire buses.
125
126         SBP-II
127         - HDD: Logitec USB/FireWire LHD-P30FU
128         - HDD: Yano A-dish 120GB
129         - HDD: Yano B-Max 320GB
130                 The repository of cvsup2.jp.freebsd.org is on this device.
131         - HDD: Personal Storage 3000XT 160GB
132                 The last sector of this drive cannot be accessed..
133         - DVD-RAM: Panasonic LF-D340JD 
134         - SCSI-FireWire converter: Yano FWSCSI-01
135                 We can recognize only 1 device/lun at this point
136         - HDD: iPod, PowerBook G4 (target mode)
137                 Reported by ikob
138         - Scanner: Epson GT-9700F
139                 Now works!!
140                 Sane-backend needs a patch(SANE-patch in this archive).
141
142         if_fwe
143         - IPv4, IPv6, bridging, vlan.
144         - You need at least two FreeBSD machines with this driver to use.
145
146 References:
147 [1] ftp://ftp.uec.ac.jp/pub/firewire/beta/ 
148 [2] http://developer.intel.com/technology/1394/download/ohci_11.htm
149 [3] http://www.t10.org/scsi-3.htm
150 [4] http://www.faqs.org/rfcs/rfc2734.html
151 [5] http://info.iet.unipi.it/~luigi/polling/
152
153
154 Hidetoshi Shimokawa
155 simokawa@freebsd.org