⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 onbl_map01_rev01.s

📁 S3C6410 Startup Code,包括nand和onenand2种启动代码
💻 S
字号:
;/**************************************************************************************
;* 
;*	Project Name : S3C6410 Validation
;*
;*	Copyright 2008 by Samsung Electronics, Inc.
;*	All rights reserved.
;*
;*	Project Description :
;*		This software is only for validating functions of the S3C6410.
;*		Anybody can use this software without our permission.
;*  
;*--------------------------------------------------------------------------------------
;* 
;*	File Name : onbl_map01_rev01.s
;*  
;*	File Description : 	BootLoader1 for OneNAND boot buffer.
;*						It should be smaller than 1KB.
;*						And move it into DownloadAddress and then jump.
;*
;*	Author : Heemyung.noh
;*	Dept. : AP Development Team
;*	Created Date : 2008/02/20
;*	Version : 0.1 
;* 
;*	History
;*	- Created(Heemyung.noh 2008/02/20)
;*  
;**************************************************************************************/


				GET		option.inc
				GET		sfr6410.inc

			
				AREA    ONBL1,CODE,READONLY
				
				EXPORT	__main
				
__main	
				;OneNand Setting
				ldr		r0,=0x70100000
				ldr		r1,=0x40e0
				str		r1,[r0]
								
				mov	r0,	#0x00000000
				mov	r1, #0x0C000000
boot_to_step
				ldmia	r0!,{r4-r7,r9-r12}
				stmia	r1!,{r4-r7,r9-r12}		; Copy the image from DataBuffer0 into Stepping Stone.
			 
				cmp		r0,#0x400
				bne		boot_to_step

				add		pc,pc,#0x0c000000

stepping_stone
				nop
				;;Expand Memory 1 Port to X32
				ldr		r0,=rMEM_SYS_CFG		; MEM_SYS_CFG register setting
				ldr		r1,[r0]
				bic		r1,r1,#0x80
				str		r1,[r0]
			
							
				IMPORT	InitDmc					
				bl		InitDmc					; DRAM initialize
				
				ldr		r7,=DownloadAddress		; Address to download
				mov		r4,#0					; Block Number
				mov		r3,#0					; Page Number

page_increment	
				;nop		
				;b 		page_increment

				ldr		r2,=ONENAND_ReadBase	; Map01 command base address
				add		r2,r2,r4,LSL #12		; Block Address Setting			
				mov		r8,#0x80				; Count to move (0x80*4burst*4byte = 2KB)
				add		r3,r3,#1				; Increment the Page Number
				add		r2,r2,r3,LSL #6			; Address to load data
move_page				
				ldmia	r2,{r9-r12}				; 
				stmia	r7!,{r9-r12}			; 
				subs	r8,r8,#0x1				; Count decrement
				bne		move_page 
	
 
 				ldr		r0,=0x70100000
;int_wait	
;				ldr		r1,[r0,#0x30]
;				tst		r1,#0x400				; check the INT_ACT bit of OneNand INT_ERR_STAT register
;				beq		int_wait
				mov		r1,#0x400
				str		r1,[r0,#0x50]			; clear the INT_ACT bit
				
				cmp		r3,#63					; Repeat movement to page number 63 (126KB)
				blt		page_increment

				add		r4,r4,#1				; Block Number Increment
				mov		r3,#0xFFFFFFFF			; Page Number : -1 setting
				cmp		r4,#1					; Block Size Number
				blt		page_increment			; 

				ldr		r0,=DownloadAddress
				mov		pc,r0					; Jump to download address

				LTORG

		        END

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -