s3c2440啟動時的內(nèi)存拷貝過程分析
昨天做了nand-flash到sdram的4k數(shù)據(jù)的拷貝,數(shù)據(jù)從steppingstone拷貝到sdram上面執(zhí)行;今天接著,將對nand-flash上4k以后的數(shù)據(jù)進(jìn)行拷貝,所以重點(diǎn)是nand-flash和sdram的控制。
先說說tq2440開發(fā)板。
當(dāng)開發(fā)板boot跳線接上時,處理器上電后從nand-flash啟動從0x0開始執(zhí)行,nand-flash開始的4k數(shù)據(jù)會自動的復(fù)制到內(nèi)部sram執(zhí)行
下面是s3c2440關(guān)于memory啟動時的特性說明:
In recent times, NOR flash memory gets high in price while an SDRAMand a NAND flash memory is comparativelyeconomical ,motivating some users to execute theboot codeon a NAND flash and execute the main code on an SDRAM.
S3C2440A boot code canbe executed on an external NAND flash memory. In order to supportNAND flash boot loader, the S3C2440A is equipped with aninternal SRAM buffer called ‘Steppingstone’. When booting, thefirst 4 KBytes of the NAND flash memory will be loaded intoSteppingstone and the boot code loaded into Steppingstone will beexecuted.
Generally,the boot code will copy NAND flash content to SDRAM.Usinghardware ECC, the NAND flash data validity will be checked.Uponthe completion of the copy, the main program will be executed on theSDRAM.
認(rèn)真讀完這幾段,啟動時存儲器的使用過程將有個大概的認(rèn)識。
在上次的實(shí)驗(yàn)中,我們就是控制SDRAM將數(shù)據(jù)從SRAM(steppingstone)拷貝到天嵌開發(fā)板上的sdram(使用bank6,地址0x3000000)上。
上圖是我依照自己的理解繪出的啟動時拷貝過程,敬請指正。