Date: Tue, 16 Mar 2010 11:38:18 -0300 From: Luiz Otavio O Souza <loos.br@gmail.com> To: Andrew Turner <andrew@fubar.geek.nz> Cc: embedded@freebsd.org Subject: Re: NAND Flash Framework for review Message-ID: <0410ED4A-2086-470D-A184-2CD95644700E@gmail.com> In-Reply-To: <20100316101044.0401295e@fubar.geek.nz> References: <0AE04EFA-A3EB-4939-BD81-607C00355B67@semihalf.com> <20100314165825.121d346b@fubar.geek.nz> <CC419602-A9E8-4FE2-A5A5-0BFBD8240EDD@gmail.com> <4B9E1697.9090602@semihalf.com> <20100316101044.0401295e@fubar.geek.nz>
next in thread | previous in thread | raw e-mail | index | archive | help
On Mar 15, 2010, at 10:10 PM, Andrew Turner wrote: >>>>=20 >>>> Ideas: >>>> - Can we move ecc and bbt handling into GEOM? This will allow us to >>>> bypass them when required. >>>=20 >>> This is a mandatory feature (disable ecc and may be the bbt checks) >>> if you need to deal with some kind of unknown nand FS or unknown >>> nand oob layout (like make a backup of your unknown nand data >>> before erase it). >>=20 >> Ok, I didn't know that disabling ECC and BBT is so important. Let me >> think about moving it to geom layer. >=20 > It is also important for filesystems that have their own ECC handling > code, e.g. YAFFS expects to manage the OOB it's self including the = ECC. > I'm not sure how it expects to handle the BBT. >=20 Another detail on ECC check... you don't need to save or check the ecc = for the first block, it must never fail. If your first block is bad, you = can't boot from NAND (the bootloader will be probably unreadable). YAFFS1 only support devices with 512/16 bytes layout and it do all the = ecc and bad block management (using the default layout for this kind of = chip). YAFFS2 works with all types of chips (different layouts) and, basically, = it relies on the driver ecc and bad block management. But it is not as simple as that, as you can select the use of inband = tags (the yaffs metadata which should be on free bytes of oob can be = saved 'inband') and a few other tricks (like mkyaffsimg which generate = the oob data and looks like ignore the bad block management). Luiz=
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?0410ED4A-2086-470D-A184-2CD95644700E>