Reputation: 396
I was going through the Kernel & U-boot codes, and I've found out that U-Boot only checks for bad block markers in the first two pages of an eraseblock. There is even a flag NAND_BBT_SCANALLPAGES, but it is not the default option (at least on the version I am working with).
Why is there such an option? Isn't it better (and safer) to search every page in a block?
Regards, Guilherme
Upvotes: 1
Views: 648
Reputation: 22477
Most NAND chips mark the bad blocks at a defined position in the spare area.
As an entire block is marked bad and not specific pages, scanning for bad-block markers in the first or first 2pages should suffice as long as the bad-block markers are properly maintained in the first 2 pages of a block by convention. (instead of the page on which the I/O fails.)
Thus it is possible to determine the bad block mark each time a block is accessed by storing the bad block markers and scanning for them in the spare area of the 1st or 2nd page of a block.
This is a design convention to speed-up the activity of determining whether a block is bad.
Upvotes: 1