📄 ether.cod
字号:
000f0 e5813000 str r3, [r1]
000f4 e3a03000 mov r3, #0
000f8 e5897000 str r7, [r9]
000fc e5885000 str r5, [r8]
00100 e586e000 str lr, [r6]
00104 e5842000 str r2, [r4]
00108 e58a3004 str r3, [r10, #4]
0010c e58a3008 str r3, [r10, #8]
00110 e59f01c4 ldr r0, [pc, #0x1C4]
00114 e3a03201 mov r3, #1, 4
00118 e3833c03 orr r3, r3, #3, 24
0011c e58a3010 str r3, [r10, #0x10]
00120 e58a300c str r3, [r10, #0xC]
00124 eb000000 bl EdbgOutputDebugString
; 359 : return(EDBG_ADAPTER_SMC9000);
00128 e3a00000 mov r0, #0
; 368 :
; 369 : }
0012c e8bd47f0 ldmia sp!, {r4 - r10, lr}
00130 e12fff1e bx lr
00134 |$L41945|
; 360 : }
; 361 : else
; 362 : {
; 363 : EdbgOutputDebugString("ERROR: Failed to initialize SMSC LAN91C111 Ethernet controller.\n");
00134 e59f019c ldr r0, [pc, #0x19C]
; 364 : }
; 365 : }
; 366 :
; 367 : return (-1);
00138 ea000054 b |$L42142|
; 264 : {
; 265 : // Determine the PCMCIA card type.
; 266 : //
; 267 : if (VerifyEthernetPCMCIACard(SlotAddress))
0013c |$L42117|
0013c e1520000 cmp r2, r0
00140 2a000053 bcs |$L41941|
00144 e5f23002 ldrb r3, [r2, #2]!
00148 e2833001 add r3, r3, #1
0014c e7f23083 ldrb r3, [r2, +r3, lsl #1]!
00150 e3530021 cmp r3, #0x21
00154 1afffff8 bne |$L42117|
00158 e1520000 cmp r2, r0
0015c 2a00004c bcs |$L41941|
00160 e5f23002 ldrb r3, [r2, #2]!
00164 e3530002 cmp r3, #2
00168 1a000049 bne |$L41941|
0016c e5d23002 ldrb r3, [r2, #2]
00170 e3530006 cmp r3, #6
00174 1a000046 bne |$L41941|
; 268 : {
; 269 : if ((((pBLRegs->pcmcia0_srcr & PCMCIA_POWER) == PCMCIA_VCC5V_VPP0V) && (EthDevice == ETH_DEVICE_PCMCIA0)) ||
; 270 : (((pBLRegs->pcmcia1_srcr & PCMCIA_POWER) == PCMCIA_VCC5V_VPP0V) && (EthDevice == ETH_DEVICE_PCMCIA1)))
00178 e59530e0 ldr r3, [r5, #0xE0]
0017c e203300f and r3, r3, #0xF
00180 e3530004 cmp r3, #4
00184 1a000001 bne |$L41927|
00188 e3590000 cmp r9, #0
0018c 0a00000d beq |$L42125|
00190 |$L41927|
00190 e59530e4 ldr r3, [r5, #0xE4]
00194 e203300f and r3, r3, #0xF
00198 e3530004 cmp r3, #4
0019c 1a00000b bne |$L41925|
001a0 e3590001 cmp r9, #1
001a4 1a000009 bne |$L41925|
; 271 : {
; 272 : EdbgOutputDebugString("INFO: 5.0V Card detected in slot %d.\r\n", ((EthDevice == ETH_DEVICE_PCMCIA0)?0:1));
001a8 e3a01001 mov r1, #1
001ac |$L42103|
001ac e59f0120 ldr r0, [pc, #0x120]
001b0 eb000000 bl EdbgOutputDebugString
; 273 :
; 274 : uByte = 0x21;
; 275 : Offset = CIS_R0;
; 276 : pAttribute = (UINT8 *) SlotAddress;
; 277 : pAttribute += Offset;
; 278 : *pAttribute = uByte;
001b4 e3a03021 mov r3, #0x21
001b8 e5c433f8 strb r3, [r4, #0x3F8]
; 279 :
; 280 : uByte = 0x1;
; 281 : Offset = CIS_R0 + 2;
; 282 : pAttribute = (UINT8 *) SlotAddress;
; 283 : pAttribute += Offset;
; 284 : *pAttribute = uByte;
001bc e3a03001 mov r3, #1
001c0 e5c433fa strb r3, [r4, #0x3FA]
; 285 : }
; 286 : else
001c4 ea000008 b |$L41931|
001c8 |$L42125|
; 271 : {
; 272 : EdbgOutputDebugString("INFO: 5.0V Card detected in slot %d.\r\n", ((EthDevice == ETH_DEVICE_PCMCIA0)?0:1));
001c8 e3a01000 mov r1, #0
001cc eafffff6 b |$L42103|
001d0 |$L41925|
; 287 : {
; 288 : EdbgOutputDebugString("INFO: 3.3V Card detected in slot %d.\r\n", ((EthDevice == ETH_DEVICE_PCMCIA0)?0:1));
001d0 e59f00f8 ldr r0, [pc, #0xF8]
001d4 e3590000 cmp r9, #0
001d8 03a01000 moveq r1, #0
001dc 13a01001 movne r1, #1
001e0 eb000000 bl EdbgOutputDebugString
; 289 :
; 290 : uByte = 0x20;
; 291 : Offset = CIS_R0;
; 292 : pAttribute = (UINT8 *) SlotAddress;
; 293 : pAttribute += Offset;
; 294 : *pAttribute = uByte;
001e4 e3a03020 mov r3, #0x20
001e8 e5c433f8 strb r3, [r4, #0x3F8]
001ec |$L41931|
; 295 : }
; 296 :
; 297 : EbootDeviceAddress = (EthDevice == ETH_DEVICE_PCMCIA0) ? (UINT32) OALPAtoVA(BULVERDE_BASE_REG_PA_PCMCIA_S0_IO, FALSE) + 0x300 : \
; 298 : (UINT32) OALPAtoVA(BULVERDE_BASE_REG_PA_PCMCIA_S1_IO, FALSE) + 0x300;
001ec e3590000 cmp r9, #0
001f0 03a00202 moveq r0, #2, 4
001f4 13a00203 movne r0, #3, 4
001f8 e3a01000 mov r1, #0
001fc eb000000 bl OALPAtoVA
00200 e2800c03 add r0, r0, #3, 24
; 299 :
; 300 : // Only supported PCMCIA NIC is an NE2000-compatible NIC. Initialize it.
; 301 : //
; 302 : if (NE2000Init((BYTE *) EbootDeviceAddress, 1, pKITLArgs->mac))
00204 e28a2018 add r2, r10, #0x18
00208 e3a01001 mov r1, #1
0020c eb000000 bl NE2000Init
00210 e3500000 cmp r0, #0
00214 0a00001c beq |$L41937|
; 303 : {
; 304 : pfnEDbgInit = NE2000Init;
; 305 : pfnEDbgGetFrame = NE2000GetFrame;
; 306 : pfnEDbgSendFrame = NE2000SendFrame;
; 307 : pfnEDbgEnableInts = NE2000EnableInts;
; 308 : pfnEDbgDisableInts = NE2000DisableInts;
00218 e59f10ac ldr r1, [pc, #0xAC]
0021c e59f30a4 ldr r3, [pc, #0xA4]
00220 e59f809c ldr r8, [pc, #0x9C]
00224 e59f6094 ldr r6, [pc, #0x94]
00228 e59f708c ldr r7, [pc, #0x8C]
0022c e59f4084 ldr r4, [pc, #0x84]
00230 e59f507c ldr r5, [pc, #0x7C]
00234 e59f0074 ldr r0, [pc, #0x74]
00238 e59fe06c ldr lr, [pc, #0x6C]
0023c e59f2064 ldr r2, [pc, #0x64]
00240 e5813000 str r3, [r1]
; 309 : #ifdef IMGSHAREETH
; 310 : pfnCurrentPacketFilter = NULL;
; 311 : pfnMulticastList = NULL;
; 312 : #endif
; 313 :
; 314 : // Save the device location information for later use.
; 315 : //
; 316 : pKITLArgs->devLoc.IfcType = Internal;
00244 e3a03000 mov r3, #0
00248 e5886000 str r6, [r8]
0024c e5874000 str r4, [r7]
00250 e5850000 str r0, [r5]
00254 e58e2000 str r2, [lr]
; 317 : pKITLArgs->devLoc.BusNumber = 0;
; 318 : pKITLArgs->devLoc.PhysicalLoc = (PVOID)((EthDevice == ETH_DEVICE_PCMCIA0) ? (BULVERDE_BASE_REG_PA_PCMCIA_S0_IO + 0x300) : (BULVERDE_BASE_REG_PA_PCMCIA_S1_IO + 0x300));
00258 e3590000 cmp r9, #0
0025c e58a3004 str r3, [r10, #4]
00260 e58a3008 str r3, [r10, #8]
00264 03a03202 moveq r3, #2, 4
; 319 : pKITLArgs->devLoc.LogicalLoc = (DWORD)pKITLArgs->devLoc.PhysicalLoc;
; 320 :
; 321 : EdbgOutputDebugString("INFO: NE2000 Ethernet controller initialized.\n");
00268 e59f0034 ldr r0, [pc, #0x34]
0026c 13a03203 movne r3, #3, 4
00270 e3833c03 orr r3, r3, #3, 24
00274 e58a3010 str r3, [r10, #0x10]
00278 e58a300c str r3, [r10, #0xC]
0027c eb000000 bl EdbgOutputDebugString
; 322 : return(EDBG_ADAPTER_NE2000);
00280 e3a00001 mov r0, #1
; 368 :
; 369 : }
00284 e8bd47f0 ldmia sp!, {r4 - r10, lr}
00288 e12fff1e bx lr
0028c |$L41937|
; 323 : }
; 324 : else
; 325 : {
; 326 : EdbgOutputDebugString("ERROR: Failed to initialize NE2000 Ethernet controller.\n");
0028c e59f000c ldr r0, [pc, #0xC]
00290 |$L42142|
00290 eb000000 bl EdbgOutputDebugString
00294 |$L41941|
; 327 : }
; 328 : }
; 329 : }
; 330 :
; 331 : return (-1);
00294 e3e00000 mvn r0, #0
; 368 :
; 369 : }
00298 e8bd47f0 ldmia sp!, {r4 - r10, lr}
0029c e12fff1e bx lr
002a0 |$L42150|
002a0 00000000 DCD |??_C@_0DJ@MAHGCFFM@ERROR?3?5Failed?5to?5initialize?5NE20@|
002a4 00000000 DCD |??_C@_0CP@JDGKEGKO@INFO?3?5NE2000?5Ethernet?5controller@|
002a8 00000000 DCD |NE2000EnableInts|
002ac 00000000 DCD |pfnEDbgEnableInts|
002b0 00000000 DCD |NE2000SendFrame|
002b4 00000000 DCD |pfnEDbgSendFrame|
002b8 00000000 DCD |NE2000GetFrame|
002bc 00000000 DCD |pfnEDbgGetFrame|
002c0 00000000 DCD |NE2000Init|
002c4 00000000 DCD |pfnEDbgInit|
002c8 00000000 DCD |NE2000DisableInts|
002cc 00000000 DCD |pfnEDbgDisableInts|
002d0 00000000 DCD |??_C@_0CH@JJJJNBNM@INFO?3?53?43V?5Card?5detected?5in?5slot@|
002d4 00000000 DCD |??_C@_0CH@DMJOIKIF@INFO?3?55?40V?5Card?5detected?5in?5slot@|
002d8 00000000 DCD |??_C@_0EB@BEPALHMI@ERROR?3?5Failed?5to?5initialize?5SMSC@|
002dc 00000000 DCD |??_C@_0DI@CCHNCAOI@INFO?3?5SMSC?5LAN91C111?5Ethernet?5co@|
002e0 00000000 DCD |LAN91CEnableInts|
002e4 00000000 DCD |LAN91CSendFrame|
002e8 00000000 DCD |LAN91CGetFrame|
002ec 00000000 DCD |LAN91CInit|
002f0 00000000 DCD |LAN91CDisableInts|
002f4 00000000 DCD |??_C@_0DM@GJDOGNCA@INFO?3?5Trying?5to?5locate?1initializ@|
002f8 00000000 DCD |??_C@_0DB@FEDFIEKD@ERROR?3?5Invalid?5PCMCIA?5configurat@|
002fc 00000000 DCD |??_C@_0DM@MPEJGGJE@INFO?3?5Trying?5to?5locate?1initializ@|
00300 00000000 DCD |??_C@_0DG@ELGKPAD@INFO?3?5Trying?5to?5initialize?5the?5b@|
00304 |$M42146|
ENDP ; |InitSpecifiedEthDevice|
EXPORT |OEMEthGetFrame|
00000 AREA |.text| { |OEMEthGetFrame| }, CODE, ARM, SELECTION=1 ; comdat noduplicate
00000 AREA |.pdata$$OEMEthGetFrame|, PDATA, SELECTION=5, ASSOC=|.text| { |OEMEthGetFrame| } ; comdat associative
|$T42160| DCD |$L42159|
DCD 0x40000a01
; Function compile flags: /Ogsy
00000 AREA |.text| { |OEMEthGetFrame| }, CODE, ARM, SELECTION=1 ; comdat noduplicate
00000 |OEMEthGetFrame| PROC
; 374 : {
00000 |$L42159|
00000 e52de004 str lr, [sp, #-4]!
00004 |$M42157|
; 375 : return (pfnEDbgGetFrame(pData, pwLength));
00004 e59f3018 ldr r3, [pc, #0x18]
00008 e5933000 ldr r3, [r3]
0000c e1a0e00f mov lr, pc
00010 e12fff13 bx r3
00014 e1a00800 mov r0, r0, lsl #16
00018 e1a00820 mov r0, r0, lsr #16
; 376 : }
0001c e49de004 ldr lr, [sp], #4
00020 e12fff1e bx lr
00024 |$L42162|
00024 00000000 DCD |pfnEDbgGetFrame|
00028 |$M42158|
ENDP ; |OEMEthGetFrame|
EXPORT |OEMEthSendFrame|
EXPORT |??_C@_0CE@HCNNFPGI@?$CBOEMEthSendFrame?5failure?0?5retry?5@| [ DATA ] ; `string'
00000 AREA |.text| { |OEMEthSendFrame| }, CODE, ARM, SELECTION=1 ; comdat noduplicate
00000 AREA |.pdata$$OEMEthSendFrame|, PDATA, SELECTION=5, ASSOC=|.text| { |OEMEthSendFrame| } ; comdat associative
|$T42177| DCD |$L42176|
DCD 0x40001b01
00000 AREA |.rdata| { |??_C@_0CE@HCNNFPGI@?$CBOEMEthSendFrame?5failure?0?5retry?5@| }, DATA, READONLY, SELECTION=2 ; comdat any
|??_C@_0CE@HCNNFPGI@?$CBOEMEthSendFrame?5failure?0?5retry?5@| DCB "!OEMEt"
DCB "hSendFrame failure, retry %u", 0xa, 0x0 ; `string'
; Function compile flags: /Ogsy
00000 AREA |.text| { |OEMEthSendFrame| }, CODE, ARM, SELECTION=1 ; comdat noduplicate
00000 |OEMEthSendFrame| PROC
; 381 : {
00000 |$L42176|
00000 e92d40f0 stmdb sp!, {r4 - r7, lr}
00004 |$M42174|
00004 e1a05001 mov r5, r1
00008 e1a06000 mov r6, r0
; 382 : int retries = 0;
0000c e59f7054 ldr r7, [pc, #0x54]
00010 e3a04000 mov r4, #0
00014 |$L41968|
; 383 :
; 384 : // Let's be persistant here
; 385 : while (retries++ < 4)
; 386 : {
; 387 : if (!pfnEDbgSendFrame(pData, dwLength))
00014 e5973000 ldr r3, [r7]
00018 e1a01005 mov r1, r5
0001c e1a00006 mov r0, r6
00020 e2844001 add r4, r4, #1
00024 e1a0e00f mov lr, pc
00028 e12fff13 bx r3
0002c e1a03800 mov r3, r0, lsl #16
00030 e1b03823 movs r3, r3, lsr #16
00034 0a000007 beq |$L42166|
; 389 : EdbgOutputDebugString("!OEMEthSendFrame failure, retry %u\n",retries);
00038 e59f0024 ldr r0, [pc, #0x24]
0003c e1a01004 mov r1, r4
00040 eb000000 bl EdbgOutputDebugString
00044 e3540004 cmp r4, #4
00048 bafffff1 blt |$L41968|
; 390 : }
; 391 : return (FALSE);
0004c e3a00000 mov r0, #0
; 392 : }
00050 e8bd40f0 ldmia sp!, {r4 - r7, lr}
00054 e12fff1e bx lr
00058 |$L42166|
; 388 : return (TRUE);
00058 e3a00001 mov r0, #1
; 392 : }
0005c e8bd40f0 ldmia sp!, {r4 - r7, lr}
00060 e12fff1e bx lr
00064 |$L42179|
00064 00000000 DCD |??_C@_0CE@HCNNFPGI@?$CBOEMEthSendFrame?5failure?0?5retry?5@|
00068 00000000 DCD |pfnEDbgSendFrame|
0006c |$M42175|
ENDP ; |OEMEthSendFrame|
END
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -