The BootROM manages bad blocks in the following ways:
- It looks for a bad block table (BBT) in the last four blocks of the NAND flash device.
- It supports a primary and secondary BBT with versioning allowing safe software updates.
- If a BBT is not present, the BootROM scans the flash reading the out-of-band (OOB) information to determine the locations of bad blocks.
- The BootROM only performs read operations – it does not write to the flash.
While reading from NAND, the BootROM skips blocks that are marked as bad in the BBT, or in the OOB information if a BBT does not exist.
For example: consider a flash device that has bad blocks located at blocks 1 and 3 (see the following figure):
Figure 1. NAND Flash Device with Bad Blocks Example