NAND Flash Framework for review
Luiz Otavio O Souza
loos.br at gmail.com
Tue Mar 16 14:38:25 UTC 2010
On Mar 15, 2010, at 10:10 PM, Andrew Turner wrote:
>>>>
>>>> Ideas:
>>>> - Can we move ecc and bbt handling into GEOM? This will allow us to
>>>> bypass them when required.
>>>
>>> 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).
>>
>> Ok, I didn't know that disabling ECC and BBT is so important. Let me
>> think about moving it to geom layer.
>
> 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.
>
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
More information about the freebsd-embedded
mailing list