|
Since I have re-written a version of SAM-Ba to program my serial flash and nand flash via my re-written bootstrap, I need to support NAND EEC and Bad Block Tables. The EEC code (software version) was provided my Atmel in its Sample Code (hamming.c). However, the Bad Block Table Support was not. I want my Bootstrap Bad Block Table to be understood by U-Boot and Linux so I need to get the format correctly. However, there looks to be a few different formats used by u-boot and linux.
I think I should use the following: 1) Last 4 Blocks can hold primary and mirror BBT (bad blcok tables) 2) OOB section of page 1 should hold the signatures static unsigned char bbt_pattern[] = {'B', 'b', 't', '0' }; static unsigned char mirror_pattern[] = {'1', 't', 'b', 'B' }; 3) Signature Offset is 8 Bytes into OOB (?????????) 4) Version is 1 byte after the signature in OOB (???????????) 5) 2 bits per block bit mask in data area of page 11 - good block 10 - reserved - most software should interpret as "don't use this block" 01 - block went bad during use 00 - block was marked bad by the factory
Does anyone Agree? Also, How can I test a block that I write in my Bootstrap with a block read from U-Boot to check EEC and BBT?
Thanks, Gary
|