From owner-freebsd-hackers@FreeBSD.ORG Thu Feb 10 10:34:49 2005 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 793C216A4CE for ; Thu, 10 Feb 2005 10:34:49 +0000 (GMT) Received: from gatekeeper.syskonnect.de (gatekeeper.syskonnect.de [213.144.13.149]) by mx1.FreeBSD.org (Postfix) with ESMTP id 0ADB843D41 for ; Thu, 10 Feb 2005 10:34:48 +0000 (GMT) (envelope-from gheinig@syskonnect.de) Received: from syskonnect.de (skd.de [10.9.15.1])j1AAZ091001283; Thu, 10 Feb 2005 11:35:00 +0100 (MET) Received: from syskonnect.de (localhost [127.0.0.1]) by syskonnect.de (8.12.11/8.12.11) with ESMTP id j1AAYjhv026326; Thu, 10 Feb 2005 11:34:46 +0100 (MET) Message-ID: <420B38AA.9050306@syskonnect.de> Date: Thu, 10 Feb 2005 11:34:18 +0100 From: Gerald Heinig User-Agent: Mozilla Thunderbird 0.5 (X11/20040208) X-Accept-Language: en-us, en MIME-Version: 1.0 To: Stephan Uphoff References: <420731DD.3050206@syskonnect.de> <1107798981.6309.9.camel@palm.tree.com> <42088232.1030001@syskonnect.de> <4208B9C2.6020007@syskonnect.de> <1107888844.6309.221.camel@palm.tree.com> <4209C640.3070502@syskonnect.de> <1107964038.6309.1137.camel@palm.tree.com> In-Reply-To: <1107964038.6309.1137.camel@palm.tree.com> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit cc: hackers@freebsd.org Subject: Re: Firewire blues X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 10 Feb 2005 10:34:49 -0000 Stephan Uphoff wrote: > On Wed, 2005-02-09 at 03:13, Gerald Heinig wrote: > >> Stephan Uphoff wrote: >> >>> There are two ways using kgdb to debug a target with firewire. >>> The first way basically replaces the slow serial cable for >>> communication to the remote target gdb stub. The second way uses >>> the remote DMA capabilities of firewire to directly read memory >>> of the target WITHOUT using any debugging software/stub on the >>> target. (Think remote core file) >>> >>> Greg Lehey wrote a nice kernel debugging tutorial that explains >>> both types of firewire debugging. >>> http://www.lemis.com/grog/Papers/Debug-tutorial/tutorial.pdf >>> >>> This should get you started with only minor adjustments >>> (gdb->kgdb) . >> >> This is actually the paper I'm using. I've followed the >> instructions on both methods, but I can't get it to work. The >> direct machine-machine connection is fine (ie. the one with >> dconschat). It's the kgdb connection that doesn't work. I presume >> it worked out of the box for you then? > > > Once I linked in dcons, dcons_crom and firewire into the kernel > everything worked. (I think only dcons is really needed - maybe a > link set issue?) I only used the gdb stub method. > > Can you send me your dmesg? (After you linked the dcons stuff into > the kernel) Hi Stephan, here's my dmesg: Copyright (c) 1992-2004 The FreeBSD Project. Copyright (c) 1979, 1980, 1983, 1986, 1988, 1989, 1991, 1992, 1993, 1994 The Regents of the University of California. All rights reserved. FreeBSD 5.3-RELEASE #0: Thu Feb 10 11:28:00 CET 2005 root@gheinig-bsd.marvell.com:/usr/src/sys/i386/compile/FIREWIRE MPTable: Timecounter "i8254" frequency 1193182 Hz quality 0 CPU: Intel(R) Pentium(R) 4 CPU 2.00GHz (2000.04-MHz 686-class CPU) Origin = "GenuineIntel" Id = 0xf27 Stepping = 7 Features=0xbfebfbff real memory = 535236608 (510 MB) avail memory = 514101248 (490 MB) ioapic0: Changing APIC ID to 1 ioapic0: Assuming intbase of 0 ioapic0 irqs 0-23 on motherboard npx0: [FAST] npx0: on motherboard npx0: INT 16 interface pcib0: pcibus 0 on motherboard pci0: on pcib0 pci0: at device 2.0 (no driver attached) uhci0: port 0xff80-0xff9f irq 16 at device 29.0 on pci0 uhci0: [GIANT-LOCKED] usb0: on uhci0 usb0: USB revision 1.0 uhub0: Intel UHCI root hub, class 9/0, rev 1.00/1.00, addr 1 uhub0: 2 ports with 2 removable, self powered uhci1: port 0xff60-0xff7f irq 19 at device 29.1 on pci0 uhci1: [GIANT-LOCKED] usb1: on uhci1 usb1: USB revision 1.0 uhub1: Intel UHCI root hub, class 9/0, rev 1.00/1.00, addr 1 uhub1: 2 ports with 2 removable, self powered uhci2: port 0xff40-0xff5f irq 18 at device 29.2 on pci0 uhci2: [GIANT-LOCKED] usb2: on uhci2 usb2: USB revision 1.0 uhub2: Intel UHCI root hub, class 9/0, rev 1.00/1.00, addr 1 uhub2: 2 ports with 2 removable, self powered pci0: at device 29.7 (no driver attached) pcib1: at device 30.0 on pci0 pci1: on pcib1 pci1: at device 7.0 (no driver attached) fwohci0: port 0xec80-0xecff mem 0xff8fb800-0xff8fbfff irq 17 at device 8.0 on pci1 fwohci0: OHCI version 1.0 (ROM=1) fwohci0: No. of Isochronous channels is 8. fwohci0: EUI64 00:01:08:00:37:01:c3:be fwohci0: Phy 1394a available S400, 3 ports. fwohci0: Link S400, max_rec 2048 bytes. firewire0: on fwohci0 dcons_crom0: on firewire0 dcons_crom0: bus_addr 0x1f2fc000 fwe0: on firewire0 if_fwe0: Fake Ethernet address: 02:01:08:01:c3:be fwe0: Ethernet address: 02:01:08:01:c3:be fwe0: if_start running deferred for Giant sbp0: on firewire0 fwohci0: Initiate bus reset fwohci0: node_id=0xc000ffc1, gen=1, CYCLEMASTER mode firewire0: 2 nodes, maxhop <= 1, cable IRM = 1 (me) firewire0: bus manager 1 (me) pci1: at device 9.0 (no driver attached) pci1: at device 10.0 (no driver attached) em0: port 0xec40-0xec7f mem 0xff8c0000-0xff8dffff irq 18 at device 12.0 on pci1 em0: Ethernet address: 00:08:74:f5:ca:44 em0: Speed:N/A Duplex:N/A isab0: at device 31.0 on pci0 isa0: on isab0 atapci0: port 0xffa0-0xffaf,0x376,0x170-0x177,0x3f6,0x1f0-0x1f7 at device 31.1 on pci0 ata0: channel #0 on atapci0 ata1: channel #1 on atapci0 pci0: at device 31.3 (no driver attached) pci0: at device 31.5 (no driver attached) cpu0 on motherboard orm0: at iomem 0xc9800-0xcbfff,0xc8000-0xc97ff,0xc0000-0xc7fff on isa0 pmtimer0 on isa0 atkbdc0: at port 0x64,0x60 on isa0 atkbd0: irq 1 on atkbdc0 kbd0 at atkbd0 atkbd0: [GIANT-LOCKED] psm0: irq 12 on atkbdc0 psm0: [GIANT-LOCKED] psm0: model Generic PS/2 mouse, device ID 0 fdc0: at port 0x3f0-0x3f5 irq 6 drq 2 on isa0 fdc0: [FAST] fd0: <1440-KB 3.5" drive> on fdc0 drive 0 ppc0: at port 0x378-0x37f irq 7 on isa0 ppc0: SMC-like chipset (ECP/EPP/PS2/NIBBLE) in COMPATIBLE mode ppc0: FIFO with 16/16/8 bytes threshold ppbus0: on ppc0 plip0: on ppbus0 lpt0: on ppbus0 lpt0: Interrupt-driven port ppi0: on ppbus0 sc0: at flags 0x100 on isa0 sc0: VGA <16 virtual consoles, flags=0x300> sio0 at port 0x3f8-0x3ff irq 4 flags 0x10 on isa0 sio0: type 16550A sio1: configured irq 3 not in bitmap of probed irqs 0 sio1: port may not be enabled vga0: at port 0x3c0-0x3df iomem 0xa0000-0xbffff on isa0 unknown: can't assign resources (port) unknown: can't assign resources (port) unknown: can't assign resources (port) unknown: can't assign resources (irq) unknown: can't assign resources (port) Timecounter "TSC" frequency 2000036632 Hz quality 800 Timecounters tick every 10.000 msec ad0: 39205MB [79656/16/63] at ata0-master UDMA100 firewire0: New S400 device ID:0001080038022bcf Mounting root from ufs:/dev/ad0s4a em0: Link is up 100 Mbps Full Duplex