FreeBSD NAND flash driver

Andrew Turner andrew at fubar.geek.nz
Mon Apr 6 04:26:02 PDT 2009


On Mon, 6 Apr 2009 12:24:10 +0400
Stanislav Sedov <stas at FreeBSD.org> 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


More information about the freebsd-geom mailing list