为了移植最新u-boot.2014.07到s5pv210芯片上,阅读了一下芯片内部irom手册,把主要功能记录一下方便以后使用
1 总体描述
上电后,irom bootloader会复位所有IO引脚,并根据OM pin识别boot device.
64KB Internal ROM (iROM)
96KB Internal SRAM
功能上支持从MoviNAND/iNand, MMC/SD Card ,pure Nand, eMMC, eSSD, UART and USB boot等 方式启动。
从NAND启动需要8bit HW ecc
2 操作流程
分为三个过程:
BL0:内部irom的启动代码
BL1:uboot第一阶段,即所谓的spl
BL2:uboot第二阶段,真正的uboot
2.1 irom(BL0) 启动流程
1. Disable the Watch-Dog Timer
2. Initialize the instruction cache
3. Initialize the stack region (see “memory map” on chap 2.5)
4. Initialize the heap region. (see “memory map” on chap 2.5)
5. Initialize the Block Device Copy Function. (see “Device Copy Function” on chap 2.7)
6. Initialize the PLL and Set system clock. (see “clock configuration” on chap 2.11)
7. Copy the BL1 to the internal SRAM region (see “Device Copy Function” on chap 2.7)
8. Verify the checksum of BL1.
If checksum fails, iROM will try the second boot up. (SD/MMC channel 2)
9. Check if it is secure-boot mode or not.
If the security key value is written in S5PV210, It’s secure-boot mode.
If it is secure-boot mode, verify the integrity of BL1.
10. Jump to the start address of BL1
2.2 内存影射
3.从NAND启动存储布局
4. tiny210硬件配置从NAND启动方式为: nand 4k page, 16 bit ECC