TOC(Table of Content)数据结构
来源:互联网 发布:保险从业人员数据 编辑:程序博客网 时间:2024/06/07 01:10
TOC(Table Of Content)是整个Nand Flash中存储内容的一个列表,这里面储存了有关启动和系统内核的一些相关存储信息,需要写在Nand Flash的block1中由Nboot里的函数读取。之后Nboot会按照读取的内容进行配置和跳转到不同的地址。
TOC是一个只有512字节的结构,具体定义如下:
typedef struct _TOC { DWORD dwSignature; // How to boot the images in this TOC. // This could be moved into the image descriptor if desired, // but I prefer to conserve space. BOOT_CFG BootCfg; // Array of Image Descriptors. IMAGE_DESCRIPTOR id[MAX_TOC_DESCRIPTORS]; CHAININFO chainInfo; //注意,网上很多人给的程序,udid都在dwSignature的下面,这是错误的! BYTE udid[8]; } TOC, *PTOC; // 512 bytes
其中还包含了三个结构体:BOOT_CFG、IMAGE_DESCRIPTOR和CHAINFO。
BOOT_CFG包含了用以太网下载内核镜像所需的网络配置信息,具体定义如下:
typedef struct _BOOTCFG { ULONG ImageIndex; //镜像索引号 ULONG ConfigFlags; //配置标号 ULONG BootDelay; //进入启动模式的等待时间 EDBG_ADDR EdbgAddr; //目标机的IP地址 ULONG SubnetMask; //所在局域网的子网掩码 } BOOT_CFG, *PBOOT_CFG; typedef struct _EDBG_ADDR { DWORD dwIP; // @field IP address (net byte order) USHORT wMAC[3]; // @field Ethernet address (net byte order) USHORT wPort; // @field UDP port # (net byte order) - only used if appropriate } EDBG_ADDR;
IMAGE_DESCRIPTOR包含了镜像的描述信息,这里所讲的镜像,不只是内核镜像,还包括Eboot等。具体定义如下:
typedef struct _IMAGE_DESCRIPTOR { // File version info DWORD dwVersion; // e.g: build number DWORD dwSignature; // e.g: "EBOT", "CFSH", etc UCHAR ucString[IMAGE_STRING_LEN]; // e.g: "PocketPC_2002" DWORD dwImageType; // IMAGE_TYPE_ flags(镜像类型) DWORD dwTtlSectors; // TTL image size in sectors.(存储镜像所需的sector总数) // We store size in sectors instead of bytes // to simplify sector reads in Nboot. DWORD dwLoadAddress; // Virtual address to load image (ImageStart)(把镜像载入内存RAM的虚拟地址) DWORD dwJumpAddress; // Virtual address to jump (StartAddress/LaunchAddr)(执行镜像或调用系统内核的虚拟起始地址) // This array equates to a sector-based MXIP MultiBINInfo in blcommon. // Unused entries are zeroed. // You could chain image descriptors if needed. SG_SECTOR sgList[MAX_SG_SECTORS]; } IMAGE_DESCRIPTOR, *PIMAGE_DESCRIPTOR; typedef struct _SG_SECTOR { DWORD dwSector; // Starting sector of the image segment DWORD dwLength; // Image length of this segment, in contigious sectors. } SG_SECTOR, *PSG_SECTOR;
CHAININFO描述了镜像的一些连接信息,当启动系统时需要将这些信息载入内存才可正常启动。具体定义如下:
typedef struct _CHAININFO { DWORD dwLoadAddress; // Load address in SDRAM(载入到内存的起始地址) DWORD dwFlashAddress; // Start location on the NAND(位于Nand Flash的起始地址) DWORD dwLength; // The length of the image(镜像长度) } CHAININFO, *PCHAININFO;
2009-10-19
注:源自原百度博客“至美心"
0 0
- TOC(Table of Content)数据结构
- TOC(Table of Content)数据结构
- 给marked增加TOC(Table of content)
- Table of Content
- !!!Table of Content
- the table of content-type
- "Apress.Pro.BizTalk.2006" Table of Content
- How to use outline levels to create a table of contents (TOC) in Word 2003 and in Word 2002
- Confluence 内容列表区域(Table of Content Zone)宏
- TOC
- A draft TOC of 嵌入式电信软件敏捷开发实践
- A draft TOC of 嵌入式电信软件敏捷开发实践
- A draft TOC of 嵌入式电信软件敏捷开发实践
- Manual Transport SAP Table Content
- Content of C++ vtbl
- Structure of Content Provider
- sed invalid content of \{\}
- C++ content of std::string
- Android Retrofit使用记录
- c# 序列化
- VLAN端口属性详解
- Apache配置tomcat集群
- 驱动调试之虚拟机设置
- TOC(Table of Content)数据结构
- 引用JS报错:uncaught syntaxerror: unexpected token <
- iOS APP上架流程详解
- 业务系统上下游数据一致性检测系统(类似对账系统)
- Mongodb数据导出工具mongoexport和导入工具mongoimport介绍
- Spring JdbcTemplate 多参数查询,以及like模糊查询处理方式
- Scrapy - TypeError: Cannot convert unicode body - HtmlResponse has no encoding
- my97时间控件 选择多个日期
- 架构师 成长路----001