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

📄 main.cod

📁 平台PXA270, Mobile6.0 这是270的mobile6.0的bootloader
💻 COD
📖 第 1 页 / 共 5 页
字号:
; Listing generated by Microsoft (R) Optimizing Compiler Version 13.10.4345 

	TTL	E:\WM604\PLATFORM\SEUICBSP\SRC\BOOTLOADER\EBOOT\.\main.c
	CODE32

  00000			 AREA	 |.drectve|, DRECTVE
	DCB	"-defaultlib:coredll.lib "
	DCB	"-defaultlib:corelibc.lib "

	EXPORT	|g_pBSPArgs| [ DATA ]
	EXPORT	|g_CompressionHeader| [ DATA ]
	EXPORT	|g_DecodeStream| [ DATA ]
	EXPORT	|g_fCompressed| [ DATA ]
	EXPORT	|g_ulFlashBase| [ DATA ]
	EXPORT	|g_ulFlashLengthBytes| [ DATA ]
	EXPORT	|g_ulBPartBase| [ DATA ]
	EXPORT	|g_ulBPartLengthBytes| [ DATA ]

  00000			 AREA	 |.data|, DATA
	 COMMON	|EdbgDebugZone|, 0x4

	 COMMON	|g_FlashInfo|, 0x10

	 COMMON	|g_DeviceAddr|, 0xc

	 COMMON	|strEbtPCCardSocketHandle|, 0x18

	 COMMON	|g_ImageType|, 0x4

	 COMMON	|g_dwMinImageStart|, 0x4

	 COMMON	|SecondaryFlashInfo|, 0x380


  00000			 AREA	 |.bss|, NOINIT
|g_CompressionHeader| % 0x4
|g_DecodeStream| % 0x4
|g_fCompressed| % 0x4

  00000			 AREA	 |.data|, DATA
	 COMMON	|CompressedData|, 0x1000


  0000c			 AREA	 |.bss|, NOINIT
|?dwCurRAMBase@?1??MyAlloc@@9@9| % 0x4			; `MyAlloc'::`2'::dwCurRAMBase

  00000			 AREA	 |.data|, DATA
|g_DownloadImage| DCB 0x1
	%	3
|g_ulBPartLengthBytes| DCD 0x80000
|g_ulBPartBase| DCD 0xa0040000
|g_ulFlashLengthBytes| DCD 0x3f40000
|g_ulFlashBase| DCD 0xc0000
|g_pBSPArgs| DCD 0xa00ff000

  00000			 AREA	 |.rdata|, DATA, READONLY
|EdbgVendorIds| DCW 0x0
	DCW	0x0
	DCD	0x4033
	DCB	0x1
	DCB	"AD", 0x0
	DCW	0x1050
	DCW	0x940
	DCD	0x4005
	DCB	0x1
	DCB	"LS", 0x0
	DCW	0x1050
	DCW	0x940
	DCD	0x2078
	DCB	0x1
	DCB	"LS", 0x0
	DCW	0x10ec
	DCW	0x8029
	DCD	0xc0f0
	DCB	0x1
	DCB	"KS", 0x0
	DCW	0x10ec
	DCW	0x8129
	DCD	0x0
	DCB	0x4
	DCB	"RT", 0x0
	DCW	0x10ec
	DCW	0x8139
	DCD	0x900b
	DCB	0x4
	DCB	"RT", 0x0
	DCW	0x10ec
	DCW	0x8139
	DCD	0xd0c9
	DCB	0x4
	DCB	"RT", 0x0
	DCW	0x10ec
	DCW	0x8139
	DCD	0xe04c
	DCB	0x4
	DCB	"RT", 0x0
	DCW	0x1186
	DCW	0x1300
	DCD	0x50ba
	DCB	0x4
	DCB	"DL", 0x0
	DCW	0x100b
	DCW	0x20
	DCD	0xa0cc
	DCB	0x5
	DCB	"NG", 0x0
	DCW	0x10b7
	DCW	0x9050
	DCD	0x6008
	DCB	0x6
	DCB	"3C", 0x0
	DCW	0x10b7
	DCW	0x9200
	DCD	0x476
	DCB	0x6
	DCB	"3C", 0x0
	EXPORT	|Get_UART_PA|
; File e:\wm604\platform\seuicbsp\src\bootloader\eboot\main.c

  00000			 AREA	 |.text| { |Get_UART_PA| }, CODE, ARM, SELECTION=1 ; comdat noduplicate

  00000			 AREA	 |.pdata$$Get_UART_PA|, PDATA, SELECTION=5, ASSOC=|.text| { |Get_UART_PA| } ; comdat associative
|$T45159| DCD	|$L45158|
	DCD	0x40000a00
