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

📄 m29w800dt.cod

📁 平台PXA270, Mobile6.0 这是270的mobile6.0的bootloader
💻 COD
📖 第 1 页 / 共 5 页
字号:
  000a0	e3530000	 cmp         r3, #0
  000a4	1a000005	 bne         |$L34364|
  000a8	e1d701b6	 ldrh        r0, [r7, #0x16]
  000ac	e1a01004	 mov         r1, r4
  000b0	eb000000	 bl          __rt_udiv
  000b4	e1d731b4	 ldrh        r3, [r7, #0x14]

; 369  : 			physicalSectorAddr = i * (SECTOR_SIZE + sizeof(SectorInfo)) + (blockID * s_STFlsInfo.wUnusedBytesPerBlock);

  000b8	e0239390	 mla         r3, r0, r3, r9

; 370  : 		else

  000bc	ea000000	 b           |$L34753|
  000c0		 |$L34364|

; 355  : 		return FALSE;
; 356  : 	}
; 357  : 
; 358  : 	//----- 2. Process the write request(s)... -----
; 359  : 	for(i = startSectorAddr; i < (startSectorAddr + dwNumSectors); i++)

  000c0	e1a03484	 mov         r3, r4, lsl #9
  000c4		 |$L34753|

; 371  : 			physicalSectorAddr = i * SECTOR_SIZE;

  000c4	e58d3000	 str         r3, [sp]

; 372  : 
; 373  : 
; 374  : 		//----- Write the necessary sector data -----       
; 375  : 		if(pSectorBuff)

  000c8	e3560000	 cmp         r6, #0
  000cc	0a000013	 beq         |$L34367|

; 376  : 		{
; 377  : 			pBuffer=pSectorBuff;
; 378  : 	        if ((DWORD)pBuffer & ((1<<(s_STFlsInfo.bBusWidth-1))- 1))

  000d0	e5d73004	 ldrb        r3, [r7, #4]
  000d4	e1a01006	 mov         r1, r6
  000d8	e2433001	 sub         r3, r3, #1
  000dc	e1a0331a	 mov         r3, r10, lsl r3
  000e0	e2433001	 sub         r3, r3, #1
  000e4	e1130006	 tst         r3, r6
  000e8	0a000006	 beq         |$L34369|

; 379  : 	        {
; 380  : 				//the  buffer pointer must be dword aligned
; 381  : 	            RETAILMSG(1, (TEXT("Nor_FMD_WriteSector: Unaligned pointer - using internal buffer\r\n")));

  000ec	e59f00b4	 ldr         r0, [pc, #0xB4]
  000f0	eb000000	 bl          NKDbgPrintfW

; 382  : 	            memcpy(bsTmpBuf, pBuffer, SECTOR_SIZE);

  000f4	e28d0008	 add         r0, sp, #8
  000f8	e3a02c02	 mov         r2, #2, 24
  000fc	e1a01006	 mov         r1, r6
  00100	eb000000	 bl          memcpy

; 383  : 	            pBuffer = bsTmpBuf;

  00104	e28d1008	 add         r1, sp, #8
  00108		 |$L34369|

; 384  : 	        }
; 385  : 				
; 386  : 			if(!WriteFlashEx(physicalSectorAddr, pBuffer, SECTOR_SIZE))

  00108	e59d0000	 ldr         r0, [sp]
  0010c	e3a02c02	 mov         r2, #2, 24
  00110	eb000000	 bl          |?WriteFlashEx@@YAHKPAEK@Z|
  00114	e3500000	 cmp         r0, #0
  00118	0affffd3	 beq         |$L34358|

; 387  : 			{
; 388  : 				return FALSE;
; 389  : 			}
; 390  : 			pSectorBuff += SECTOR_SIZE;

  0011c	e2866c02	 add         r6, r6, #2, 24
  00120		 |$L34367|

; 355  : 		return FALSE;
; 356  : 	}
; 357  : 
; 358  : 	//----- 2. Process the write request(s)... -----
; 359  : 	for(i = startSectorAddr; i < (startSectorAddr + dwNumSectors); i++)

  00120	e597302c	 ldr         r3, [r7, #0x2C]

; 391  : 		}
; 392  : 
; 393  : 		//----- Write the necessary sector info data (metadata) -----
; 394  : 		//      NOTE: Notice that the 6 metadata bytes are just stored after the sector data...
; 395  : 		if(!s_bXIPMode && pSectorInfoBuff)

  00124	e3530000	 cmp         r3, #0
  00128	1a000016	 bne         |$L34362|
  0012c	e3550000	 cmp         r5, #0
  00130	0a000014	 beq         |$L34362|

; 396  : 		{
; 397  : 			pBuffer = (BYTE*)pSectorInfoBuff;
; 398  : 	        if ((DWORD)pBuffer & ((1 << (s_STFlsInfo.bBusWidth - 1)) - 1))

  00134	e5d73004	 ldrb        r3, [r7, #4]
  00138	e1a01005	 mov         r1, r5
  0013c	e2433001	 sub         r3, r3, #1
  00140	e1a0331b	 mov         r3, r11, lsl r3
  00144	e2433001	 sub         r3, r3, #1
  00148	e1130005	 tst         r3, r5
  0014c	0a000006	 beq         |$L34375|

; 399  : 	        {
; 400  : 				//the buffer pointer must be dword aligned
; 401  : 	            RETAILMSG(1, (TEXT("Nor_FMD_WriteSector: Unaligned pointer - using internal buffer\r\n")));

  00150	e59f0050	 ldr         r0, [pc, #0x50]
  00154	eb000000	 bl          NKDbgPrintfW

; 402  : 	            memcpy(bsTmpBuf, pBuffer, sizeof(SectorInfo));

  00158	e28d0008	 add         r0, sp, #8
  0015c	e3a02008	 mov         r2, #8
  00160	e1a01005	 mov         r1, r5
  00164	eb000000	 bl          memcpy

; 403  : 	            pBuffer = bsTmpBuf;

  00168	e28d1008	 add         r1, sp, #8
  0016c		 |$L34375|

; 404  : 	        }
; 405  : 				
; 406  : 			if (!WriteFlashEx(physicalSectorAddr + SECTOR_SIZE, (PUCHAR)pBuffer, sizeof(SectorInfo)))

  0016c	e59d3000	 ldr         r3, [sp]
  00170	e3a02008	 mov         r2, #8
  00174	e2830c02	 add         r0, r3, #2, 24
  00178	eb000000	 bl          |?WriteFlashEx@@YAHKPAEK@Z|
  0017c	e3500000	 cmp         r0, #0
  00180	0affffb9	 beq         |$L34358|

; 407  : 			{
; 408  : 				return FALSE;
; 409  : 			}
; 410  : 			pSectorInfoBuff += sizeof(SectorInfo);

  00184	e2855040	 add         r5, r5, #0x40
  00188		 |$L34362|

; 355  : 		return FALSE;
; 356  : 	}
; 357  : 
; 358  : 	//----- 2. Process the write request(s)... -----
; 359  : 	for(i = startSectorAddr; i < (startSectorAddr + dwNumSectors); i++)

  00188	e2844001	 add         r4, r4, #1
  0018c	e1540008	 cmp         r4, r8
  00190	e2899f82	 add         r9, r9, #0x82, 30
  00194	3affffc0	 bcc         |$L34361|
  00198		 |$L34363|

; 411  : 		}
; 412  : 	}
; 413  : 
; 414  : 	return TRUE;;

  00198	e59d0208	 ldr         r0, [sp, #0x208]
  0019c	eb000000	 bl          __security_check_cookie
  001a0	e3a00001	 mov         r0, #1
  001a4	eaffffb3	 b           |$L34347|
  001a8		 |$L34759|
  001a8	00000000	 DCD         |??_C@_1IC@OLJPHDMC@?$AAN?$AAo?$AAr?$AA_?$AAF?$AAM?$AAD?$AA_?$AAW?$AAr?$AAi?$AAt?$AAe?$AAS?$AAe?$AAc?$AAt?$AAo?$AAr?$AA?3@|
  001ac	00000000	 DCD         |??_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@|
  001b0	00000000	 DCD         |s_STFlsInfo|
  001b4	00000000	 DCD         |__security_cookie|
  001b8		 |$M34755|

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

	EXPORT	|?Spansion_Nor_FMD_GetBlockStatus@@YAKK@Z| ; Spansion_Nor_FMD_GetBlockStatus
	IMPORT	|Nor_FMD_ReadSector|

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

  00000			 AREA	 |.pdata$$?Spansion_Nor_FMD_GetBlockStatus@@YAKK@Z|, PDATA, SELECTION=5, ASSOC=|.text| { |?Spansion_Nor_FMD_GetBlockStatus@@YAKK@Z| } ; comdat associative
|$T34770| DCD	|$L34769|
	DCD	0x40001702
; Function compile flags: /Ogsy

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

  00000		 |?Spansion_Nor_FMD_GetBlockStatus@@YAKK@Z| PROC ; Spansion_Nor_FMD_GetBlockStatus

; 426  : {

  00000		 |$L34769|
  00000	e92d4010	 stmdb       sp!, {r4, lr}
  00004	e24dd008	 sub         sp, sp, #8
  00008		 |$M34767|

; 427  :     SECTOR_ADDR Sector = blockID * s_STFlsInfo.wSectorsPerBlock;

  00008	e59f1048	 ldr         r1, [pc, #0x48]

; 428  :     SectorInfo SI;
; 429  :     DWORD dwResult = 0;
; 430  : 
; 431  :     if (!Nor_FMD_ReadSector(Sector, NULL, &SI, 1)) 

  0000c	e3a03001	 mov         r3, #1
  00010	e28d2000	 add         r2, sp, #0
  00014	e1d1e1b6	 ldrh        lr, [r1, #0x16]
  00018	e3a01000	 mov         r1, #0
  0001c	e3a04000	 mov         r4, #0
  00020	e000009e	 mul         r0, lr, r0
  00024	eb000000	 bl          Nor_FMD_ReadSector
  00028	e3500000	 cmp         r0, #0

; 432  :         return BLOCK_STATUS_UNKNOWN;

  0002c	03a04001	 moveq       r4, #1
  00030	0a000004	 beq         |$L34389|

; 433  : 
; 434  :     if (!(SI.bOEMReserved & OEM_BLOCK_READONLY))  

  00034	e5dd3004	 ldrb        r3, [sp, #4]
  00038	e3130002	 tst         r3, #2

; 435  :         dwResult |= BLOCK_STATUS_READONLY;

  0003c	03a04004	 moveq       r4, #4

; 436  : 
; 437  :     if (!(SI.bOEMReserved & OEM_BLOCK_RESERVED))  

  00040	e3130001	 tst         r3, #1

; 438  :         dwResult |= BLOCK_STATUS_RESERVED;

  00044	03844008	 orreq       r4, r4, #8
  00048		 |$L34389|

; 432  :         return BLOCK_STATUS_UNKNOWN;

  00048	e1a00004	 mov         r0, r4

; 439  : 
; 440  :     return dwResult;
; 441  : }

  0004c	e28dd008	 add         sp, sp, #8
  00050	e8bd4010	 ldmia       sp!, {r4, lr}
  00054	e12fff1e	 bx          lr
  00058		 |$L34772|
  00058	00000000	 DCD         |s_STFlsInfo|
  0005c		 |$M34768|

			 ENDP  ; |?Spansion_Nor_FMD_GetBlockStatus@@YAKK@Z|, Spansion_Nor_FMD_GetBlockStatus

	EXPORT	|?Spansion_Nor_FMD_SetBlockStatus@@YAHKK@Z| ; Spansion_Nor_FMD_SetBlockStatus
	IMPORT	|Nor_FMD_WriteSector|

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

  00000			 AREA	 |.pdata$$?Spansion_Nor_FMD_SetBlockStatus@@YAHKK@Z|, PDATA, SELECTION=5, ASSOC=|.text| { |?Spansion_Nor_FMD_SetBlockStatus@@YAHKK@Z| } ; comdat associative
|$T34787| DCD	|$L34786|
	DCD	0x40002402
; Function compile flags: /Ogsy

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

  00000		 |?Spansion_Nor_FMD_SetBlockStatus@@YAHKK@Z| PROC ; Spansion_Nor_FMD_SetBlockStatus

; 451  : {

  00000		 |$L34786|
  00000	e92d4070	 stmdb       sp!, {r4 - r6, lr}
  00004	e24dd008	 sub         sp, sp, #8
  00008		 |$M34784|
  00008	e1a04001	 mov         r4, r1
  0000c	e1a05000	 mov         r5, r0

; 452  :     if (dwStatus & (BLOCK_STATUS_READONLY | BLOCK_STATUS_RESERVED))

  00010	e314000c	 tst         r4, #0xC
  00014	0a000018	 beq         |$L34400|

; 453  :     {
; 454  :         
; 455  :         SECTOR_ADDR Sector = blockID * s_STFlsInfo.wSectorsPerBlock;

  00018	e59fe06c	 ldr         lr, [pc, #0x6C]

; 456  :         SectorInfo SI;
; 457  : 
; 458  :         if (!Nor_FMD_ReadSector(Sector, NULL, &SI, 1))

  0001c	e3a03001	 mov         r3, #1
  00020	e28d2000	 add         r2, sp, #0
  00024	e1de61b6	 ldrh        r6, [lr, #0x16]
  00028	e3a01000	 mov         r1, #0
  0002c	e0000596	 mul         r0, r6, r5
  00030	eb000000	 bl          Nor_FMD_ReadSector
  00034	e3500000	 cmp         r0, #0

; 459  :         {
; 460  :             return FALSE;

  00038	0a00000d	 beq         |$L34783|

; 461  :         }
; 462  : 
; 463  :         if (dwStatus & BLOCK_STATUS_READONLY)
; 464  :         {
; 465  :             SI.bOEMReserved &= ~OEM_BLOCK_READONLY;

  0003c	e5dd3004	 ldrb        r3, [sp, #4]
  00040	e3140004	 tst         r4, #4

; 466  :         }
; 467  :         
; 468  :         if (dwStatus & BLOCK_STATUS_RESERVED)
; 469  :         {
; 470  :             SI.bOEMReserved &= ~OEM_BLOCK_RESERVED;
; 471  :         }
; 472  : 
; 473  :         if (!Nor_FMD_WriteSector (Sector, NULL, &SI, 1))

  00044	e0000596	 mul         r0, r6, r5
  00048	120330fd	 andne       r3, r3, #0xFD
  0004c	e28d2000	 add         r2, sp, #0
  00050	15cd3004	 strneb      r3, [sp, #4]
  00054	e3140008	 tst         r4, #8
  00058	120330fe	 andne       r3, r3, #0xFE
  0005c	15cd3004	 strneb      r3, [sp, #4]
  00060	e3a03001	 mov         r3, #1
  00064	e3a01000	 mov         r1, #0
  00068	eb000000	 bl          Nor_FMD_WriteSector
  0006c	e3500000	 cmp         r0, #0
  00070	1a000001	 bne         |$L34400|
  00074		 |$L34783|

; 474  :         {
; 475  :             return FALSE;

  00074	e3a00000	 mov         r0, #0
  00078	ea000000	 b           |$L34393|
  0007c		 |$L34400|

; 476  :         }
; 477  : 
; 478  :     }    
; 479  :     
; 480  :     return TRUE;

  0007c	e3a00001	 mov         r0, #1
  00080		 |$L34393|

⌨️ 快捷键说明

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