S3C6410X supports 32-bit physical address field and that address field can be seperated into two parts, one part
is for memory, the other part is for pheriperal.
Main memory is accessed via SPINE bus, and its address range is from 0x0000_0000 to 0x6FFF_FFFF. This
main memory part is seperated into four areas, boot image area, internal memory area, static memory area, and
dynamic memory area.
Address range of boot image area is from 0x0000_0000 to 0x07FF_FFFF, but there is no real mapped-memory.
Boot image area has mirrored(映射) image which points a partial(局部) region of
internal memory area or static memory area.
Start address of boot image is fixed to 0x0000_0000.
Internal memory area is used to access internal ROM and internal SRAM for boot loader, which is also called
Steppingstone. Start address for each internal memory is fixed. Address range of internal ROM is from
0x0800_0000 to 0x0BFF_FFFF, but real storage is only 32KB.This region is read-only, and can be mapped to
boot image area when internal ROM booting is selected. Address range of internal SRAM is from 0x0C00_0000 to
0x0FFF_FFFF, but real storage is only 4KB.
Address range of static memory area is from 0x1000_0000 to 0x3FFF_FFFF.
SROM, SRAM, NOR Flash,
asyncronous NOR interface device, OneNAND Flash, and Steppingstone can be accessed by this address area.
Each area stands for a chip select, for example, address range from 0x1000_0000 to 0x17FF_FFFF(128M) stands for Xm0CSn[0]. Start address for each chip select is fixed.NAND Flash and CF/ATA cannot be accessed via static memory area,so
if any of Xm0CSn[5:2] is mapped to NFCON or CFCON, related address region should not be accessed.One exception is that if Xm0CSn[2] is used for NAND Flash, Steppingstone is mirrored to address
region from 0x2000_0000 to 27FF_FFFF.
Address range of dynamic memory area is from 0x4000_0000 to 0x6FFF_FFFF. DMC1 has right to use address
range from 0x5000_0000 to 0x6FFF_FFFF. Start address for each chip select is configurable.
S3C6410跟S3C2440不 同,S3C6410支援32位物理地址空間並將該地址空間分為2個部分,一部分是“儲存空間”,另一部分是“外設空間”。其中主儲存空間通過SPINE總 線訪問,其地址空間為0×0000,0000~0x6FFF,FFFF,主儲存空間又分為4個地區——引導鏡像區(boot image area),內部儲存區(internal memory area),靜態儲存區(static memory area)和動態儲存裝置區(dynamic
memory area)。
引導鏡像區(boot image area)的地址空間為0×0000,0000~0x07FF,FFFF,但是沒有實際的記憶體映射,引導鏡像區映射到內部儲存區或者靜態儲存區的部分地區,並且起始地址固定為0×0000,0000。
內部儲存區供boot loader訪問內部ROM(internal ROM)和內部SRAM(internal SRAM),也稱為Steppingstone。每個內部儲存空間的起始地址都是固定的。內部ROM的地址空間為 0×0800,0000~0x0BFF,FFFF,但是實際的儲存空間只有32KB,這一地區是唯讀,且當啟動方式選擇為內部ROM啟動時,該地區應該
映射到引導鏡像區(boot image area)。 SRAM的地址空間為0x0C00,0000~0x0FFF,FFFF,但是實際的儲存空間只有4KB。
靜態儲存區的地址空間為0×1000,0000~0x3FFF,FFFF,通過這個區 域可以訪問SROM,SRAM,NOR Flash,非同步NOR介面裝置,OneNand Flash和Steppingstone。每個地區對應一個片選,例如,地址空間0×1000,0000~0x17FF,FFFF對應 Xm0CSn[0]。每個片選的起始地址是確定的。Nand flash和CF/ATA不能通過靜態儲存區訪問,所以如果Xm0CSn[5:2]對應的任意區域對應到NFCON或CFCON都導致其對應地區的地址空
間無法訪問。一個特例是當Xm0CSn[2]對應的地區用於NAND Flash時Steppingstone映射到地址空間0×2000,0000~0x27FF,FFFF。
動態儲存裝置區的地址空間為0×4000,0000~0x6FFF,FFFF,DMC1有權使用0×5000,0000~0x6FFF,FFFF的地址空間。每個片選的起始地址是可以配置的。
外設空間通過PERI匯流排訪問,並其地址空間為0×7000,0000~0x7FFF,FFFF。所有的特殊功能寄存器都可以通過這個地區訪問。如果資料來自NFCON或CFCON,這些資料也通過PERI匯流排訪問。
二 百度文庫裡一篇分析2440儲存的Nor flash的有自己的地址線和資料線,可以採用類似於memory的隨機訪問方式,在nor flash上可以直接運行程式,所以nor flash可以直接用來做boot,採用nor flash啟動的時候會把地址映射到0x00上。mini2440就是直接把vivi直接燒錄在nor flash上。
Nand flash是IO裝置,資料、地址、控制線都是共用的,需要軟體區控制讀取時序,所以不能像nor flash、記憶體一樣隨機訪問,不能EIP(片上運行),因此不能直接作為boot。 S3C2440把Bootloader燒到nand flash上啟動,因為在S3C2440裡有一個內建的SRAM,叫做stepping stone(墊腳石,很形象…),系統啟動加電後,會把nand flash上的起始4KB的內容拷貝到SRAM裡執行,這樣就實現了從nand flash啟動。如果bootloader小於4KB的話(像vboot),在SRAM裡就能boot,大於4KB的話(u-boot,vivi),在SRAM裡做一些基本初始化後,再把bootloader的剩餘部分拷貝到SDRAM裡(>0x30000000)。
我們使用S3C2440的時候,經常通過nor flash啟動,進入vivi的菜單(S3C2440的Nor flash已經燒錄好了vivi),之後通過vivi的usb下載功能,把其他的bootloader下在到nand flash裡,下載完成後,再通過nand flash啟動,測試我們的bootloader。
NOR flash適合做代碼儲存並EIP的,NAND適合用來作大量資料存放區的。
NANDFlash啟動: NANDFlash儲存空間的前4K將被自動載入到Steppingstone(內部SRAM緩衝器),然後系統自動執行這些載入的啟動代碼,這4K的啟動代碼需要將NANDFlash中的內容複寫到SDRAM中執行。NANDFlash的前4K空間放啟動代碼,SDRAM速度較快,用來執行主程式的代碼。
從寄存器分析的一篇文章:http://www.cnblogs.com/mr-raptor/archive/2011/07/21/2347664.html