📄 main.cod
字号:
001e4 e5d50011 ldrb r0, [r5, #0x11]
001e8 e1823801 orr r3, r2, r1, lsl #16
001ec e1830c00 orr r0, r3, r0, lsl #24
001f0 eb000000 bl inet_ntoa
001f4 e5d51012 ldrb r1, [r5, #0x12]
001f8 e1a04000 mov r4, r0
001fc e5d50013 ldrb r0, [r5, #0x13]
00200 e1813400 orr r3, r1, r0, lsl #8
00204 e1a01403 mov r1, r3, lsl #8
00208 e1a00801 mov r0, r1, lsl #16
0020c e1a02820 mov r2, r0, lsr #16
00210 e1a01802 mov r1, r2, lsl #16
00214 e1a00821 mov r0, r1, lsr #16
00218 e1802423 orr r2, r0, r3, lsr #8
0021c e59f00bc ldr r0, [pc, #0xBC]
00220 e1a01004 mov r1, r4
00224 eb000000 bl EdbgOutputDebugString
; 165 : memcpy((void *)&pDriverGlobals->eth.KdbgHostAddr.wMAC, (void *)&EshellHostAddr.wMAC,6);
00228 e3a00b22 mov r0, #0x22, 22
0022c e3800044 orr r0, r0, #0x44
00230 e28d1004 add r1, sp, #4
00234 e3a02006 mov r2, #6
00238 eb000000 bl memcpy
; 166 : pDriverGlobals->eth.KdbgHostAddr.dwIP = pCfgData->KdbgIPAddr;
0023c e5d5100e ldrb r1, [r5, #0xE]
00240 e5d5000f ldrb r0, [r5, #0xF]
00244 e3a04b22 mov r4, #0x22, 22
00248 e3844040 orr r4, r4, #0x40
0024c e1812400 orr r2, r1, r0, lsl #8
00250 e5d51010 ldrb r1, [r5, #0x10]
00254 e5d50011 ldrb r0, [r5, #0x11]
00258 e1823801 orr r3, r2, r1, lsl #16
0025c e1831c00 orr r1, r3, r0, lsl #24
00260 e5841000 str r1, [r4]
; 167 : pDriverGlobals->eth.KdbgHostAddr.wPort = pCfgData->KdbgPort;
00264 e3a02b22 mov r2, #0x22, 22
00268 e5d51012 ldrb r1, [r5, #0x12]
0026c e382204a orr r2, r2, #0x4A
00270 e5d50013 ldrb r0, [r5, #0x13]
00274 e1811400 orr r1, r1, r0, lsl #8
00278 e1c210b0 strh r1, [r2]
0027c |$L37564|
; 168 : }
; 169 : pDriverGlobals->eth.etherFlags = pCfgData->Flags;
0027c e3a01b22 mov r1, #0x22, 22
00280 e5d50000 ldrb r0, [r5]
00284 e3811005 orr r1, r1, #5
00288 e5c10000 strb r0, [r1]
; 170 :
; 171 : //
; 172 : // This is also referred to the "ODO" mac address. Only the MAC is valid in this variable.
; 173 : //
; 174 : memcpy((void *)&pDriverGlobals->eth.EshellHostAddr, (void *)&EshellHostAddr,sizeof(EDBG_ADDR));
0028c e3a00b22 mov r0, #0x22, 22
00290 e3800028 orr r0, r0, #0x28
00294 e28d1000 add r1, sp, #0
00298 e3a0200c mov r2, #0xC
0029c eb000000 bl memcpy
002a0 |$L37535|
; 175 : }
; 176 : else
; 177 : {
; 178 : //
; 179 : // It is ether a parallel port or a hard driver download.
; 180 : //
; 181 :
; 182 : }
; 183 :
; 184 : // If no jump address is specified, choose the default (flash address).
; 185 : //
; 186 : if (!dwLaunchAddr)
002a0 e3570000 cmp r7, #0
; 187 : {
; 188 : //dwLaunchAddr = DEFAULT_JUMP_ADDR;
; 189 : SpinForever();
002a4 0b000000 bleq SpinForever
; 190 : }
; 191 :
; 192 :
; 193 : EdbgOutputDebugString("INFO: Jumping to image at 0x%X...\r\n", dwLaunchAddr);
002a8 e59f002c ldr r0, [pc, #0x2C]
002ac e1a01007 mov r1, r7
002b0 eb000000 bl EdbgOutputDebugString
; 194 :
; 195 : //
; 196 : // Delay 1 Millisecond to flush the Uart fifo and stop the UART.
; 197 : //
; 198 : if(bEthLaunch)
002b4 e5963000 ldr r3, [r6]
002b8 e3530000 cmp r3, #0
; 199 : {
; 200 : DelayInuSec(1000);
002bc 13a00ffa movne r0, #0xFA, 30
002c0 1b000000 blne DelayInuSec
; 201 : // OEMUartStop();
; 202 : }
; 203 :
; 204 :
; 205 : ((PFN_LAUNCH)(dwLaunchAddr))();
002c4 e1a0e00f mov lr, pc
002c8 e12fff17 bx r7
; 206 :
; 207 : // Should never be reached...
; 208 : SpinForever();
002cc eb000000 bl SpinForever
; 209 : }
002d0 e28dd00c add sp, sp, #0xC
002d4 e8bd40f0 ldmia sp!, {r4 - r7, lr}
002d8 e12fff1e bx lr
002dc |$L37669|
002dc 00000000 DCD |??_C@_0CE@HOK@INFO?3?5Jumping?5to?5image?5at?50x?$CFX?4?4@|
002e0 00000000 DCD |??_C@_0DI@HAGA@Enabling?5KDBG?5over?5Ethernet?0?5?5?5?5@|
002e4 00000000 DCD |??_C@_0DI@EBJP@Enabling?5CESH?5over?5Ethernet?0?5?5?5?5@|
002e8 00000000 DCD |??_C@_0DI@JEIJ@Enabling?5debug?5messages?5over?5Eth@|
002ec 00000000 DCD |??_C@_0CJ@JILK@EBOOT?3?5pCfgData?5?$DN?50x?$CFx?0?5pCfgData@|
002f0 00000000 DCD |??_C@_0DG@MOBB@ERROR?3?5EbootWaitForHostConenct?5f@|
002f4 00000000 DCD |bEthLaunch|
002f8 |$M37666|
ENDP ; |OEMLaunch|
EXPORT |??_C@_0BB@IODD@SpinForever?4?4?4?$AN?6?$AA@| [ DATA ] ; `string'
00000 AREA |.text| { |SpinForever| }, CODE, ARM, SELECTION=1 ; comdat noduplicate
00000 AREA |.pdata$$SpinForever|, PDATA, SELECTION=5, ASSOC=|.text| { |SpinForever| } ; comdat associative
|$T37675| DCD |SpinForever|
DCD 0x40000501
00000 AREA |.rdata| { |??_C@_0BB@IODD@SpinForever?4?4?4?$AN?6?$AA@| }, DATA, READONLY, SELECTION=2 ; comdat any
|??_C@_0BB@IODD@SpinForever?4?4?4?$AN?6?$AA@| DCB "SpinForever...", 0xd, 0xa
DCB 0x0 ; `string'
; Function compile flags: /Ogsy
00000 AREA |.text| { |SpinForever| }, CODE, ARM, SELECTION=1 ; comdat noduplicate
00000 |SpinForever| PROC
; 99 : {
00000 e52de004 str lr, [sp, #-4]!
00004 |$M37673|
; 100 : EdbgOutputDebugString("SpinForever...\r\n");
00004 e59f0004 ldr r0, [pc, #4]
00008 eb000000 bl EdbgOutputDebugString
0000c |$L37522|
; 101 :
; 102 : while(1)
; 103 : {
; 104 : ;
; 105 : }
0000c eafffffe b |$L37522|
00010 |$L37677|
00010 00000000 DCD |??_C@_0BB@IODD@SpinForever?4?4?4?$AN?6?$AA@|
00014 |$M37674|
ENDP ; |SpinForever|
EXPORT |OEMShowProgress|
00000 AREA |.text| { |OEMShowProgress| }, CODE, ARM, SELECTION=1 ; comdat noduplicate
00000 AREA |.pdata$$OEMShowProgress|, PDATA, SELECTION=5, ASSOC=|.text| { |OEMShowProgress| } ; comdat associative
|$T37682| DCD |OEMShowProgress|
DCD 0x40000100
; Function compile flags: /Ogsy
00000 AREA |.text| { |OEMShowProgress| }, CODE, ARM, SELECTION=1 ; comdat noduplicate
00000 |OEMShowProgress| PROC
; 223 : {
00000 |$M37680|
; 224 : return;
; 225 : }
00000 e12fff1e bx lr
00004 |$M37681|
ENDP ; |OEMShowProgress|
EXPORT |OEMReadData|
00000 AREA |.text| { |OEMReadData| }, CODE, ARM, SELECTION=1 ; comdat noduplicate
00000 AREA |.pdata$$OEMReadData|, PDATA, SELECTION=5, ASSOC=|.text| { |OEMReadData| } ; comdat associative
|$T37692| DCD |OEMReadData|
DCD 0x40000f01
; Function compile flags: /Ogsy
00000 AREA |.text| { |OEMReadData| }, CODE, ARM, SELECTION=1 ; comdat noduplicate
00000 |OEMReadData| PROC
; 236 : {
00000 e92d4010 stmdb sp!, {r4, lr}
00004 |$M37690|
00004 e1a03000 mov r3, r0
; 237 : BOOL bReturnValue = FALSE;
; 238 :
; 239 : //
; 240 : // Read the data in from the device.
; 241 : //
; 242 : if(pfnReadData)
00008 e59f0028 ldr r0, [pc, #0x28]
0000c e3a04000 mov r4, #0
00010 e5902000 ldr r2, [r0]
00014 e3520000 cmp r2, #0
00018 0a000003 beq |$L37594|
; 243 : bReturnValue = pfnReadData(cbData, pbData);
0001c e1a00003 mov r0, r3
00020 e1a0e00f mov lr, pc
00024 e12fff12 bx r2
00028 e1a04000 mov r4, r0
0002c |$L37594|
; 244 :
; 245 : return bReturnValue;
0002c e1a00004 mov r0, r4
; 246 : }
00030 e8bd4010 ldmia sp!, {r4, lr}
00034 e12fff1e bx lr
00038 |$L37694|
00038 00000000 DCD |pfnReadData|
0003c |$M37691|
ENDP ; |OEMReadData|
EXPORT |EbootMain|
IMPORT |OEMWriteDebugLED|
IMPORT |BootloaderMain|
00000 AREA |.text| { |EbootMain| }, CODE, ARM, SELECTION=1 ; comdat noduplicate
00000 AREA |.pdata$$EbootMain|, PDATA, SELECTION=5, ASSOC=|.text| { |EbootMain| } ; comdat associative
|$T37699| DCD |EbootMain|
DCD 0x40000d01
; Function compile flags: /Ogsy
00000 AREA |.text| { |EbootMain| }, CODE, ARM, SELECTION=1 ; comdat noduplicate
00000 |EbootMain| PROC
; 255 : {
00000 e52de004 str lr, [sp, #-4]!
00004 |$M37697|
; 256 :
; 257 : //
; 258 : // Write protect the flash.
; 259 : //
; 260 : *SMC_SMCBCR6 = 0x2000FFFF;
00004 e59f1024 ldr r1, [pc, #0x24]
00008 e59f001c ldr r0, [pc, #0x1C]
0000c e5810000 str r0, [r1]
; 261 :
; 262 : //
; 263 : // Turn off the Green LED as recommended in the SDB
; 264 : // documentation 3.2.4.
; 265 : //
; 266 : OEMWriteDebugLED(0,0);
00010 e3a01000 mov r1, #0
00014 e3a00000 mov r0, #0
00018 eb000000 bl OEMWriteDebugLED
; 267 :
; 268 : //
; 269 : // Common bootloader main routine.
; 270 : //
; 271 : BootloaderMain();
0001c eb000000 bl BootloaderMain
; 272 :
; 273 : //
; 274 : // Should never get here.
; 275 : //
; 276 : SpinForever();
00020 eb000000 bl SpinForever
; 277 : }
00024 e8bd4000 ldmia sp!, {lr}
00028 e12fff1e bx lr
0002c |$L37701|
0002c 2000ffff DCD 0x2000ffff
00030 80080018 DCD 0x80080018
00034 |$M37698|
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -