00README revision 150789
190075Sobrien$FreeBSD: head/sys/dev/firewire/00README 150789 2005-10-01 18:56:19Z glebius $ 2169689Skan 390075SobrienIEEE 1394 support for FreeBSD-5.X and 4.X. 490075Sobrien 5132718Skan1. Introduction 690075Sobrien 7132718Skan This tarball contains IEEE1394(FireWire) driver which is first 890075Sobrien written by Katsushi Kobayashi[1] <ikob@koganei.wide.ad.jp> and 990075Sobrien modified by Hidetoshi Shimokawa <simokawa@freebsd.org>. 1090075Sobrien Please note this driver is still under development. 1190075Sobrien You can find latest snapshots under: 12132718Skan http://people.freebsd.org/~simokawa/ 1390075Sobrien named firewire-2002XXXX.tar.gz 1490075Sobrien 1590075Sobrien The driver consists of 6 parts: 1690075Sobrien 1790075Sobrien - fwohci.c/fwohci_pci.c 18132718Skan OHCI[2] driver 19169689Skan - IEEE1394 link/phy chip control 20169689Skan - firewire.c 2190075Sobrien Chip independent driver 2290075Sobrien - CSR 2390075Sobrien - Transaction 24117395Skan - Character devices for userland 25117395Skan - fwmem.c 26117395Skan /dev/fwmem0: physical memory of a remote node. 27132718Skan - sbp.c 28117395Skan SBP-II[3] (a.k.a. SCSI over FireWire) driver 29117395Skan 3090075Sobrien - if_fwe.c 3190075Sobrien NON-Standard implementation of Ethernet over FireWire. 32117395Skan 3390075Sobrien - bus_mgm.c (userland) 34107590Sobrien Bus management function for user. 35107590Sobrien show topology map, change gap count, bus reset, etc. 36107590Sobrien 37107590Sobrien2. Installation 38107590Sobrien 39107590Sobrien Suppose you have kernel source at /sys. 40132718Skan 41132718Skan - Extract tarball at root directory. 42132718Skan - cd /sys/dev/firewire 43132718Skan - make 4490075Sobrien - make install 4590075Sobrien - make load 4690075Sobrien 4790075Sobrien For FreeBSD-4 user: 4890075Sobrien 4990075Sobrien - ./MAKEDEV 5090075Sobrien 5190075Sobrien3. SBP-II support (sbp) 52169689Skan 53169689Skan - You need CAM(SCSI) support in your kernel. 54169689Skan If you are using FreeBSD-5 before 2002/03/23 or FreeBSD-4 before 5590075Sobrien 2002/4/8, you need to apply CAM-patch in this archive 56117395Skan to handle HDD's(T_RBC or T_DIRECT which doesn't support READ_6). 5796263Sobrien 5890075Sobrien - If you connect a few firewire devices only, try the following to 5990075Sobrien reduce gap overhead. 6090075Sobrien 61169689Skan - ./bus_mgm -g 8 62169689Skan 6396263Sobrien4. Ethernet over FireWire (if_fwe) 6490075Sobrien 65169689Skan This is a sample driver for ethernet emulation. Please note this 66169689Skan does NOT conform to any standards like IP over FireWire(RFC2734[4]). 67169689Skan It just sends ethernet frames encapsulated in asynchronous stream 68169689Skan 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 69169689Skan facilities what ethernet can do. (ipv6, bridging, vlan etc.) 70169689Skan 71132718Skan It also has DEVICE_POLLING[5] support. To enable it, edit your 7296263Sobrien kernel config file and Makefile.fwe then rebuild kernel and if_fwe.ko. 73132718Skan 74132718Skan5. FireWire for Kernel Hackers 7596263Sobrien 76169689Skan As you know, IEEE1394 is a bus and OHCI supports physical access 7796263Sobrien to the host memory. This means that you can access the remote 78169689Skan host over firewire without software support at the remote host. 79169689Skan In other words, you can investigate remote host's physical memory 80169689Skan whether its OS is alive or crashed or hangs up. 81169689Skan 82169689Skan You need to apply KVMLIB-patch and rebuild libkvm then rebuild ps, 83169689Skan dmesg and gdb those are statically linked. 84169689Skan You may want to apply GDB-patch in this archive to get same behavior 8596263Sobrien as gdb with /dev/mem or want to insert savectx(&dumppcb) into panic(), 86 breakpoint() and so on to emulation crash dump. 87 88 You have to determine target node_id manually at this point. 89 (guess using bus_mgm -t or dmesg) 90 (Targets should be specified by EUI64 in the future) 91 92 # sysctl kern.firewire.fwmem_node=[node_id] 93 94 # ps -agx -M /dev/fwmem0 -N /sys/i386/compile/GENERIC/kernel 95 # dmesg -M /dev/fwmem0 -N /sys/i386/compile/GENERIC/kernel 96 # gdb -k -c /dev/fwmem0 /sys/i386/compile/GENERIC/kernel.debug 97 # dd if=/dev/fwmem0 of=vmcore bs=1m count=[phys. memory in MB] 98 99 remote gdb at 400,000,000 bps :-) 100 101 1026. DV 103 I have not tested yet. 104 1057. Tested HW 106 107 OS 108 - FreeBSD-4/i386 109 - FreeBSD-4/alpha 110 - FreeBSD-5/i386 111 112 * Not tested on SMP. 113 * Not tested on big-endian machine... 114 115 OHCI 116 - Texas Instruments TSB12LV26 (PCI) 117 - Texas Instruments TSB43AA22 (PCI/Cardbus) 118 119 * There might be phy probing problem but most of the OHCI 120 chips should work. 121 * Tested with multiple firewire buses. 122 123 SBP-II 124 - HDD: Logitec USB/FireWire LHD-P30FU 125 - HDD: Yano A-dish 120GB 126 - HDD: Yano B-Max 320GB 127 The repository of cvsup2.jp.freebsd.org is on this device. 128 - HDD: Personal Storage 3000XT 160GB 129 The last sector of this drive cannot be accessed.. 130 - DVD-RAM: Panasonic LF-D340JD 131 - SCSI-FireWire converter: Yano FWSCSI-01 132 We can recognize only 1 device/lun at this point 133 - HDD: iPod, PowerBook G4 (target mode) 134 Reported by ikob 135 - Scanner: Epson GT-9700F 136 Now works!! 137 Sane-backend needs a patch(SANE-patch in this archive). 138 139 if_fwe 140 - IPv4, IPv6, bridging, vlan. 141 - You need at least two FreeBSD machines with this driver to use. 142 143References: 144[1] ftp://ftp.uec.ac.jp/pub/firewire/beta/ 145[2] http://developer.intel.com/technology/1394/download/ohci_11.htm 146[3] http://www.t10.org/scsi-3.htm 147[4] http://www.faqs.org/rfcs/rfc2734.html 148[5] http://info.iet.unipi.it/~luigi/polling/ 149 150 151Hidetoshi Shimokawa 152simokawa@freebsd.org 153