; Function compile flags: /Ogsy

  00000			 AREA	 |.text| { |Get_UART_PA| }, CODE, ARM, SELECTION=1 ; comdat noduplicate

  00000		 |Get_UART_PA| PROC

; 147  :     {

  00000		 |$L45158|
  00000		 |$M45156|

; 148  :         EBOOT_CFG *p;
; 149  :         unsigned long ppa;
; 150  :     p = (EBOOT_CFG *)IMAGE_BOOT_CONFIG_FLASH_PA_START;
; 151  :     ppa = p->dwDbgSerPhysAddr;

  00000	e3a03701	 mov         r3, #1, 14
  00004	e5933028	 ldr         r3, [r3, #0x28]
  00008	e1b00003	 movs        r0, r3

; 152  :     // sanity check the port address
; 153  :     if ((ppa == 0) || ((ppa & 0xff0fffff) != 0x40000000))

  0000c	0a000002	 beq         |$L44282|
  00010	e3c0360f	 bic         r3, r0, #0xF, 12
  00014	e3530101	 cmp         r3, #1, 2
  00018	0a000001	 beq         |$L44281|
  0001c		 |$L44282|

; 154  :         ppa = BULVERDE_BASE_REG_PA_FFUART;        

  0001c	e3a00101	 mov         r0, #1, 2
  00020	e3800601	 orr         r0, r0, #1, 12
  00024		 |$L44281|

; 155  :     return(ppa);
; 156  :     }

  00024	e12fff1e	 bx          lr
  00028		 |$M45157|

			 ENDP  ; |Get_UART_PA|

	EXPORT	|main|
	IMPORT	|BootloaderMain|
	IMPORT	|SpinForever|

  00000			 AREA	 |.text| { |main| }, CODE, ARM, SELECTION=1 ; comdat noduplicate

  00000			 AREA	 |.pdata$$main|, PDATA, SELECTION=5, ASSOC=|.text| { |main| } ; comdat associative
|$T45168| DCD	|$L45167|
	DCD	0x40000601
; Function compile flags: /Ogsy

  00000			 AREA	 |.text| { |main| }, CODE, ARM, SELECTION=1 ; comdat noduplicate

  00000		 |main|	 PROC

; 164  : {

  00000		 |$L45167|
  00000	e52de004	 str         lr, [sp, #-4]!
  00004		 |$M45165|

; 165  :     // Common boot loader (blcommon) main routine.
; 166  :     //
; 167  :     BootloaderMain();

  00004	eb000000	 bl          BootloaderMain

; 168  : 
; 169  :     // Should never get here.
; 170  :     //
; 171  :     SpinForever();

  00008	eb000000	 bl          SpinForever

; 172  : 
; 173  : }

  0000c	e3a00000	 mov         r0, #0
  00010	e49de004	 ldr         lr, [sp], #4
  00014	e12fff1e	 bx          lr
  00018		 |$M45166|

			 ENDP  ; |main|

	EXPORT	|OEMDownloadFileNotify|
	EXPORT	|??_C@_0BP@BJOMPMIH@?$AN?6Download?5file?5information?3?$AN?6?$AA@| [ DATA ] ; `string'
	EXPORT	|??_C@_0FC@PGPOMBFM@?9?9?9?9?9?9?9?9?9?9?9?9?9?9?9?9?9?9?9?9?9?9?9?9?9?9?9?9?9?9?9?9@| [ DATA ] ; `string'
	EXPORT	|??_C@_0CL@KAFGOLIN@?$FL?$CFd?$FN?3?5Address?$DN0x?$CFx?5?5Length?$DN0x?$CFx?5@| [ DATA ] ; `string'
	EXPORT	|??_C@_0FB@CDAOIDMN@ERROR?3?5This?5bootloader?5doesn?8t?5s@| [ DATA ] ; `string'
	EXPORT	|??_C@_0CO@LHKKHCIE@INFO?3?5Changed?5start?5address?5for?5@| [ DATA ] ; `string'
	EXPORT	|??_C@_02PCIJFNDE@?$AN?6?$AA@| [ DATA ]	; `string'
	IMPORT	|EdbgOutputDebugString|
	IMPORT	|OALPAtoVA|

  00000			 AREA	 |.text| { |OEMDownloadFileNotify| }, CODE, ARM, SELECTION=1 ; comdat noduplicate

  00000			 AREA	 |.pdata$$OEMDownloadFileNotify|, PDATA, SELECTION=5, ASSOC=|.text| { |OEMDownloadFileNotify| } ; comdat associative
|$T45180| DCD	|$L45179|
	DCD	0x40003702

  00000			 AREA	 |.rdata| { |??_C@_02PCIJFNDE@?$AN?6?$AA@| }, DATA, READONLY, SELECTION=2 ; comdat any
|??_C@_02PCIJFNDE@?$AN?6?$AA@| DCB 0xd, 0xa, 0x0	; `string'

  00000			 AREA	 |.rdata| { |??_C@_0CO@LHKKHCIE@INFO?3?5Changed?5start?5address?5for?5@| }, DATA, READONLY, SELECTION=2 ; comdat any
|??_C@_0CO@LHKKHCIE@INFO?3?5Changed?5start?5address?5for?5@| DCB "INFO: C"
	DCB	"hanged start address for %s to 0x%x.", 0xd, 0xa, 0x0 ; `string'

  00000			 AREA	 |.rdata| { |??_C@_0FB@CDAOIDMN@ERROR?3?5This?5bootloader?5doesn?8t?5s@| }, DATA, READONLY, SELECTION=2 ; comdat any
|??_C@_0FB@CDAOIDMN@ERROR?3?5This?5bootloader?5doesn?8t?5s@| DCB "ERROR: "
	DCB	"This bootloader doesn't support downloading a second .nb"
	DCB	"0 binary image.", 0xd, 0xa, 0x0	; `string'

  00000			 AREA	 |.rdata| { |??_C@_0CL@KAFGOLIN@?$FL?$CFd?$FN?3?5Address?$DN0x?$CFx?5?5Length?$DN0x?$CFx?5@| }, DATA, READONLY, SELECTION=2 ; comdat any
|??_C@_0CL@KAFGOLIN@?$FL?$CFd?$FN?3?5Address?$DN0x?$CFx?5?5Length?$DN0x?$CFx?5@| DCB "["
	DCB	"%d]: Address=0x%x  Length=0x%x  Name=%s", 0xd, 0xa, 0x0 ; `string'

  00000			 AREA	 |.rdata| { |??_C@_0BP@BJOMPMIH@?$AN?6Download?5file?5information?3?$AN?6?$AA@| }, DATA, READONLY, SELECTION=2 ; comdat any
|??_C@_0BP@BJOMPMIH@?$AN?6Download?5file?5information?3?$AN?6?$AA@| DCB 0xd
	DCB	0xa, "Download file information:", 0xd, 0xa, 0x0 ; `string'

  00000			 AREA	 |.rdata| { |??_C@_0FC@PGPOMBFM@?9?9?9?9?9?9?9?9?9?9?9?9?9?9?9?9?9?9?9?9?9?9?9?9?9?9?9?9?9?9?9?9@| }, DATA, READONLY, SELECTION=2 ; comdat any
|??_C@_0FC@PGPOMBFM@?9?9?9?9?9?9?9?9?9?9?9?9?9?9?9?9?9?9?9?9?9?9?9?9?9?9?9?9?9?9?9?9@| DCB "-"
	DCB	"--------------------------------------------------------"
	DCB	"----------------------", 0xd, 0xa, 0x0	; `string'
; Function compile flags: /Ogsy

  00000			 AREA	 |.text| { |OEMDownloadFileNotify| }, CODE, ARM, SELECTION=1 ; comdat noduplicate

  00000		 |OEMDownloadFileNotify| PROC

; 187  : {

  00000		 |$L45179|
  00000	e92d41f0	 stmdb       sp!, {r4 - r8, lr}
  00004	e24dd004	 sub         sp, sp, #4
  00008		 |$M45177|
  00008	e1b04000	 movs        r4, r0

; 188  :     DWORD dwCount;
; 189  :     DWORD dwNumNB0Files = 0;

  0000c	e3a07000	 mov         r7, #0

; 190  : 
; 191  :     if (!pInfo) return;

  00010	0a000028	 beq         |$L44289|

; 192  : 
; 193  :     EdbgOutputDebugString("\r\nDownload file information:\r\n");

  00014	e59f00bc	 ldr         r0, [pc, #0xBC]
  00018	eb000000	 bl          EdbgOutputDebugString

; 194  :     EdbgOutputDebugString("-------------------------------------------------------------------------------\r\n");

  0001c	e59f00b0	 ldr         r0, [pc, #0xB0]
  00020	eb000000	 bl          EdbgOutputDebugString

; 195  : 
; 196  :     for (dwCount = 0 ; dwCount < pInfo->dwNumRegions ; dwCount++)

  00024	e5943000	 ldr         r3, [r4]
  00028	e3a06000	 mov         r6, #0
  0002c	e3530000	 cmp         r3, #0
  00030	9a00001e	 bls         |$L44297|
  00034	e1a05004	 mov         r5, r4
  00038		 |$L44295|

; 197  :     {
; 198  : 
; 199  :         EdbgOutputDebugString("[%d]: Address=0x%x  Length=0x%x  Name=%s\r\n", dwCount, 
; 200  :                                                                               pInfo->Region[dwCount].dwRegionStart, 
; 201  :                                                                               pInfo->Region[dwCount].dwRegionLength, 
; 202  :                                                                               pInfo->Region[dwCount].szFileName);

  00038	e5953008	 ldr         r3, [r5, #8]
  0003c	e5952004	 ldr         r2, [r5, #4]
  00040	e59f0088	 ldr         r0, [pc, #0x88]
  00044	e285800c	 add         r8, r5, #0xC
  00048	e1a01006	 mov         r1, r6
  0004c	e58d8000	 str         r8, [sp]
  00050	eb000000	 bl          EdbgOutputDebugString

; 203  : 
; 204  :         // .nb0 files will have a start address of 0 because Platform Builder
; 205  :         // won't know where to place them.  We'll support only one .nb0 file
; 206  :         // download (this is an Image Update disk image).  If we need to
; 207  :         // support more than one .nb0 file download in the future, we'll need
; 208  :         // to differentiate them by filename.
; 209  :         //
; 210  :         if (pInfo->Region[dwCount].dwRegionStart == 0)

  00054	e5953004	 ldr         r3, [r5, #4]
  00058	e3530000	 cmp         r3, #0
  0005c	1a00000e	 bne         |$L44296|

; 211  :         {
; 212  :             // We only support one raw binary file (disk image).
; 213  :             if (dwNumNB0Files++)

  00060	e3570000	 cmp         r7, #0
  00064	e2877001	 add         r7, r7, #1
  00068	0a000002	 beq         |$L44300|

; 214  :             {
; 215  :                 EdbgOutputDebugString("ERROR: This bootloader doesn't support downloading a second .nb0 binary image.\r\n");

  0006c	e59f0058	 ldr         r0, [pc, #0x58]
  00070	eb000000	 bl          EdbgOutputDebugString

; 216  :                 SpinForever();

  00074	eb000000	 bl          SpinForever
  00078		 |$L44300|

; 217  :             }
; 218  : 
; 219  :             // The disk image .nb0 file should be placed immediately after the
; 220  :             // bootloader image in flash (we'll assume that the disk image has the IPL prepended to it).
; 221  :             pInfo->Region[dwCount].dwRegionStart = (DWORD)OALPAtoVA(MAINSTONEII_BASE_PA_SECONDARY_FLASH, FALSE);

  00078	e3a01000	 mov         r1, #0
  0007c	e3a00301	 mov         r0, #1, 6
  00080	eb000000	 bl          OALPAtoVA
  00084	e1a03000	 mov         r3, r0

; 222  : 
; 223  :             EdbgOutputDebugString("INFO: Changed start address for %s to 0x%x.\r\n", pInfo->Region[dwCount].szFileName, 
; 224  :                                                                                      pInfo->Region[dwCount].dwRegionStart);

  00088	e59f0038	 ldr         r0, [pc, #0x38]
  0008c	e1a02003	 mov         r2, r3
  00090	e1a01008	 mov         r1, r8
  00094	e5853004	 str         r3, [r5, #4]
  00098	eb000000	 bl          EdbgOutputDebugString
  0009c		 |$L44296|
  0009c	e5943000	 ldr         r3, [r4]
  000a0	e2866001	 add         r6, r6, #1
  000a4	e2855f43	 add         r5, r5, #0x43, 30
  000a8	e1560003	 cmp         r6, r3
  000ac	3affffe1	 bcc         |$L44295|
  000b0		 |$L44297|

; 225  : 
; 226  :         }
; 227  :     }
; 228  : 
; 229  :     EdbgOutputDebugString("\r\n");

  000b0	e59f000c	 ldr         r0, [pc, #0xC]
  000b4	eb000000	 bl          EdbgOutputDebugString
  000b8		 |$L44289|

; 230  : 
; 231  :     return;
; 232  : }

  000b8	e28dd004	 add         sp, sp, #4
  000bc	e8bd41f0	 ldmia       sp!, {r4 - r8, lr}
  000c0	e12fff1e	 bx          lr
  000c4		 |$L45182|
  000c4	00000000	 DCD         |??_C@_02PCIJFNDE@?$AN?6?$AA@|
  000c8	00000000	 DCD         |??_C@_0CO@LHKKHCIE@INFO?3?5Changed?5start?5address?5for?5@|
  000cc	00000000	 DCD         |??_C@_0FB@CDAOIDMN@ERROR?3?5This?5bootloader?5doesn?8t?5s@|

⌨️ 快捷键说明

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