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

📄 intel_28f160.cod

📁 平台PXA270, Mobile6.0 这是270的mobile6.0的bootloader
💻 COD
📖 第 1 页 / 共 5 页
字号:
  00044		 |$M30236|

			 ENDP  ; |?Intel_Nor_FMD_GetInfo@@YAHPAU_FlashInfo@@@Z|, Intel_Nor_FMD_GetInfo

	EXPORT	|?Intel_Nor_FMD_ReadSector@@YAHKPAEPAU_SectorInfo@@K@Z| ; Intel_Nor_FMD_ReadSector
	IMPORT	|__rt_udiv|
	IMPORT	|memcpy|

  00000			 AREA	 |.text| { |?Intel_Nor_FMD_ReadSector@@YAHKPAEPAU_SectorInfo@@K@Z| }, CODE, ARM, SELECTION=1 ; comdat noduplicate

  00000			 AREA	 |.pdata$$?Intel_Nor_FMD_ReadSector@@YAHKPAEPAU_SectorInfo@@K@Z|, PDATA, SELECTION=5, ASSOC=|.text| { |?Intel_Nor_FMD_ReadSector@@YAHKPAEPAU_SectorInfo@@K@Z| } ; comdat associative
|$T30258| DCD	|$L30257|
	DCD	0x40003f02
; Function compile flags: /Ogsy

  00000			 AREA	 |.text| { |?Intel_Nor_FMD_ReadSector@@YAHKPAEPAU_SectorInfo@@K@Z| }, CODE, ARM, SELECTION=1 ; comdat noduplicate

  00000		 |?Intel_Nor_FMD_ReadSector@@YAHKPAEPAU_SectorInfo@@K@Z| PROC ; Intel_Nor_FMD_ReadSector

