Chinaunix首页 | 论坛 | 博客
  • 博客访问: 134324
  • 博文数量: 33
  • 博客积分: 287
  • 博客等级: 二等列兵
  • 技术积分: 380
  • 用 户 组: 普通用户
  • 注册时间: 2012-05-13 23:06
文章分类
文章存档

2015年(3)

2014年(13)

2013年(8)

2012年(9)

我的朋友

分类: 其他平台

2013-12-26 17:39:58

使用的开发板为 atmel的开发板


上面是出厂时候的 nandflash的分配,

at91bootstap 为二级的启动程序,官方介绍:

AT91Bootstrap is the 2nd level bootloader for Atmel AT91 SoC providing a set of algorithms to manage the hardware initialization such as clock speed configuration, PIO settings, DRAM initialization, to download your main application from specified boot media (NAND FLASH, serial FLASH (both AT25-compatible of DataFlash), serial EEPROM, SD Card, etc.) to main memory and to start it.

芯片的内存布局




6.2.1 Internal SRAM
The SAM9G15 embeds a total of 32 Kbytes of high-speed SRAM.
After reset and until the Remap Command is performed, the SRAM is only accessible at address
0x0030 0000.
After Remap, the SRAM also becomes available at address 0x0.
6.2.2 Internal ROM
The SAM9G15 embeds an Internal ROM, which contains the SAM-BA? program.
At any time, the ROM is mapped at address 0x0010 0000. It is also accessible at address 0x0
(BMS = 1) after the reset and before the Remap Command.

samba 就是用来配置各个存储器,下载程序使用的。


在分析启动代码之前先看一下S3C2440的NAND启动:

    在配置NAND启动模式之后,S3C2440上电会先将NAND中的0x0 - 0x1000共4096字节的数据拷贝到位于Bank0中的Boot Internal SRAM上

    Bank0如下图:

    

    可以看出Boot Internal SRAM为4KB大小,也正是因为Boot Internal SRAM只有4KB大小,所以只能从NAND中拷贝4K的内容 = 3= 这个Boot Internal SRAM是配置为NAND FLASH启动模式才有的

S3C2440A boot code can be executed on an external NAND flash memory. In order to support NAND flash boot
loader, the S3C2440A is equipped with an internal SRAM buffer called ‘Steppingstone’. When booting, the first 4
KBytes of the NAND flash memory will be loaded into Steppingstone and the boot code loaded into Steppingstone
will be executed.
Generally, the boot code will copy NAND flash content to SDRAM. Using hardware ECC, the NAND flash data
validity will be checked. Upon the completion of the copy, the main program will be executed on the SDRAM.

阅读(1551) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~