I.MX6 eMMC 中启动U-boot存放的首地址
/************************************************************************************ * I.MX6 eMMC 中启动U-boot存放的首地址 * 声明: * 本文是解读《I.MX6 Manufacturing Tool V2 (MFGTool2) ucl2.xml hacking》之后对 * U-boot存放于eMMC 1K地址有疑惑,希望能找到确切的说法。 * * 2015-10-14 晴 深圳 南山平山村 曾剑锋 ***********************************************************************************/ /** * 参考文档: * 1. i.MX 6Dual/6Quad Multimedia Applications Processor Reference Manual * Chapter 7 --> System Boot * --> 7.6 Program Image * --> 7.6.1 Image Vector Table and Boot Data */ The Image Vector Table (IVT) is the data structure that the ROM reads from the boot device supplying the program image containing the required data components to perform a successful boot. Image向量表是一个存在芯片内部ROM固化的数据结构,用于读取启动设备中的程序,而这些程序包含一些让系统成功运行起来的数据组件(目前个人暂且认为是U-boot) The IVT includes the program image entry point, a pointer to Device Configuration Data (DCD) and other pointers used by the ROM during the boot process.The ROM locates the IVT at a fixed address that is determined by the boot device connected to the Chip. The IVT offset from the base address and initial load region size for each boot device type is defined in the table below. The location of the IVT is the only fixed requirement by the ROM. The remainder or the image memory map is flexible and is determined by the contents of the IVT. IVT向量表包括程序image入口点、设备配置数据指针(DCD)、以及其他一些启动ROM程序运行过程中用到的指针。ROM程序根据不同的启动设备来决定其IVT表的加载地址。IVT偏移地址(相对首地址:0x00000000)和初始化加载程序大小是由启动设备决定,具体情况参照下面表格,IVT表示ROM程序固定的,其他的内存映射并不固定,由IVT表决定(这还不是由IVT表决定?最后一句没理解)。 Table 7-24. Image Vector Table Offset and Initial Load Region Size +----------------------+---------------------------+---------------------------+ | Boot Device Type | Image Vector Table Offset | Initial Load Region Size | +----------------------+---------------------------+---------------------------+ | NOR | 4 Kbyte = 0x1000 bytes | Entire Image Size | +----------------------+---------------------------+---------------------------+ | NAND | 1 Kbyte = 0x400 bytes | 4 Kbyte | +----------------------+---------------------------+---------------------------+ | OneNAND | 256 bytes = 0x100 bytes | 1 Kbyte | +----------------------+---------------------------+---------------------------+ | SD/MMC/eSD/eMMC/SDXC | 1 Kbyte = 0x400 bytes | 4 Kbyte | +----------------------+---------------------------+---------------------------+ | I2C/SPI EEPROM | 1 Kbyte = 0x400 bytes | 4 Kbyte | +----------------------+---------------------------+---------------------------+ | SATA | 1 Kbyte = 0x400 bytes | 4 Kbyte | +----------------------+---------------------------+---------------------------+ 由上表,我们也就是到,当我们选择从eMMC启动的的时候,我们的要将U-boot.bin从1Kbyte的基地址开始读取,这《I.MX6 Manufacturing Tool V2 (MFGTool2) ucl2.xml hacking》中烧入U-boot.bin的位置吻合。