; 287  : {

  00000		 |$L30257|
  00000	e92d4ff0	 stmdb       sp!, {r4 - r11, lr}
  00004	e24dd004	 sub         sp, sp, #4
  00008		 |$M30255|
  00008	e3530000	 cmp         r3, #0
  0000c	e1a06002	 mov         r6, r2
  00010	e1a05001	 mov         r5, r1
  00014	e1a04000	 mov         r4, r0

; 288  : 	volatile SECTOR_ADDR  physicalSectorAddr = 0;

  00018	e3a02000	 mov         r2, #0
  0001c	e58d2000	 str         r2, [sp]

; 289  : 	BLOCK_ID blockID = 0;
; 290  : 	DWORD i = 0;
; 291  : 
; 292  : 	//----- 1. Check the input parameters -----
; 293  : 	//         NOTE: The FAL insures that the starting sector address is in the allowable range.
; 294  : 	if((dwNumSectors == 0) || ((pSectorBuff == NULL) && (pSectorInfoBuff == NULL)))

  00020	0a000030	 beq         |$L29815|
  00024	e3550000	 cmp         r5, #0
  00028	1a000001	 bne         |$L29814|
  0002c	e3560000	 cmp         r6, #0
  00030	0a00002c	 beq         |$L29815|
  00034		 |$L29814|

; 297  : 	}
; 298  : 
; 299  : 	//----- 2. Process the read request(s)... -----
; 300  : 	for(i = startSectorAddr ; i < (startSectorAddr + dwNumSectors) ; i++)

  00034	e0848003	 add         r8, r4, r3
  00038	e1540008	 cmp         r4, r8
  0003c	2a000027	 bcs         |$L29818|
  00040	e59fa0b0	 ldr         r10, [pc, #0xB0]
  00044	e0843304	 add         r3, r4, r4, lsl #6
  00048	e1a07484	 mov         r7, r4, lsl #9
  0004c	e59ab01c	 ldr         r11, [r10, #0x1C]
  00050	e1a09183	 mov         r9, r3, lsl #3
  00054		 |$L29816|

; 301  : 	{
; 302  : 		//----- Determine the block this physical sector resides in -----
; 303  : 		blockID = (i / g_FlashInfo.wSectorsPerBlock);
; 304  : 
; 305  : 		//----- Compute the physical address for the requested -----
; 306  : 		// Note we do this differently based on whether the caller wants us to read the sector information structure as well.  Since we're
; 307  : 		// dealing with a NOR flash which is XIP-able, one might want to use this function to read from an XIP region (i.e., no sector information
; 308  : 		// structures in flash).
; 309  : 		//
; 310  : 		if (!s_bXIPMode)

  00054	e35b0000	 cmp         r11, #0
  00058	1a000007	 bne         |$L29819|
  0005c	e1da01b6	 ldrh        r0, [r10, #0x16]
  00060	e1a01004	 mov         r1, r4
  00064	eb000000	 bl          __rt_udiv
  00068	e1da31b4	 ldrh        r3, [r10, #0x14]
  0006c	e59a2000	 ldr         r2, [r10]
  00070	e0239390	 mla         r3, r0, r3, r9

; 311  : 		    physicalSectorAddr =g_FlashInfo.dwBaseAddr + i*(SECTOR_SIZE + sizeof(SectorInfo)) + (blockID *g_FlashInfo.wUnusedBytesPerBlock);

  00074	e0833002	 add         r3, r3, r2

; 312  : 		else

  00078	ea000001	 b           |$L30254|
  0007c		 |$L29819|

; 297  : 	}
; 298  : 
; 299  : 	//----- 2. Process the read request(s)... -----
; 300  : 	for(i = startSectorAddr ; i < (startSectorAddr + dwNumSectors) ; i++)

  0007c	e59a3000	 ldr         r3, [r10]
  00080	e0873003	 add         r3, r7, r3
  00084		 |$L30254|

; 313  : 		    physicalSectorAddr = g_FlashInfo.dwBaseAddr + i*(SECTOR_SIZE);

  00084	e58d3000	 str         r3, [sp]

; 314  : 
; 315  : 		//----- Read the necessary sector data -----
; 316  : 		if(pSectorBuff)

  00088	e3550000	 cmp         r5, #0
  0008c	0a000004	 beq         |$L29822|

; 317  : 		{
; 318  : 		    memcpy(pSectorBuff, (PUCHAR)physicalSectorAddr, SECTOR_SIZE);

  00090	e59d1000	 ldr         r1, [sp]
  00094	e3a02c02	 mov         r2, #2, 24
  00098	e1a00005	 mov         r0, r5
  0009c	eb000000	 bl          memcpy

; 319  : 		    pSectorBuff += SECTOR_SIZE;

  000a0	e2855c02	 add         r5, r5, #2, 24
  000a4		 |$L29822|

; 320  : 		}
; 321  : 
; 322  : 		//----- Read the necessary SectorInfo data (metadata) -----
; 323  : 		if(!s_bXIPMode && pSectorInfoBuff)

  000a4	e35b0000	 cmp         r11, #0
  000a8	1a000007	 bne         |$L29817|
  000ac	e3560000	 cmp         r6, #0
  000b0	0a000005	 beq         |$L29817|

; 324  : 		{
; 325  : 		    // The metadata bytes are read directly into the SectorInfo structure...
; 326  : 		    memcpy(pSectorInfoBuff, (CONST PVOID)(physicalSectorAddr+SECTOR_SIZE), sizeof(SectorInfo));

  000b4	e59d3000	 ldr         r3, [sp]
  000b8	e3a02008	 mov         r2, #8
  000bc	e1a00006	 mov         r0, r6
  000c0	e2831c02	 add         r1, r3, #2, 24
  000c4	eb000000	 bl          memcpy

; 327  : 		    pSectorInfoBuff += sizeof(SectorInfo);

  000c8	e2866040	 add         r6, r6, #0x40
  000cc		 |$L29817|
  000cc	e2844001	 add         r4, r4, #1
  000d0	e1540008	 cmp         r4, r8
  000d4	e2899f82	 add         r9, r9, #0x82, 30
  000d8	e2877c02	 add         r7, r7, #2, 24
  000dc	3affffdc	 bcc         |$L29816|
  000e0		 |$L29818|

; 328  : 		}
; 329  : 	}
; 330  : 
; 331  : 	return(TRUE);

  000e0	e3a00001	 mov         r0, #1
  000e4	ea000000	 b           |$L29810|
  000e8		 |$L29815|

; 295  : 	{
; 296  : 		return(FALSE);

  000e8	e3a00000	 mov         r0, #0
  000ec		 |$L29810|

; 332  : }

  000ec	e28dd004	 add         sp, sp, #4
  000f0	e8bd4ff0	 ldmia       sp!, {r4 - r11, lr}
  000f4	e12fff1e	 bx          lr
  000f8		 |$L30260|
  000f8	00000000	 DCD         |g_FlashInfo|
  000fc		 |$M30256|

			 ENDP  ; |?Intel_Nor_FMD_ReadSector@@YAHKPAEPAU_SectorInfo@@K@Z|, Intel_Nor_FMD_ReadSector

	EXPORT	|??_C@_1HA@FIOKIPJA@?$AAW?$AAr?$AAi?$AAt?$AAe?$AA?5?$AAp?$AAo?$AAi?$AAn?$AAt?$AAe?$AAr?$AA?5?$AAn?$AAo?$AAt?$AA?5?$AAa?$AAl@| [ DATA ] ; `string'

  00000			 AREA	 |.text| { |?WriteFlashEx@@YAHKPAEK@Z| }, CODE, ARM, SELECTION=1 ; comdat noduplicate

  00000			 AREA	 |.pdata$$?WriteFlashEx@@YAHKPAEK@Z|, PDATA, SELECTION=5, ASSOC=|.text| { |?WriteFlashEx@@YAHKPAEK@Z| } ; comdat associative
|$T30320| DCD	|$L30319|
	DCD	0x40003b01

  00000			 AREA	 |.rdata| { |??_C@_1HA@FIOKIPJA@?$AAW?$AAr?$AAi?$AAt?$AAe?$AA?5?$AAp?$AAo?$AAi?$AAn?$AAt?$AAe?$AAr?$AA?5?$AAn?$AAo?$AAt?$AA?5?$AAa?$AAl@| }, DATA, READONLY, SELECTION=2 ; comdat any
|??_C@_1HA@FIOKIPJA@?$AAW?$AAr?$AAi?$AAt?$AAe?$AA?5?$AAp?$AAo?$AAi?$AAn?$AAt?$AAe?$AAr?$AA?5?$AAn?$AAo?$AAt?$AA?5?$AAa?$AAl@| DCB "W"
	DCB	0x0, "r", 0x0, "i", 0x0, "t", 0x0, "e", 0x0, " ", 0x0, "p"
	DCB	0x0, "o", 0x0, "i", 0x0, "n", 0x0, "t", 0x0, "e", 0x0, "r"
	DCB	0x0, " ", 0x0, "n", 0x0, "o", 0x0, "t", 0x0, " ", 0x0, "a"
	DCB	0x0, "l", 0x0, "i", 0x0, "g", 0x0, "n", 0x0, "e", 0x0, "d"
	DCB	0x0, " ", 0x0, "o", 0x0, "r", 0x0, " ", 0x0, "t", 0x0, "h"
	DCB	0x0, "e", 0x0, " ", 0x0, "s", 0x0, "i", 0x0, "z", 0x0, "e"
	DCB	0x0, " ", 0x0, "i", 0x0, "s", 0x0, " ", 0x0, "n", 0x0, "o"
	DCB	0x0, "t", 0x0, " ", 0x0, "c", 0x0, "o", 0x0, "r", 0x0, "r"
	DCB	0x0, "e", 0x0, "c", 0x0, "t", 0x0, "!", 0x0, 0xd, 0x0, 0xa
	DCB	0x0, 0x0, 0x0				; `string'
; Function compile flags: /Ogsy

  00000			 AREA	 |.text| { |?WriteFlashEx@@YAHKPAEK@Z| }, CODE, ARM, SELECTION=1 ; comdat noduplicate

  00000		 |?WriteFlashEx@@YAHKPAEK@Z| PROC	; WriteFlashEx

; 335  : {

  00000		 |$L30319|
  00000	e92d43f0	 stmdb       sp!, {r4 - r9, lr}
  00004		 |$M30317|
  00004	e1a04002	 mov         r4, r2
  00008	e1a06001	 mov         r6, r1
  0000c	e1a07000	 mov         r7, r0

; 336  : 	DWORD i;
; 337  : 	
; 338  : 	if ((DWORD)pbBuf & ((1<<(g_FlashInfo.bBusWidth-1))- 1) || dwBufSize%g_FlashInfo.bBusWidth)

  00010	e59f50d0	 ldr         r5, [pc, #0xD0]
  00014	e3a02001	 mov         r2, #1
  00018	e5d50004	 ldrb        r0, [r5, #4]
  0001c	e2403001	 sub         r3, r0, #1
  00020	e1a03312	 mov         r3, r2, lsl r3
  00024	e2433001	 sub         r3, r3, #1
  00028	e1130006	 tst         r3, r6
  0002c	1a000027	 bne         |$L29836|
  00030	e1a01004	 mov         r1, r4
  00034	eb000000	 bl          __rt_udiv
  00038	e3510000	 cmp         r1, #0
  0003c	1a000023	 bne         |$L29836|

; 342  : 	}
; 343  : 
; 344  : 	for (i = 0; i < dwBufSize; i += sizeof(WORD))

  00040	e3a0e000	 mov         lr, #0
  00044	e3540000	 cmp         r4, #0
  00048	0a000018	 beq         |$L29841|
  0004c	e3a09040	 mov         r9, #0x40
  00050	e3a08070	 mov         r8, #0x70
  00054	e3a00050	 mov         r0, #0x50
  00058		 |$L29839|

; 345  : 	{
; 346  : 		intel_IssueCmd(&g_FlashInfo, CMD_PROGRAM);
; 347  : 		intel_WriteWord(&g_FlashInfo, dwFlashAddr + i, *((WORD*)(pbBuf + i)));

  00058	e5952000	 ldr         r2, [r5]

; 348  : 		
; 349  : 		if (FALSE == intel_WaitComplete(&g_FlashInfo))

  0005c	e3a01001	 mov         r1, #1
  00060	e08290be	 strh        r9, [r2], +lr
  00064	e19e30b6	 ldrh        r3, [lr, +r6]
  00068	e18230b7	 strh        r3, [r2, +r7]
  0006c	e5952000	 ldr         r2, [r5]
  00070		 |$L30286|
  00070	e1c280b0	 strh        r8, [r2]
  00074	e5952000	 ldr         r2, [r5]
  00078	e1d230b0	 ldrh        r3, [r2]
  0007c	e3130080	 tst         r3, #0x80
  00080	0afffffa	 beq         |$L30286|
  00084	e3130020	 tst         r3, #0x20
  00088	1a000001	 bne         |$L30290|
  0008c	e3130010	 tst         r3, #0x10
  00090	0a000000	 beq         |$L30289|
  00094		 |$L30290|
  00094	e3a01000	 mov         r1, #0
  00098		 |$L30289|
  00098	e1c200b0	 strh        r0, [r2]
  0009c	e3510000	 cmp         r1, #0
  000a0	0a000008	 beq         |$L30306|
  000a4	e28ee002	 add         lr, lr, #2
  000a8	e15e0004	 cmp         lr, r4
  000ac	3affffe9	 bcc         |$L29839|
  000b0		 |$L29841|
  000b0	e3a00001	 mov         r0, #1
  000b4		 |$L30308|

; 350  : 		{
; 351  : 			intel_IssueCmd(&g_FlashInfo, CMD_READARRAY);
; 352  : 			return FALSE;
; 353  : 		}
; 354  : 	}
; 355  : 
; 356  : 	intel_IssueCmd(&g_FlashInfo, CMD_READARRAY);	

  000b4	e5953000	 ldr         r3, [r5]
  000b8	e3a020ff	 mov         r2, #0xFF

; 357  : 	return TRUE;

  000bc	e1c320b0	 strh        r2, [r3]

; 358  : }

  000c0	e8bd43f0	 ldmia       sp!, {r4 - r9, lr}
  000c4	e12fff1e	 bx          lr
  000c8		 |$L30306|
  000c8	e3a00000	 mov         r0, #0
  000cc	eafffff8	 b           |$L30308|
  000d0		 |$L29836|

; 339  : 	{
; 340  : 		RETAILMSG(1,(TEXT("Write pointer not aligned or the size is not correct!\r\n")));

  000d0	e59f000c	 ldr         r0, [pc, #0xC]
  000d4	eb000000	 bl          NKDbgPrintfW

; 341  : 		return FALSE;

  000d8	e3a00000	 mov         r0, #0

; 358  : }

  000dc	e8bd43f0	 ldmia       sp!, {r4 - r9, lr}
  000e0	e12fff1e	 bx          lr
  000e4		 |$L30322|
  000e4	00000000	 DCD         |??_C@_1HA@FIOKIPJA@?$AAW?$AAr?$AAi?$AAt?$AAe?$AA?5?$AAp?$AAo?$AAi?$AAn?$AAt?$AAe?$AAr?$AA?5?$AAn?$AAo?$AAt?$AA?5?$AAa?$AAl@|
  000e8	00000000	 DCD         |g_FlashInfo|
  000ec		 |$M30318|

			 ENDP  ; |?WriteFlashEx@@YAHKPAEK@Z|, WriteFlashEx

	EXPORT	|?Intel_Nor_FMD_WriteSector@@YAHKPAEPAU_SectorInfo@@K@Z| ; Intel_Nor_FMD_WriteSector
	EXPORT	|??_C@_1JC@BBAGBKBP@?$AAE?$AAR?$AAR?$AAO?$AAR?$AA?3?$AAT?$AAh?$AAe?$AA?5?$AAw?$AAr?$AAi?$AAt?$AAe?$AA?5?$AAs?$AAe?$AAc?$AAt@| [ DATA ] ; `string'
	EXPORT	|??_C@_1IC@OLJPHDMC@?$AAN?$AAo?$AAr?$AA_?$AAF?$AAM?$AAD?$AA_?$AAW?$AAr?$AAi?$AAt?$AAe?$AAS?$AAe?$AAc?$AAt?$AAo?$AAr?$AA?3@| [ DATA ] ; `string'
	IMPORT	|__security_cookie|
	IMPORT	|__security_check_cookie|

  00000			 AREA	 |.text| { |?Intel_Nor_FMD_WriteSector@@YAHKPAEPAU_SectorInfo@@K@Z| }, CODE, ARM, SELECTION=1 ; comdat noduplicate

  00000			 AREA	 |.pdata$$?Intel_Nor_FMD_WriteSector@@YAHKPAEPAU_SectorInfo@@K@Z|, PDATA, SELECTION=5, ASSOC=|.text| { |?Intel_Nor_FMD_WriteSector@@YAHKPAEPAU_SectorInfo@@K@Z| } ; comdat associative
|$T30351| DCD	|$L30350|
	DCD	0x40006e02

  00000			 AREA	 |.rdata| { |??_C@_1IC@OLJPHDMC@?$AAN?$AAo?$AAr?$AA_?$AAF?$AAM?$AAD?$AA_?$AAW?$AAr?$AAi?$AAt?$AAe?$AAS?$AAe?$AAc?$AAt?$AAo?$AAr?$AA?3@| }, DATA, READONLY, SELECTION=2 ; comdat any
|??_C@_1IC@OLJPHDMC@?$AAN?$AAo?$AAr?$AA_?$AAF?$AAM?$AAD?$AA_?$AAW?$AAr?$AAi?$AAt?$AAe?$AAS?$AAe?$AAc?$AAt?$AAo?$AAr?$AA?3@| DCB "N"
	DCB	0x0, "o", 0x0, "r", 0x0, "_", 0x0, "F", 0x0, "M", 0x0, "D"
	DCB	0x0, "_", 0x0, "W", 0x0, "r", 0x0, "i", 0x0, "t", 0x0, "e"
	DCB	0x0, "S", 0x0, "e", 0x0, "c", 0x0, "t", 0x0, "o", 0x0, "r"
	DCB	0x0, ":", 0x0, " ", 0x0, "U", 0x0, "n", 0x0, "a", 0x0, "l"
	DCB	0x0, "i", 0x0, "g", 0x0, "n", 0x0, "e", 0x0, "d", 0x0, " "
	DCB	0x0, "p", 0x0, "o", 0x0, "i", 0x0, "n", 0x0, "t", 0x0, "e"
	DCB	0x0, "r", 0x0, " ", 0x0, "-", 0x0, " ", 0x0, "u", 0x0, "s"
	DCB	0x0, "i", 0x0, "n", 0x0, "g", 0x0, " ", 0x0, "i", 0x0, "n"
	DCB	0x0, "t", 0x0, "e", 0x0, "r", 0x0, "n", 0x0, "a", 0x0, "l"
	DCB	0x0, " ", 0x0, "b", 0x0, "u", 0x0, "f", 0x0, "f", 0x0, "e"
	DCB	0x0, "r", 0x0, 0xd, 0x0, 0xa, 0x0, 0x0, 0x0 ; `string'

  00000			 AREA	 |.rdata| { |??_C@_1JC@BBAGBKBP@?$AAE?$AAR?$AAR?$AAO?$AAR?$AA?3?$AAT?$AAh?$AAe?$AA?5?$AAw?$AAr?$AAi?$AAt?$AAe?$AA?5?$AAs?$AAe?$AAc?$AAt@| }, DATA, READONLY, SELECTION=2 ; comdat any
|??_C@_1JC@BBAGBKBP@?$AAE?$AAR?$AAR?$AAO?$AAR?$AA?3?$AAT?$AAh?$AAe?$AA?5?$AAw?$AAr?$AAi?$AAt?$AAe?$AA?5?$AAs?$AAe?$AAc?$AAt@| DCB "E"
	DCB	0x0, "R", 0x0, "R", 0x0, "O", 0x0, "R", 0x0, ":", 0x0, "T"
	DCB	0x0, "h", 0x0, "e", 0x0, " ", 0x0, "w", 0x0, "r", 0x0, "i"
	DCB	0x0, "t", 0x0, "e", 0x0, " ", 0x0, "s", 0x0, "e", 0x0, "c"
	DCB	0x0, "t", 0x0, "o", 0x0, "r", 0x0, " ", 0x0, "n", 0x0, "u"
	DCB	0x0, "m", 0x0, ":", 0x0, "0", 0x0, "x", 0x0, "%", 0x0, "X"
	DCB	0x0, " ", 0x0, "i", 0x0, "s", 0x0, " ", 0x0, "l", 0x0, "a"

⌨️ 快捷键说明

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