From owner-freebsd-embedded@FreeBSD.ORG Mon Apr 6 11:25:23 2009 Return-Path: Delivered-To: freebsd-embedded@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 4037910658AA; Mon, 6 Apr 2009 11:25:22 +0000 (UTC) (envelope-from andrew@fubar.geek.nz) Received: from farnsworth.fubar.geek.nz (farnsworth.fubar.geek.nz [69.55.236.47]) by mx1.freebsd.org (Postfix) with ESMTP id 1D4348FC13; Mon, 6 Apr 2009 11:25:17 +0000 (UTC) (envelope-from andrew@fubar.geek.nz) Received: by farnsworth.fubar.geek.nz (Postfix, from userid 65534) id D862533C1C; Mon, 6 Apr 2009 04:25:16 -0700 (PDT) Received: from localhost (125-238-45-80.broadband-telecom.global-gateway.net.nz [125.238.45.80]) by farnsworth.fubar.geek.nz (Postfix) with ESMTP id 7E5F933C1B; Mon, 6 Apr 2009 04:25:12 -0700 (PDT) Date: Mon, 6 Apr 2009 23:25:08 +1200 From: Andrew Turner To: Stanislav Sedov Message-ID: <20090406232508.776d57e6@fubar.geek.nz> In-Reply-To: <20090406122410.daab24b3.stas@FreeBSD.org> References: <20090405175014.6aef7016@fubar.geek.nz> <20090406122410.daab24b3.stas@FreeBSD.org> X-Mailer: Claws Mail 3.7.1 (GTK+ 2.14.7; amd64-portbld-freebsd7.1) X-Pirate: Arrrr Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Cc: freebsd-embedded@freebsd.org, freebsd-geom@freebsd.org Subject: Re: FreeBSD NAND flash driver X-BeenThere: freebsd-embedded@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Dedicated and Embedded Systems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 06 Apr 2009 11:26:03 -0000 On Mon, 6 Apr 2009 12:24:10 +0400 Stanislav Sedov wrote: > > It is not usable yet as the write will not perform any deletes from > > the device, either the file system or another geom will have to > > issue a BIO_DELETE followed by BIO_WRITE's to write to the disk. > > This is done to support NAND flash aware file systems. > > > > So, for ordinary file systems we're going to use the special geom > layer that will sit above the nand(8) device and perform BIO_DELETE > operations when required? Yes, this is intentional as NAND flash is split up to blocks. The blocks are then split into pages. You have to erase the entire block at a time but can write pages as required. A file system that knows about this difference will be able to talk to nand(8) directly. > > > TODO: > > * ECC support. > > * Add GEOM attributes to get information about the NAND device out, > > eg. Block size, OOB data, etc. > > * Test the erase code. > > * Add support for real hardware. > > * Read the parameter page on parts that support it to get the > > required information. > > > > Andrew > > > > [1] > > http://fubar.geek.nz/files/freebsd/nand/freebsd-nand-20090405.tar.gz > > What about putting this information to the wiki? Seems like a good > start for anyone who'll be working on the real hardware. > And thanks again for the great work! I'm planning on doing this. I'm currently cleaning up the code before getting the first hardware driver written. Andrew