From owner-freebsd-current@FreeBSD.ORG Sat Jul 1 02:15:07 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 0E77616A40F for ; Sat, 1 Jul 2006 02:15:06 +0000 (UTC) (envelope-from mistry.7@osu.edu) Received: from mail.united-ware.com (am-productions.biz [69.61.164.22]) by mx1.FreeBSD.org (Postfix) with ESMTP id 019F243D8C for ; Sat, 1 Jul 2006 02:14:31 +0000 (GMT) (envelope-from mistry.7@osu.edu) Received: from [192.168.1.100] (am-productions.biz [69.61.164.22]) (authenticated bits=0) by mail.united-ware.com (8.13.6/8.13.6) with ESMTP id k612JmmZ013447 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Fri, 30 Jun 2006 22:19:54 -0400 (EDT) (envelope-from mistry.7@osu.edu) From: Anish Mistry To: =?iso-8859-1?q?S=F8ren_Schmidt?= Date: Fri, 30 Jun 2006 22:14:48 -0400 User-Agent: KMail/1.9.1 References: <200606161333.07522.mistry.7@osu.edu> <200606301712.07715.mistry.7@osu.edu> <44A598BC.20200@deepcore.dk> In-Reply-To: <44A598BC.20200@deepcore.dk> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="nextPart1440271.UKBfonIl87"; protocol="application/pgp-signature"; micalg=pgp-sha1 Content-Transfer-Encoding: 7bit Message-Id: <200606302214.59249.mistry.7@osu.edu> X-Spam-Status: No, score=-3.5 required=5.0 tests=ALL_TRUSTED,BAYES_80, MYFREEBSD3 autolearn=no version=3.1.0 X-Spam-Checker-Version: SpamAssassin 3.1.0 (2005-09-13) on mail.united-ware.com X-Virus-Scanned: ClamAV 0.88.2/1578/Fri Jun 30 05:34:32 2006 on mail.united-ware.com X-Virus-Status: Clean Cc: freebsd-current@freebsd.org Subject: Re: After install - Fatal trap 18 ATA problem? 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: Sat, 01 Jul 2006 02:15:07 -0000 --nextPart1440271.UKBfonIl87 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline On Friday 30 June 2006 17:33, you wrote: > Anish Mistry wrote: > > On Friday 30 June 2006 16:54, you wrote: > >> Anish Mistry wrote: > >>>> No, it fell through the cracks somewhere... > >>>> > >>>> Do you still have the HW in question so tests can be done ? > >>> > >>> Yes, in the exact same configuration > >> > >> OK, so lets start over, I've not been following this, could you > >> get me a dmesg from a verbose booted system please ? > >> It fails because the disk geometry is invalid right ? > > > > http://am-productions.biz/docs/boot-panic-script.txt.gz > > > > The email I sent earlier today contains all of the details > > including the above link. Let me know if you need further > > clarification. > > OK, in ata-disk.c::ad_attach the following lines is around line > 100: > > if (atadev->param.atavalid & ATA_FLAG_54_58) { > adp->heads =3D atadev->param.current_heads; > adp->sectors =3D atadev->param.current_sectors; > adp->total_secs =3D (u_int32_t)atadev->param.current_size_1 | > ((u_int32_t)atadev->param.current_size_2 > << 16); } > else { > adp->heads =3D atadev->param.heads; > adp->sectors =3D atadev->param.sectors; > adp->total_secs =3D atadev->param.cylinders * adp->heads * > adp->sectors; > } > > It would seem that the wrong way of getting at the cyl/head/sector > is used for your disk. > My guess is that ->param.current_* isn't set correctly in your disk > (firmware / BIOS mishap), so we need to take the old defaults > instead. That is instead of relying on good values as the > ATA_FLAG_54_58 was supposed to say, we also need to check the > values for sane settings. > > I just love how hard it is to understand the word "shall" in > standards, sigh.... Changing that bit to the following fixed it and allows it to boot. if (atadev->param.atavalid & ATA_FLAG_54_58) { adp->heads =3D atadev->param.current_heads; adp->sectors =3D atadev->param.current_sectors; adp->total_secs =3D (u_int32_t)atadev->param.current_size_1 | ((u_int32_t)atadev->param.current_size_2 << 16); } if (!(atadev->param.atavalid & ATA_FLAG_54_58) || ((atadev->param.atavalid & ATA_FLAG_54_58) && (adp->heads =3D=3D 0 ||=20 adp->sectors =3D=3D 0))) { adp->heads =3D atadev->param.heads; adp->sectors =3D atadev->param.sectors; adp->total_secs =3D atadev->param.cylinders * adp->heads *=20 adp->sectors; =20 } Thanks, =2D-=20 Anish Mistry --nextPart1440271.UKBfonIl87 Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.3 (FreeBSD) iD8DBQBEpdqjxqA5ziudZT0RAqCyAJ9bi750M+Me2IUGKie5Q015pDY60ACdGcZ1 ciJUC9k/xOZAW2D8tisqwQQ= =k3PI -----END PGP SIGNATURE----- --nextPart1440271.UKBfonIl87--