作者:苗老师,华清远见嵌入式学院讲师。
手册上关于iROM/iRAM及Bootloader描述如下:
·The iROM code is placed in internal 64KB ROM. It initializes basic system functions such as clock, stack, and heap.
·The iROM loads the first boot loader image from a specific booting device to internal 96KB SRAM. The booting device is selected by Operating Mode (OM) pins. According to the secure boot key values, the iROM code may do an integrity check on the first boot loader image.
·The first boot loader loads the second boot loader then may check the integrity of the second boot loader according the secure boot key values.
·The second boot loader initializes system clock, UART, and DRAM controller. After initializing DRAM controller, it loads OS image from the booting device to DRAM. According to the secure boot key values, the second boot loader can do an integrity check on the OS image.
·After the booting completes, the second boot loader jumps to the operating system.
按照芯片手册上的启动分析图及上面的描述,总结启动流程为:
S5PV210上电将iROM(interal ROM)处执行固化的启动代码,它对系统时钟进行初始化,对启动设备进行判断,并从启动设备中复制BL1(最大16KB)到iRAM(0xd002_0000处,其中0xd002_0010之前的16个字节存储的的有BL1的校验信息和BL1尺寸)中,并对BL1进行校验,检验OK转入BL1进行执行;BL1执行完成后,开始执行BL2,BL2加载内核,把OS在SDRAM中运行起来。
BL0,BL1,BL2:
(1)BL0:是指S5PV210的iROM中固化的启动代码
作用:初始化系统时钟,设置看门狗,初始化堆和栈,加载BL1
(2)BL1:是批在iRAM自动从外扩存储器(nand/sd/usb)中拷贝的uboot.bin二进制文件的头最大16K代码
作用:初始化RAM,关闭Cache,设置栈,加载BL2
(3)BL2:是指在代码重定向后在内存中执行的uboot的完整代码
作用:初始化其它外设,加载OS内核
(4)三者之间的关系:(Interal ROM固化代码)BL0将BL1(bootloader的前16KB--BL1)加载到iRAM;BL1然后在iRAM中运行将BL2(剩下的bootloader)加载到SDRAM;BL2加载内核,把OS在SDRAM中运行起来,最终OS是运行在SDRAM(内存)中的。
手册上关于iROM/iRAM及Bootloader描述如下:
·The iROM code is placed in internal 64KB ROM. It initializes basic system functions such as clock, stack, and heap.
·The iROM loads the first boot loader image from a specific booting device to internal 96KB SRAM. The booting device is selected by Operating Mode (OM) pins. According to the secure boot key values, the iROM code may do an integrity check on the first boot loader image.
·The first boot loader loads the second boot loader then may check the integrity of the second boot loader according the secure boot key values.
·The second boot loader initializes system clock, UART, and DRAM controller. After initializing DRAM controller, it loads OS image from the booting device to DRAM. According to the secure boot key values, the second boot loader can do an integrity check on the OS image.
·After the booting completes, the second boot loader jumps to the operating system.
按照芯片手册上的启动分析图及上面的描述,总结启动流程为:
S5PV210上电将iROM(interal ROM)处执行固化的启动代码,它对系统时钟进行初始化,对启动设备进行判断,并从启动设备中复制BL1(最大16KB)到iRAM(0xd002_0000处,其中0xd002_0010之前的16个字节存储的的有BL1的校验信息和BL1尺寸)中,并对BL1进行校验,检验OK转入BL1进行执行;BL1执行完成后,开始执行BL2,BL2加载内核,把OS在SDRAM中运行起来。
BL0,BL1,BL2:
(1)BL0:是指S5PV210的iROM中固化的启动代码
作用:初始化系统时钟,设置看门狗,初始化堆和栈,加载BL1
(2)BL1:是批在iRAM自动从外扩存储器(nand/sd/usb)中拷贝的uboot.bin二进制文件的头最大16K代码
作用:初始化RAM,关闭Cache,设置栈,加载BL2
(3)BL2:是指在代码重定向后在内存中执行的uboot的完整代码
作用:初始化其它外设,加载OS内核
(4)三者之间的关系:(Interal ROM固化代码)BL0将BL1(bootloader的前16KB--BL1)加载到iRAM;BL1然后在iRAM中运行将BL2(剩下的bootloader)加载到SDRAM;BL2加载内核,把OS在SDRAM中运行起来,最终OS是运行在SDRAM(内存)中的。