From owner-freebsd-arm@FreeBSD.ORG Wed Jan 21 15:42:59 2009 Return-Path: Delivered-To: freebsd-arm@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 60E26106567E; Wed, 21 Jan 2009 15:42:59 +0000 (UTC) (envelope-from imp@bsdimp.com) Received: from harmony.bsdimp.com (bsdimp.com [199.45.160.85]) by mx1.freebsd.org (Postfix) with ESMTP id 0DE598FC12; Wed, 21 Jan 2009 15:42:58 +0000 (UTC) (envelope-from imp@bsdimp.com) Received: from localhost (localhost [127.0.0.1]) by harmony.bsdimp.com (8.14.2/8.14.1) with ESMTP id n0LFdkTD024838; Wed, 21 Jan 2009 08:39:46 -0700 (MST) (envelope-from imp@bsdimp.com) Date: Wed, 21 Jan 2009 08:40:23 -0700 (MST) Message-Id: <20090121.084023.188100520.imp@bsdimp.com> To: krassi@bulinfo.net From: "M. Warner Losh" In-Reply-To: <4977236E.2020409@bulinfo.net> References: <4976FB8C.5050209@bulinfo.net> <49771CA6.7080106@FreeBSD.org> <4977236E.2020409@bulinfo.net> X-Mailer: Mew version 5.2 on Emacs 21.3 / Mule 5.0 (SAKAKI) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit Cc: mav@freebsd.org, freebsd-arm@freebsd.org Subject: Re: Mount root from SD card? X-BeenThere: freebsd-arm@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Porting FreeBSD to the StrongARM Processor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 21 Jan 2009 15:43:00 -0000 In message: <4977236E.2020409@bulinfo.net> Krassimir Slavchev writes: : -----BEGIN PGP SIGNED MESSAGE----- : Hash: SHA1 : : Boot with verbose messages is here: : : http://mnemonic.bulinfo.net/~krassi/ARM/arm.verbose This looks very similar to the data corruption I saw when I had enabled multiblock read. To track this down, we're going to have to print the actual data returned for each sector... Warner : Alexander Motin wrote: : > Krassimir Slavchev wrote: : >> This is the output: : >> : >> CMD: 0 ARG 0 len 0 : >> RES: 0 : >> CMD: 8 ARG 1aa len 0 : >> RES: 1 : >> CMD: 37 ARG 0 len 0 : >> RES: 0 : >> CMD: 29 ARG 0 len 0 : >> RES: 0 : >> CMD: 0 ARG 0 len 0 : >> RES: 0 : >> CMD: 8 ARG 1aa len 0 : >> RES: 1 : >> CMD: 37 ARG 0 len 0 : >> RES: 0 : >> CMD: 29 ARG ff8000 len 0 : >> RES: 0 : >> CMD: 37 ARG 0 len 0 : >> RES: 0 : >> CMD: 29 ARG ff8000 len 0 : >> RES: 0 : >> CMD: 2 ARG 0 len 0 : >> RES: 0 : >> CMD: 3 ARG 0 len 0 : >> RES: 0 : >> CMD: 9 ARG 10000 len 0 : >> RES: 0 : >> CMD: 7 ARG 10000 len 0 : >> RES: 0 : >> CMD: 37 ARG 10000 len 0 : >> RES: 0 : >> CMD: 33 ARG 0 len 8 : >> RES: 0 : >> CMD: 6 ARG ffffff len 64 : >> RES: 0 : >> CMD: 37 ARG 10000 len 0 : >> RES: 0 : >> CMD: d ARG 0 len 64 : >> RES: 2 : >> CMD: 37 ARG 10000 len 0 : >> RES: 0 : >> CMD: d ARG 0 len 64 : >> RES: 0 : > : > This part looks fine. Just normal SD detection and initialization. : > : > Somewhere here bus frequency and high-speed timings negotiated: : > : >> CMD: 7 ARG 0 len 0 : >> RES: 0 : >> CMD: 7 ARG 10000 len 0 : >> RES: 0 : >> CMD: 7 ARG 0 len 0 : >> RES: 0 : >> CMD: 7 ARG 10000 len 0 : >> RES: 2 : >> CMD: 6 ARG 80fffff0 len 64 : >> RES: 0 : >> CMD: 7 ARG 0 len 0 : >> RES: 0 : >> mmcsd0: 1983MB at mmc0 30MHz/1bit : > : > Then regular card activity beging: : > : > - select the card - error : >> CMD: 7 ARG 10000 len 0 : >> RES: 2 : > : > - select bus width - normal ?? : >> CMD: 37 ARG 10000 len 0 : >> RES: 0 : >> CMD: 6 ARG 0 len 0 : >> RES: 0 : > : > - read some sectors - normal ?? : >> CMD: 11 ARG 0 len 512 : >> RES: 0 : >> CMD: 11 ARG 0 len 512 : >> RES: 0 : >> CMD: 11 ARG 200 len 512 : >> RES: 0 : >> Trying to mount root from ufs:/dev/mmcsd0s1 : > : > It's a bis strange to me that this card selection request failed, while : > previous ones during initialization managed fine. May be card or : > controller unable to handle such speed, or may be bus just hasn't : > managed to settle new parameters until that command. : > Also interesting what are the reading command returned after card select : > command failed. : > : > Boot with verbose messages enabled should show when exactly frequency : > has changed. Do it please. : > : >>>> Also sysinstall crashes when trying to create a new slice. : >>>> May be because: : >>>> Disk name: mmcsd0 FDISK : >>>> Partition Editor : >>>> DISK Geometry: 0 cyls/0 heads/0 sectors = 0 sectors (0MB) : >>> I don't think it is related. There is no such thing as disk geometry on : >>> flash card, that's why driver does not announce it. The only places : >>> where it may be important is when fdisk is trying to align partitions : >>> with track boundaries for compatibility with legacy BIOS'es. : >>> There is no problem to report some fake values, but from one side they : >>> should better match BIOS assumptions on geometry and from other, they : >>> should as much as possible to match flash erase sector size. I just have : >>> no any system which supports SD booting to report something reasonable : >>> there. Reporting maximal 63 sectors per track as for HDD may result in : >>> ineffective filesystem alignment and reduced performance. : >> At least sysinstall should be fixed. Should I fill a PR for this? : > : > Probably yes. I haven't looked into sysinstall. : > : : -----BEGIN PGP SIGNATURE----- : Version: GnuPG v1.4.7 (FreeBSD) : : iD8DBQFJdyNuxJBWvpalMpkRAljVAJ976HFJu0zPWWmgqSGM9NUkBFXltQCeO5am : UNVeNhRajDLjuwMgqstKL1I= : =V/UU : -----END PGP SIGNATURE----- : :