From owner-freebsd-current@FreeBSD.ORG Wed Mar 29 10:40:55 2006 Return-Path: X-Original-To: freebsd-current@freebsd.org Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id CC6B416A401; Wed, 29 Mar 2006 10:40:55 +0000 (UTC) (envelope-from gmicsko@szintezis.hu) Received: from mta01.mail.t-online.hu (mta04.mail.t-online.hu [195.228.240.57]) by mx1.FreeBSD.org (Postfix) with ESMTP id 2C15F43D46; Wed, 29 Mar 2006 10:40:55 +0000 (GMT) (envelope-from gmicsko@szintezis.hu) Received: from int-62.int-air.net (unknown [82.150.62.62]) (using SSLv3 with cipher RC4-MD5 (128/128 bits)) (No client certificate requested) by mail.t-online.hu (Postfix) with ESMTP; Wed, 29 Mar 2006 12:40:49 +0200 (CEST) From: Gabor MICSKO To: Craig Rodrigues In-Reply-To: <20060325184842.GA10319@crodrigues.org> References: <1143290847.9536.16.camel@alderaan.trey.hu> <20060325184842.GA10319@crodrigues.org> Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="=-ewkN9u0JCyeG+peMEOME" Date: Wed, 29 Mar 2006 12:40:49 +0200 Message-Id: <1143628849.7700.30.camel@alderaan.trey.hu> Mime-Version: 1.0 X-Mailer: Evolution 2.4.1 Cc: simokawa@freebsd.org, freebsd-current@freebsd.org Subject: Re: fatal trap 19: old firewire bug? X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 29 Mar 2006 10:40:55 -0000 --=-ewkN9u0JCyeG+peMEOME Content-Type: text/plain; charset=iso-8859-2 Content-Transfer-Encoding: quoted-printable Hi Craig! I have created a modified 6.4 beta 4 installer ISO with a patched GENERIC kernel.=20 With the following patch (dfly), i have successfully installed the FreeBSD 6.4 beta 4 to my laptop. At firewire init i have'nt got fatal trap. Firewire itself doesn't recognized correctly (i think because a new, unknown hardware or PCI ID?). Dmesg: Copyright (c) 1992-2006 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 6.1-BETA4 #1: Mon Mar 27 17:14:54 CEST 2006 root@trey03.trey.hu:/usr/obj/usr/src/sys/COREDUO Timecounter "i8254" frequency 1193182 Hz quality 0 CPU: Genuine Intel(R) CPU T2600 @ 2.16GHz (2161.27-MHz 686-class CPU) Origin =3D "GenuineIntel" Id =3D 0x6e8 Stepping =3D 8 Features=3D0xbfe9fbff Features2=3D0xc1a9,> AMD Features=3D0x100000 Hyperthreading: 2 logical CPUs real memory =3D 526909440 (502 MB) avail memory =3D 506241024 (482 MB) ACPI APIC Table: ioapic0: Changing APIC ID to 1 ioapic0 irqs 0-23 on motherboard npx0: [FAST] npx0: on motherboard npx0: INT 16 interface acpi0: on motherboard acpi_bus_number: can't get _ADR acpi_bus_number: can't get _ADR acpi0: Power Button (fixed) acpi_bus_number: can't get _ADR acpi_bus_number: can't get _ADR acpi_ec0: port 0x62,0x66 on acpi0 Timecounter "ACPI-fast" frequency 3579545 Hz quality 1000 acpi_timer0: <24-bit timer at 3.579545MHz> port 0x1008-0x100b on acpi0 cpu0: on acpi0 acpi_throttle0: on cpu0 battery0: on acpi0 acpi_button0: on acpi0 acpi_button1: on acpi0 acpi_acad0: on acpi0 acpi_lid0: on acpi0 pcib0: port 0xcf8-0xcff on acpi0 pci0: on pcib0 pci0: at device 2.0 (no driver attached) pci0: at device 2.1 (no driver attached) pci0: at device 27.0 (no driver attached) pcib1: irq 17 at device 28.0 on pci0 pci2: on pcib1 pcib2: irq 16 at device 28.1 on pci0 pci3: on pcib2 uhci0: port 0x1820-0x183f irq 23 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 0x1840-0x185f 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 0x1860-0x187f 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 uhci3: port 0x1880-0x189f irq 16 at device 29.3 on pci0 uhci3: [GIANT-LOCKED] usb3: on uhci3 usb3: USB revision 1.0 uhub3: Intel UHCI root hub, class 9/0, rev 1.00/1.00, addr 1 uhub3: 2 ports with 2 removable, self powered ehci0: mem 0xd0444000-0xd04443ff irq 23 at device 29.7 on pci0 ehci0: [GIANT-LOCKED] usb4: EHCI version 1.0 usb4: companion controllers, 2 ports each: usb0 usb1 usb2 usb3 usb4: on ehci0 usb4: USB revision 2.0 uhub4: Intel EHCI root hub, class 9/0, rev 2.00/1.00, addr 1 uhub4: 8 ports with 8 removable, self powered ugen0: vendor 0x0402 USB2.0 Camera, rev 2.00/1.00, addr 2 pcib3: at device 30.0 on pci0 pci4: on pcib3 cbb0: at device 7.0 on pci4 cardbus0: on cbb0 pccard0: <16-bit PCCard bus> on cbb0 pci4: at device 7.1 (no driver attached) pci4: at device 7.2 (no driver attached) pci4: at device 7.3 (no driver attached) re0: port 0x2000-0x20ff mem 0xd0005c00-0xd0005cff irq 17 at device 11.0 on pci4 miibus0: on re0 rgephy0: on miibus0 rgephy0: 10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, 1000baseTX, 1000baseTX-FDX, auto re0: Ethernet address: 00:90:f5:4d:15:05 isab0: at device 31.0 on pci0 isa0: on isab0 atapci0: port 0x1f0-0x1f7,0x3f6,0x170-0x177,0x376,0x1810-0x181f at device 31.1 on pci0 ata0: on atapci0 ata1: on atapci0 atapci1: port 0x18d0-0x18d7,0x18c4-0x18c7,0x18c8-0x18cf,0x18c0-0x18c3,0x18b0-0x18bf mem 0xd0444400-0xd04447ff irq 19 at device 31.2 on pci0 ata2: on atapci1 ata3: on atapci1 pci0: at device 31.3 (no driver attached) acpi_tz0: on acpi0 acpi_tz0: _CRT value is absurd, ignored (154.8C) atkbdc0: port 0x60,0x64 irq 1 on acpi0 atkbd0: irq 1 on atkbdc0 kbd0 at atkbd0 atkbd0: [GIANT-LOCKED] psm0: irq 12 on atkbdc0 psm0: [GIANT-LOCKED] psm0: model IntelliMouse, device ID 3 pmtimer0 on isa0 orm0: at iomem 0xce800-0xcf7ff,0xdc000-0xdffff,0xe0000-0xe17ff on isa0 ppc0: parallel port not found. sc0: at flags 0x100 on isa0 sc0: VGA <16 virtual consoles, flags=3D0x300> sio0: configured irq 4 not in bitmap of probed irqs 0 sio0: port may not be enabled sio0 at port 0x3f8-0x3ff irq 4 flags 0x10 on isa0 sio0: type 8250 or not responding 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 Timecounter "TSC" frequency 2161269669 Hz quality 800 Timecounters tick every 1.000 msec acpi_tz0: _CRT value is absurd, ignored (154.8C) cpu0: Cx states changed acd0: DVDR at ata0-master UDMA33 ad4: 76319MB at ata2-master SATA150 Trying to mount root from ufs:/dev/ad4s1a cpu0: Cx states changed cpu0: Cx states changed re0: link state changed to UP acpi_tz0: _CRT value is absurd, ignored (154.8C) acpi_tz0: _CRT value is absurd, ignored (154.8C) cpu0: Cx states changed cpu0: Cx states changed umass0: USB Solid state disk, rev 1.10/1.00, addr 2 da0 at umass-sim0 bus 0 target 0 lun 0 da0: Removable Direct Access SCSI-2 device=20 da0: 1.000MB/s transfers da0: 31MB (64512 512 byte sectors: 64H 32S/T 31C) Patch: =20 --- fwohci_pci.c.orig Mon Mar 27 22:11:47 2006 +++ fwohci_pci.c Mon Mar 27 22:36:47 2006 @@ -240,13 +240,23 @@ int olatency, latency, ocache_line, cache_line; uint16_t cmd; + /* + * Clear PCIM_CMD_MWRICEN as per FreeBSD/1.20, but note that the + * problem may have been related to SERR and PERR being + * unconditionally enabled in that rev. + * + * Do not change the SERRESPEN or PERRESPEN bits. Use the BIOS + * values (probably off). This crashes some machines in fwohci_init(). + * + * The theory here is that the device may not be properly initializing + * its on-chip memory, leaving some of it in a parity errored state, + * and enabling parity check may result in the device blowing up. + * It's also possible that some hardware is just plain broken. OpenBSD + * does not turn on SERRESPEN or PERRESPEN so we won't either. + */ cmd =3D pci_read_config(self, PCIR_COMMAND, 2); - cmd |=3D PCIM_CMD_MEMEN | PCIM_CMD_BUSMASTEREN | PCIM_CMD_MWRICEN | - PCIM_CMD_SERRESPEN | PCIM_CMD_PERRESPEN; -#if 1 /* for broken hardware */ + cmd |=3D PCIM_CMD_MEMEN | PCIM_CMD_BUSMASTEREN; cmd &=3D ~PCIM_CMD_MWRICEN; - cmd &=3D ~(PCIM_CMD_SERRESPEN | PCIM_CMD_PERRESPEN); -#endif pci_write_config(self, PCIR_COMMAND, cmd, 2); /* Please test and commit it if possible. Thank you! On Sat, 2006-03-25 at 13:48 -0500, Craig Rodrigues wrote: > On Sat, Mar 25, 2006 at 01:47:26PM +0100, Gabor MICSKO wrote: > >=20 > > Hi! > >=20 > > I have an Intel Core Duo-based laptop.=20 > > http://hup.hu/old/images/trey/work/clevo_core_duo/S3600054.JPG > >=20 > > With FreeBSD 6.1 beta 4 and FreeBSD 5.5 beta i got following error > > message: > >=20 > > http://hup.hu/old/images/trey/work/clevo_core_duo/S3600052.JPG > >=20 > > It seems to me like an old firewire initialization problem in FreeBSD. > > I've reported thid problem in 2004 to both FreeBSD (no success) and > > Dragonfly BSD with an AMD64-based laptop: > >=20 > > http://marc.theaimsgroup.com/?l=3Ddragonfly-kernel&m=3D109967161431080&= w=3D2 > >=20 > > Matthew Dillon fixed the problem in DragonFly BSD in 2004: > >=20 > > http://marc.theaimsgroup.com/?l=3Ddragonfly-commits&m=3D109993279403326= &w=3D2 >=20 >=20 > Does the Dragonfly fix work for you if applied to FreeBSD? >=20 > simokawa@ implemented a similar fix in version 1.50 of FreeBSD's > fwohci_pci.c, but it is not quite the same as Dfly's....it=20 > explicitly sets the PCIM_CMD_SERRESPEN and PCIM_CMD_PERRESPEN > bits to off, while Dfly just uses whatever default values > the BIOS has for those bits. >=20 > I would ask simokawa if Dfly's fix is OK for FreeBSD. It looks > like it might work for you: >=20 > http://www.dragonflybsd.org/cvsweb/src/sys/bus/firewire/fwohci_pci.c.diff= ?r1=3D1.15&r2=3D1.16&f=3Du >=20 --=20 Micsk=F3 G=E1bor HP APS, AIS, ASE Szint=E9zis Rt. H-9023 Gy=F5r, Tihanyi =C1. u. 2. Tel: +36 96 502 221 Fax: +36 96 318 658 E-mail: gmicsko@szintezis.hu --=-ewkN9u0JCyeG+peMEOME Content-Type: application/pgp-signature; name=signature.asc Content-Description: This is a digitally signed message part -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.1 (GNU/Linux) iD8DBQBEKmQwo75Oas+VX1ARAtK1AKClsUOo1L8jfCB53Y8GBHn0evWVdACgiKQL fRdJCd6ioecwZPbS3bnuF48= =wu/h -----END PGP SIGNATURE----- --=-ewkN9u0JCyeG+peMEOME--