📄 main.cod
字号:
00250 e3830050 orr r0, r3, #0x50
00254 eb000000 bl memcpy
; 174 : pDriverGlobals->eth.PpshHostAddr.dwIP = pCfgData->PpshIPAddr;
00258 e59d300c ldr r3, [sp, #0xC]
0025c e2830008 add r0, r3, #8
00260 e3a03b22 mov r3, #0x22, 22
00264 e383104c orr r1, r3, #0x4C
00268 e5d03003 ldrb r3, [r0, #3]
0026c e1a02403 mov r2, r3, lsl #8
00270 e5d03002 ldrb r3, [r0, #2]
00274 e1833002 orr r3, r3, r2
00278 e1a02403 mov r2, r3, lsl #8
0027c e5d03001 ldrb r3, [r0, #1]
00280 e1833002 orr r3, r3, r2
00284 e1a02403 mov r2, r3, lsl #8
00288 e5d03000 ldrb r3, [r0]
0028c e1833002 orr r3, r3, r2
00290 e5813000 str r3, [r1]
; 175 : pDriverGlobals->eth.PpshHostAddr.wPort = pCfgData->PpshPort;
00294 e59d300c ldr r3, [sp, #0xC]
00298 e283000c add r0, r3, #0xC
0029c e3a03b22 mov r3, #0x22, 22
002a0 e3831056 orr r1, r3, #0x56
002a4 e5d03001 ldrb r3, [r0, #1]
002a8 e1a03403 mov r3, r3, lsl #8
002ac e1a02803 mov r2, r3, lsl #16
002b0 e1a02822 mov r2, r2, lsr #16
002b4 e5d03000 ldrb r3, [r0]
002b8 e1833002 orr r3, r3, r2
002bc e1c130b0 strh r3, [r1]
002c0 |$L39395|
; 176 : }
; 177 : if (pCfgData->Flags & EDBG_FL_KDBG)
002c0 e59d300c ldr r3, [sp, #0xC]
002c4 e5d33000 ldrb r3, [r3]
002c8 e3130004 tst r3, #4
002cc 0a000044 beq |$L39406|
; 178 : {
; 179 : EdbgOutputDebugString("Enabling KDBG over Ethernet, IP: %s, port:%u\n",
; 180 : inet_ntoa(pCfgData->KdbgIPAddr),ntohs(pCfgData->KdbgPort));
002d0 e59d300c ldr r3, [sp, #0xC]
002d4 e283100e add r1, r3, #0xE
002d8 e5d13003 ldrb r3, [r1, #3]
002dc e1a02403 mov r2, r3, lsl #8
002e0 e5d13002 ldrb r3, [r1, #2]
002e4 e1833002 orr r3, r3, r2
002e8 e1a02403 mov r2, r3, lsl #8
002ec e5d13001 ldrb r3, [r1, #1]
002f0 e1833002 orr r3, r3, r2
002f4 e1a02403 mov r2, r3, lsl #8
002f8 e5d13000 ldrb r3, [r1]
002fc e1830002 orr r0, r3, r2
00300 eb000000 bl inet_ntoa
00304 e58d001c str r0, [sp, #0x1C]
00308 e59d300c ldr r3, [sp, #0xC]
0030c e2831012 add r1, r3, #0x12
00310 e5d13001 ldrb r3, [r1, #1]
00314 e1a03403 mov r3, r3, lsl #8
00318 e1a02803 mov r2, r3, lsl #16
0031c e1a02822 mov r2, r2, lsr #16
00320 e5d13000 ldrb r3, [r1]
00324 e1833002 orr r3, r3, r2
00328 e1a00403 mov r0, r3, lsl #8
0032c e59d300c ldr r3, [sp, #0xC]
00330 e2831012 add r1, r3, #0x12
00334 e5d13001 ldrb r3, [r1, #1]
00338 e1a03403 mov r3, r3, lsl #8
0033c e1a02803 mov r2, r3, lsl #16
00340 e1a02822 mov r2, r2, lsr #16
00344 e5d13000 ldrb r3, [r1]
00348 e1833002 orr r3, r3, r2
0034c e1a03443 mov r3, r3, asr #8
00350 e1803003 orr r3, r0, r3
00354 e1a02803 mov r2, r3, lsl #16
00358 e1a02822 mov r2, r2, lsr #16
0035c e59d101c ldr r1, [sp, #0x1C]
00360 e59f00fc ldr r0, [pc, #0xFC]
00364 eb000000 bl EdbgOutputDebugString
; 181 : memcpy((void *)&pDriverGlobals->eth.KdbgHostAddr.wMAC, (void *)&EshellHostAddr.wMAC,6);
00368 e3a02006 mov r2, #6
0036c e28d1004 add r1, sp, #4
00370 e3a03b22 mov r3, #0x22, 22
00374 e3830044 orr r0, r3, #0x44
00378 eb000000 bl memcpy
; 182 : pDriverGlobals->eth.KdbgHostAddr.dwIP = pCfgData->KdbgIPAddr;
0037c e59d300c ldr r3, [sp, #0xC]
00380 e283000e add r0, r3, #0xE
00384 e3a03b22 mov r3, #0x22, 22
00388 e3831040 orr r1, r3, #0x40
0038c e5d03003 ldrb r3, [r0, #3]
00390 e1a02403 mov r2, r3, lsl #8
00394 e5d03002 ldrb r3, [r0, #2]
00398 e1833002 orr r3, r3, r2
0039c e1a02403 mov r2, r3, lsl #8
003a0 e5d03001 ldrb r3, [r0, #1]
003a4 e1833002 orr r3, r3, r2
003a8 e1a02403 mov r2, r3, lsl #8
003ac e5d03000 ldrb r3, [r0]
003b0 e1833002 orr r3, r3, r2
003b4 e5813000 str r3, [r1]
; 183 : pDriverGlobals->eth.KdbgHostAddr.wPort = pCfgData->KdbgPort;
003b8 e59d300c ldr r3, [sp, #0xC]
003bc e2830012 add r0, r3, #0x12
003c0 e3a03b22 mov r3, #0x22, 22
003c4 e383104a orr r1, r3, #0x4A
003c8 e5d03001 ldrb r3, [r0, #1]
003cc e1a03403 mov r3, r3, lsl #8
003d0 e1a02803 mov r2, r3, lsl #16
003d4 e1a02822 mov r2, r2, lsr #16
003d8 e5d03000 ldrb r3, [r0]
003dc e1833002 orr r3, r3, r2
003e0 e1c130b0 strh r3, [r1]
003e4 |$L39406|
; 184 : }
; 185 : pDriverGlobals->eth.etherFlags = pCfgData->Flags;
003e4 e3a03b22 mov r3, #0x22, 22
003e8 e3832005 orr r2, r3, #5
003ec e59d300c ldr r3, [sp, #0xC]
003f0 e5d33000 ldrb r3, [r3]
003f4 e5c23000 strb r3, [r2]
; 186 :
; 187 : //
; 188 : // This is also referred to the "ODO" mac address. Only the MAC is valid in this variable.
; 189 : //
; 190 : memcpy((void *)&pDriverGlobals->eth.EshellHostAddr, (void *)&EshellHostAddr,sizeof(EDBG_ADDR));
003f8 e3a0200c mov r2, #0xC
003fc e28d1000 add r1, sp, #0
00400 e3a03b22 mov r3, #0x22, 22
00404 e3830028 orr r0, r3, #0x28
00408 eb000000 bl memcpy
0040c |$L39377|
; 191 : }
; 192 : else
; 193 : {
; 194 : //
; 195 : // It is ether a parallel port or a hard driver download.
; 196 : //
; 197 : }
; 198 :
; 199 : // If no jump address is specified, choose the default (flash address).
; 200 : //
; 201 : if (!dwLaunchAddr)
0040c e59d3030 ldr r3, [sp, #0x30]
00410 e3530000 cmp r3, #0
00414 1a000000 bne |$L39423|
; 202 : {
; 203 : //dwLaunchAddr = DEFAULT_JUMP_ADDR;
; 204 : SpinForever();
00418 eb000000 bl SpinForever
0041c |$L39423|
; 205 : }
; 206 :
; 207 :
; 208 : EdbgOutputDebugString("INFO: Jumping to image at 0x%X...\r\n", dwLaunchAddr);
0041c e59d1030 ldr r1, [sp, #0x30]
00420 e59f0038 ldr r0, [pc, #0x38]
00424 eb000000 bl EdbgOutputDebugString
; 209 :
; 210 : //
; 211 : // Delay 1 Millisecond to flush the Uart fifo and stop the UART.
; 212 : //
; 213 : if(bEthLaunch)
00428 e59f302c ldr r3, [pc, #0x2C]
0042c e5933000 ldr r3, [r3]
00430 e3530000 cmp r3, #0
00434 0a000001 beq |$L39425|
; 214 : {
; 215 : DelayInuSec(1000);
00438 e3a00ffa mov r0, #0xFA, 30
0043c eb000000 bl DelayInuSec
00440 |$L39425|
; 216 : // OEMUartStop();
; 217 : }
; 218 :
; 219 :
; 220 : ((PFN_LAUNCH)(dwLaunchAddr))();
00440 e59d3030 ldr r3, [sp, #0x30]
00444 e1a0e00f mov lr, pc
00448 e12fff13 bx r3
; 221 :
; 222 : // Should never be reached...
; 223 : SpinForever();
0044c eb000000 bl SpinForever
; 224 : }
00450 e28dd020 add sp, sp, #0x20
00454 e89d6000 ldmia sp, {sp, lr}
00458 e12fff1e bx lr
0045c |$L39505|
0045c 00000000 DCD |bEthLaunch|
00460 00000000 DCD |??_C@_0CE@IBJJNLHI@INFO?3?5Jumping?5to?5image?5at?50x?$CFX?4?4@|
00464 00000000 DCD |??_C@_0DI@NGLJEIDL@Enabling?5KDBG?5over?5Ethernet?0?5?5?5?5@|
00468 00000000 DCD |??_C@_0DI@JCOIGDHP@Enabling?5CESH?5over?5Ethernet?0?5?5?5?5@|
0046c 00000000 DCD |??_C@_0DI@BBOLALAE@Enabling?5debug?5messages?5over?5Eth@|
00470 00000000 DCD |??_C@_0CJ@BJAPMGEC@EBOOT?3?5pCfgData?5?$DN?50x?$CFx?0?5pCfgData@|
00474 00000000 DCD |??_C@_0DG@MAPNMLCE@ERROR?3?5EbootWaitForHostConenct?5f@|
00478 |$M39501|
ENDP ; |OEMLaunch|
EXPORT |??_C@_0BB@MEBHIIAP@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
|$T39511| DCD |$L39510|
DCD 0x40000501
00000 AREA |.rdata| { |??_C@_0BB@MEBHIIAP@SpinForever?4?4?4?$AN?6?$AA@| }, DATA, READONLY, SELECTION=2 ; comdat any
|??_C@_0BB@MEBHIIAP@SpinForever?4?4?4?$AN?6?$AA@| DCB "SpinForever...", 0xd
DCB 0xa, 0x0 ; `string'
; Function compile flags: /Ods
00000 AREA |.text| { |SpinForever| }, CODE, ARM, SELECTION=1 ; comdat noduplicate
00000 |SpinForever| PROC
; 115 : {
00000 |$L39510|
00000 e52de004 str lr, [sp, #-4]!
00004 |$M39508|
; 116 : EdbgOutputDebugString("SpinForever...\r\n");
00004 e59f0004 ldr r0, [pc, #4]
00008 eb000000 bl EdbgOutputDebugString
0000c |$L39364|
; 117 :
; 118 : while(1)
; 119 : {
; 120 : ;
; 121 : }
0000c eafffffe b |$L39364|
00010 |$L39513|
00010 00000000 DCD |??_C@_0BB@MEBHIIAP@SpinForever?4?4?4?$AN?6?$AA@|
00014 |$M39509|
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
|$T39519| DCD |$L39518|
DCD 0x40000503
; Function compile flags: /Ods
00000 AREA |.text| { |OEMShowProgress| }, CODE, ARM, SELECTION=1 ; comdat noduplicate
00000 |OEMShowProgress| PROC
; 238 : {
00000 |$L39518|
00000 e1a0c00d mov r12, sp
00004 e92d0001 stmdb sp!, {r0}
00008 e92d5000 stmdb sp!, {r12, lr}
0000c |$M39516|
; 239 : return;
; 240 : }
0000c e89d6000 ldmia sp, {sp, lr}
00010 e12fff1e bx lr
00014 |$M39517|
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
|$T39527| DCD |$L39526|
DCD 0x40001a04
; Function compile flags: /Ods
00000 AREA |.text| { |OEMReadData| }, CODE, ARM, SELECTION=1 ; comdat noduplicate
00000 |OEMReadData| PROC
; 251 : {
00000 |$L39526|
00000 e1a0c00d mov r12, sp
00004 e92d0003 stmdb sp!, {r0, r1}
00008 e92d5000 stmdb sp!, {r12, lr}
0000c e24dd00c sub sp, sp, #0xC
00010 |$M39524|
; 252 : BOOL bReturnValue = FALSE;
00010 e3a03000 mov r3, #0
00014 e58d3000 str r3, [sp]
; 253 :
; 254 : //
; 255 : // Read the data in from the device.
; 256 : //
; 257 : if(pfnReadData)
00018 e59f3044 ldr r3, [pc, #0x44]
0001c e5933000 ldr r3, [r3]
00020 e3530000 cmp r3, #0
00024 0a000008 beq |$L39436|
; 258 : bReturnValue = pfnReadData(cbData, pbData);
00028 e59d1018 ldr r1, [sp, #0x18]
0002c e59d0014 ldr r0, [sp, #0x14]
00030 e59f302c ldr r3, [pc, #0x2C]
00034 e5933000 ldr r3, [r3]
00038 e1a0e00f mov lr, pc
0003c e12fff13 bx r3
00040 e58d0008 str r0, [sp, #8]
00044 e59d3008 ldr r3, [sp, #8]
00048 e58d3000 str r3, [sp]
0004c |$L39436|
; 259 :
; 260 : return bReturnValue;
0004c e59d3000 ldr r3, [sp]
00050 e58d3004 str r3, [sp, #4]
00054 e59d0004 ldr r0, [sp, #4]
; 261 : }
00058 e28dd00c add sp, sp, #0xC
0005c e89d6000 ldmia sp, {sp, lr}
00060 e12fff1e bx lr
00064 |$L39529|
00064 00000000 DCD |pfnReadData|
00068 |$M39525|
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
|$T39535| DCD |$L39534|
DCD 0x40000801
; Function compile flags: /Ods
00000 AREA |.text| { |EbootMain| }, CODE, ARM, SELECTION=1 ; comdat noduplicate
00000 |EbootMain| PROC
; 270 : {
00000 |$L39534|
00000 e52de004 str lr, [sp, #-4]!
00004 |$M39532|
; 271 : // Turn off the Green LED as recommended in the SDB
; 272 : // documentation 3.2.4.
; 273 : //
; 274 : OEMWriteDebugLED(0,0);
00004 e3a01000 mov r1, #0
00008 e3a00000 mov r0, #0
0000c eb000000 bl OEMWriteDebugLED
; 275 :
; 276 : //
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -