亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關(guān)于我們
? 蟲蟲下載站

?? oalstartup.s

?? 老外的一個開源項(xiàng)目
?? S
字號:
;++
; Copyright (c) David Vescovi.  All rights reserved.
; Part of Project DrumStix
; Windows Embedded Developers Interest Group (WE-DIG) community project.
; http://www.we-dig.org
; Copyright (c) Microsoft Corporation.  All rights reserved.
;
;
; Abstract:
;
;	Board-level initialization for OEM-specific code.
;	Bootloader flavor.
;
;--

	OPT   2					; disable listing
	INCLUDE kxarm.h
	INCLUDE pxa255.inc
	INCLUDE gumstix.inc
	INCLUDE image_cfg.inc
	OPT   1					; reenable listing

	IMPORT	main
	IMPORT	OALVAtoPA
	IMPORT	OALPAtoVA

	TEXTAREA

;------------------------------------------------------------------------
	; Included within the text section in order that a relative offset can be
	; computed in the code below.
	;
	OPT   2					; disable listing
	INCLUDE	oemaddrtab_cfg.inc
	OPT   1					; reenable listing

;-------------------------------------------------------------------------------
;
; OALStartUp: OEM bootloader startup code.  This routine will:
;
; * Copy the image to RAM if it's not already running there.
;
; * Set up the MMU and Dcache for the bootloader.
;
; * Initialize the first-level page table based up the contents
;   of the MemoryMap array and enable the MMU and caches.
;
; Inputs: None.
; 
; On return: N/A.
;
; Register used:
;
;-------------------------------------------------------------------------------
;
	ALIGN

	LEAF_ENTRY OALStartUp

	; Copy the bootloader image from flash to RAM.  The image is configured
	; to run in RAM, but is stored in flash.  Absolute address references
	; should be avoided until the image has been relocated and the MMU enabled.
	;
	; NOTE: The destination (RAM) address must match the address in the
	; bootloader's .bib file.  The latter dictates the code fix-up addresses.
	;
	ldr		r0, =IMAGE_BOOT_BLDRIMAGE_FLASH_PA_END
	cmp		pc, r0				; if we are already in RAM ...
	bhi		CODEINRAM

	ldr		r8, =IMAGE_BOOT_BLDRIMAGE_FLASH_PA_START; Bootloader is stored at the base of the boot flash.
													; Bootloader is fixed up to run in SDRAM (this value
													; must match the NK start address in the .bib file).
	ldr		r1, =IMAGE_BOOT_BLDRIMAGE_RAM_PA_START
	ldr		r2, =(IMAGE_BOOT_BLDRIMAGE_RAM_SIZE / 16); Bootloader image length (this must be <= the NK
													; length in the .bib file).  We are block-copying 
													; 16-bytes per iteration.
	                                                
	; Do 4x32-bit block copies from flash->RAM (corrupts r4-r7).
	;
10	ldmia	r8!, {r4-r7}		; Loads from flash (post increment).
	stmia	r1!, {r4-r7}		; Stores to RAM (post increment).
	subs	r2, r2, #1
	bne		%B10

	; Verify that the copy succeeded by comparing the flash and RAM contents.
	;
	ldr		r0, =IMAGE_BOOT_BLDRIMAGE_RAM_SIZE
	ldr		r1, =IMAGE_BOOT_BLDRIMAGE_RAM_PA_START
	ldr		r2, =IMAGE_BOOT_BLDRIMAGE_FLASH_PA_START

VERIFY_LOOP
	ldr		r3, [r1], #4		; Read longword from DRAM.
	ldr		r4, [r2], #4		; Read longword from flash.
	cmp		r3, r4				; Compare.
	bne		VERIFY_FAILURE		; Not the same? Fail.
	subs	r0, r0, #4			;
	bne		VERIFY_LOOP			; Continue?
	b		VERIFY_DONE			; Done (success).

VERIFY_FAILURE
    b		VERIFY_FAILURE		; Spin forever.

VERIFY_DONE
	; Now that we've copied ourselves to RAM, jump to the RAM image.  Use the "CodeInRAM" label
	; to determine the RAM-based code address to which we should jump.
	;
	add		r2, pc, #CODEINRAM-(.+8)				; Calculate the relative offset to the 'CodeInRAM' label.
	ldr		r1, =IMAGE_BOOT_BLDRIMAGE_RAM_PA_START	; Get the RAM address to which we copied ourself.
	add		r1, r1, r2								; Calculate the RAM address of the 'CodeInRAM' label.
	mov		pc, r1
	nop
	nop
	nop

CODEINRAM

	; We're now running out of RAM.
	; 
	ldr		r1, =PXA255_BASE_REG_PA_MEMC			; now its safe to re-write FLASH timing
	ldr		r2, =MSC0_INRAM_value					; fast FLASH access while in RAM
	str		r2, [r1, #MSC0_OFFSET]
	ldr		r2, [r1, #MSC0_OFFSET]					; read it back as required

	; Now that we're running out of RAM, construct the first-level Section descriptors
	; to create 1MB mapped regions from the addresses defined in the OEMAddressTable.
	; This will allow us to enable the MMU and use a virtual address space that matches
	; the mapping used by the OS image.
	;
	; We'll create two different mappings from the addresses specified:
	;     [8000 0000 --> 9FFF FFFF] = Cacheable, Bufferable
	;     [A000 0000 --> BFFF FFFF] = NonCacheable, nonBufferable
	;
BUILDTTB

	add		r11, pc, #g_oalAddressTable - (. + 8)	; Pointer to OEMAddressTable.

	; Set the TTB.
	;
	ldr		r9, =BASE_PA_SDRAM				; Physical address of the first-level table (base of SDRAM).
	ldr		r0, =0xFFFFC000
	and		r9, r9, r0						; Mask off TTB[31:0] (must be 0's).
	mcr		p15, 0, r9, c2, c0, 0			; Set the TTB.

	; ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
	; ~~~~~~~~~~ MAP CACHED and BUFFERED SECTION DESCRIPTORS ~~~~~~~~~~~~~~~~~~
	; ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
	mov		r0, #0x0E						; Section (1MB) descriptor; (C=B=1: write-back, read-allocate).
	orr		r0, r0, #0x400					; Set AP.
20  mov		r1, r11							; Pointer to OEMAddressTable.

	; Start Crunching through the OEMAddressTable[]:
	;
	; r2 temporarily holds OEMAddressTable[VA]
	; r3 temporarily holds OEMAddressTable[PHY]
	; r4 temporarily holds OEMAddressTable[#MB]
	;
25	ldr		r2, [r1], #4					; Virtual (cached) address to map physical address to.
	ldr		r3, [r1], #4					; Physical address to map from.
	ldr		r4, [r1], #4					; Number of MB to map.

	cmp		r4, #0							; End of table?
	beq		%F29

	; r2 holds the descriptor address (virtual address)
	; r0 holds the actual section descriptor
	;

	; Create descriptor address.
	;
	ldr     r6, =0xFFF00000
	and     r2, r2, r6				; Only VA[31:20] are valid.
	orr     r2, r9, r2, LSR #18		; Build the descriptor address:  r2 = (TTB[31:14} | VA[31:20] >> 18)

	; Create the descriptor.
	;
	ldr     r6, =0xFFF00000
	and     r3, r3, r6				; Only PA[31:20] are valid for the descriptor and the rest will be static.
	orr     r0, r3, r0				; Build the descriptor: r0 = (PA[31:20] | the rest of the descriptor)

	; Store the descriptor at the proper (physical) address
	;
28	str		r0, [r2], #4
	add		r0, r0, #0x00100000		; Section descriptor for the next 1MB mapping (just add 1MB).
	sub		r4, r4, #1				; Decrement number of MB left.
	cmp		r4, #0					; Done?
	bne		%B28					; No - map next MB.

	bic		r0, r0, #0xF0000000		; Clear section base address field.
	bic		r0, r0, #0x0FF00000		; Clear section base address field.
	b		%B25					; Get and process the next OEMAddressTable element.

	; ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
	; ~~~~~~~~~~ MAP UNCACHED and UNBUFFERED SECTION DESCRIPTORS ~~~~~~~~~~~~~~
	; ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

29	tst		r0, #8					; Test for 'C' bit set (means we just used 
									; above loop structure to map cached and buffered space).
	bic		r0, r0, #0x0C			; Clear cached and buffered bits in the descriptor (clear C&B bits).
	add		r9, r9, #0x0800			; Pointer to the first PTE for "unmapped uncached space" (0x2000 0000 + V_U_Adx).
	bne		%B20					; Repeat the descriptor setup for uncached space (map C=B=0 space).

ACTIVATEMMU
	; The 1st Level Section Descriptors are setup. Initialize the MMU and turn it on.
	;
	nop
	mov		r1, #1
	mcr		p15, 0, r1, c3, c0, 0	; Set up access to domain 0.
	mcr		p15, 0, r0, c8, c7, 0	; Flush the instruction and data TLBs.
	mcr		p15, 0, r1, c7, c10, 4	; Drain the write and fill buffers.

	mov		r1, #0x78				; Bits [6:3] must be written as 1's.
	orr		r1, r1, #0x1			; Enable MMU.
	orr		r1, r1, #0x1000			; Enable IC.
	orr		r1, r1, #0x0800			; Enable BTB.
	orr		r1, r1, #0x4			; Enable DC.
	ldr		r2, =VirtualStart		; Get virtual address of 'VirtualStart' label.
	cmp		r2, #0					; Make sure no stall on "mov pc,r2" below.

	; Enable the MMU.
	;
	mcr     p15, 0, r1, c1, c0, 0	; MMU ON:  All memory accesses are now virtual.

	; Jump to the virtual address of the 'VirtualStart' label.
	;
	mov     pc, r2
	nop
	nop
	nop

	; *************************************************************************
	; *************************************************************************
	; The MMU and caches are now enabled and we're running in a virtual
	; address space.
	;

	ALIGN
    
VirtualStart

	;  Set up a supervisor mode stack.
	;
	; NOTE: These values must match the OEMAddressTable and .bib file entries for
	; the bootloader.
	;
	ldr		sp, =IMAGE_BOOT_STACK_RAM_UA_START

	; Jump to the C entrypoint.
	;
;test
;	b	test
	nop
	nop
;
;	
	nop
	nop
	bl		main				; Jump to main.c::main(), never to return...
	nop
	nop
	nop
    
STALL2
	b		STALL2 


;-------------------------------------------------------------------------------

	LTORG

;-------------------------------------------------------------------------------
;-------------------------------------------------------------------------------
;
; void Launch(UINT32 pFunc): This function launches the program at pFunc (pFunc
;                            is a physical address).  The MMU is disabled just
;                            before jumping to specified address.
;
; Inputs: pFunc (r0) - Physical address of program to Launch.
; 
; On return: None - the launched program never returns.
;
; Register used:
;
;-------------------------------------------------------------------------------
;
	ALIGN
	LEAF_ENTRY Launch

	; r3 now contains the physical launch address.
	;
	mov		r3, r0

	; Compute the physical address of the PhysicalStart tag.  We'll jump to this
	; address once we've turned the MMU and caches off.
	;
	stmdb	sp!, {r3}
	ldr		r0, =PhysicalStart
	bl		OALVAtoPA
	nop
	ldmia	sp!, {r3}

	; r0 now contains the physical address of 'PhysicalStart'.
	; r3 now contains the physical launch address.

	; Next, we disable the MMU, and I&D caches.
	;
	mov		r1, #0x0078
	mcr		p15, 0, r1, c1, c0, 0


	; Jump to 'PhysicalStart'.
	;
	mov		pc, r0
	nop
	nop
	nop
	nop

PhysicalStart

	; Flush the I&D TLBs.
	;
	mcr		p15, 0, r2, c8, c7, 0		; Flush the I&D TLBs

	; Jump to the physical launch address.  This should never return...
	;    
	mov		pc, r3
	nop
	nop
	nop
	nop
	nop
	nop
       
	END

    

?? 快捷鍵說明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
久久女同性恋中文字幕| 色妹子一区二区| 精品国产电影一区二区| 日韩激情一二三区| 欧美精选一区二区| 日韩不卡在线观看日韩不卡视频| 777午夜精品视频在线播放| 日韩影院在线观看| 欧美一区二区在线免费观看| 久久综合综合久久综合| 日韩欧美123| 国产高清久久久| 国产精品久久三| 欧美专区亚洲专区| 亚洲成a人片在线观看中文| 91麻豆精品国产综合久久久久久| 免费视频最近日韩| 亚洲国产精品精华液ab| 91影院在线免费观看| 亚洲一区二区三区四区的 | 亚洲一区电影777| 制服丝袜亚洲色图| 久草中文综合在线| 日本一区二区高清| 色狠狠色狠狠综合| 美女高潮久久久| 国产日产欧产精品推荐色| 91亚洲精品久久久蜜桃网站| 天使萌一区二区三区免费观看| 欧美成人免费网站| 91一区二区在线观看| 青青草国产成人av片免费| 久久久三级国产网站| 一本到不卡免费一区二区| 日本免费新一区视频| 国产精品免费网站在线观看| 精品视频色一区| 国产a级毛片一区| 午夜免费久久看| 欧美国产日韩a欧美在线观看| 欧美性大战久久| 国产福利电影一区二区三区| 亚洲风情在线资源站| 久久久精品天堂| 欧美中文字幕亚洲一区二区va在线| 麻豆视频一区二区| 亚洲综合在线免费观看| 久久久综合精品| 91精品蜜臀在线一区尤物| 99视频一区二区| 寂寞少妇一区二区三区| 亚洲综合一二区| 国产精品久久久久久久蜜臀| 日韩欧美国产综合一区| 欧美丝袜第三区| 99久久综合狠狠综合久久| 九九九精品视频| 亚洲国产裸拍裸体视频在线观看乱了| 久久久国产午夜精品 | 日韩黄色在线观看| 洋洋av久久久久久久一区| 国产精品丝袜久久久久久app| 欧美一区二区观看视频| 欧美在线三级电影| av中文字幕在线不卡| 久久99热99| 日本午夜一本久久久综合| 伊人开心综合网| 国产精品久久国产精麻豆99网站| www国产精品av| 日韩欧美国产三级| 正在播放一区二区| 69久久夜色精品国产69蝌蚪网| 一本久久综合亚洲鲁鲁五月天 | 精品久久久久99| 欧美一区二区视频在线观看| 欧美福利视频导航| 在线观看区一区二| 欧美性猛交xxxx黑人交| 在线免费亚洲电影| 在线视频综合导航| 欧美视频日韩视频| 欧美日韩一级黄| 欧美乱妇23p| 制服丝袜亚洲网站| 欧美xxxx老人做受| 久久综合九色欧美综合狠狠| 久久人人爽人人爽| 欧美激情一区二区三区四区| 国产精品色在线观看| 国产精品国产成人国产三级| 亚洲视频网在线直播| 一区二区三区免费在线观看| 一区二区三区在线影院| 亚洲成人免费av| 日本一不卡视频| 六月丁香婷婷色狠狠久久| 国产呦精品一区二区三区网站| 国产又黄又大久久| 成人黄色网址在线观看| 91美女片黄在线观看91美女| 欧美伊人久久久久久久久影院 | 国产精品羞羞答答xxdd| 成人黄页毛片网站| 在线观看精品一区| 欧美一级一级性生活免费录像| 欧美α欧美αv大片| 国产精品久久久久久久午夜片| 一区二区三区在线免费观看| 日韩精品电影在线| 国产精品69久久久久水密桃| 99精品久久99久久久久| 欧美亚洲自拍偷拍| 日韩一级免费一区| 国产精品另类一区| 视频在线在亚洲| 国产精品123| 91精彩视频在线| 欧美精品一区二区三区蜜桃视频| 中文字幕+乱码+中文字幕一区| 亚洲一线二线三线视频| 久久99国产精品免费| 91老师国产黑色丝袜在线| 日韩欧美国产一区二区在线播放| 国产精品欧美一区二区三区| 亚洲bdsm女犯bdsm网站| 国产精品亚洲综合一区在线观看| 在线观看日韩电影| 中文字幕乱码亚洲精品一区 | 五月天欧美精品| 国产精品69毛片高清亚洲| 欧美日韩情趣电影| 日本一区二区在线不卡| 五月婷婷欧美视频| 不卡的av电影在线观看| 欧美一区二区三区免费在线看| 亚洲国产高清在线观看视频| 日韩成人一级大片| 在线欧美日韩精品| 中文字幕av一区二区三区高| 久久精品国产精品亚洲红杏| 色又黄又爽网站www久久| 国产欧美一区二区精品性色超碰| 亚洲午夜久久久| av成人免费在线观看| 精品国产不卡一区二区三区| 亚洲第一成人在线| 99视频热这里只有精品免费| 久久久精品国产99久久精品芒果 | 色999日韩国产欧美一区二区| 精品国产乱码久久久久久老虎 | 国产精品国产三级国产专播品爱网| 日本人妖一区二区| 欧美曰成人黄网| 亚洲激情五月婷婷| 白白色亚洲国产精品| 国产免费成人在线视频| 精品一区二区三区av| 欧美一区二区三区影视| 午夜伦理一区二区| 欧美视频一区二区| 亚洲一区二区三区影院| 欧美伊人久久大香线蕉综合69| 亚洲日本韩国一区| av动漫一区二区| 国产精品成人午夜| jizz一区二区| 中文字幕中文字幕在线一区| 成人高清在线视频| 国产精品无遮挡| 成人免费电影视频| 国产三级一区二区| 国产精品一二三四五| 亚洲国产精品成人综合色在线婷婷 | 丝袜美腿亚洲一区| 91精品国产91热久久久做人人| 日韩综合一区二区| 欧美一区二区精品久久911| 精品在线播放免费| 久久伊人蜜桃av一区二区| 风间由美一区二区av101| 亚洲天堂中文字幕| 91豆麻精品91久久久久久| 亚洲国产成人porn| 欧美一区二区三区喷汁尤物| 国产在线视频一区二区三区| 久久久久久久性| 不卡视频一二三四| 一区二区三区四区高清精品免费观看 | 黑人精品欧美一区二区蜜桃| 久久久国产精品午夜一区ai换脸| www.色精品| 午夜激情久久久| 精品电影一区二区| 豆国产96在线|亚洲| 亚洲黄色小说网站| 日韩欧美在线网站| 国产精品资源在线看| 国产精品午夜在线| 亚洲精品少妇30p|