📄 ether.cod
字号:
EXPORT |??_C@_0DM@MPEJGGJE@INFO?3?5Trying?5to?5locate?1initializ@| [ DATA ] ; `string'
EXPORT |??_C@_0DG@ELGKPAD@INFO?3?5Trying?5to?5initialize?5the?5b@| [ DATA ] ; `string'
EXPORT |??_C@_0CJ@CLAOAIAB@INFO?3?5Trying?5to?5initialize?5the?5D@| [ DATA ] ; `string'
EXPORT |??_C@_0DI@OJHOHFCK@INFO?3?5Trying?5to?5initialize?5the?5b@| [ DATA ] ; `string'
EXPORT |??_C@_0DA@CDHDIMPH@INFO?3?5DM9000?5Ethernet?5controller@| [ DATA ] ; `string'
EXPORT |??_C@_0DJ@NEBMEBBH@ERROR?3?5Failed?5to?5initialize?5DM90@| [ DATA ] ; `string'
EXPORT |??_C@_0DI@CCHNCAOI@INFO?3?5SMSC?5LAN91C111?5Ethernet?5co@| [ DATA ] ; `string'
EXPORT |??_C@_0EB@BEPALHMI@ERROR?3?5Failed?5to?5initialize?5SMSC@| [ DATA ] ; `string'
EXPORT |??_C@_0DJ@OJIOOPLG@ERROR?3?5Failed?5to?5initialize?5CS89@| [ DATA ] ; `string'
IMPORT |CS8900AInit|
IMPORT |CS8900ASendFrame|
IMPORT |CS8900AGetFrame|
IMPORT |CS8900AEnableInts|
IMPORT |CS8900ADisableInts|
IMPORT |LAN91CInit|
IMPORT |LAN91CSendFrame|
IMPORT |LAN91CGetFrame|
IMPORT |LAN91CEnableInts|
IMPORT |LAN91CDisableInts|
IMPORT |Dm9isaInit|
IMPORT |Dm9isaEnableInts|
IMPORT |Dm9isaDisableInts|
IMPORT |Dm9isaGetFrame|
IMPORT |Dm9isaSendFrame|
IMPORT |EdbgOutputDebugString|
00000 AREA |.text| { |InitSpecifiedEthDevice| }, CODE, ARM, SELECTION=1 ; comdat noduplicate
00000 AREA |.pdata$$InitSpecifiedEthDevice|, PDATA, SELECTION=5, ASSOC=|.text| { |InitSpecifiedEthDevice| } ; comdat associative
|$T40952| DCD |$L40951|
DCD 0x4000a901
00000 AREA |.rdata| { |??_C@_0DJ@OJIOOPLG@ERROR?3?5Failed?5to?5initialize?5CS89@| }, DATA, READONLY, SELECTION=2 ; comdat any
|??_C@_0DJ@OJIOOPLG@ERROR?3?5Failed?5to?5initialize?5CS89@| DCB "ERROR: F"
DCB "ailed to initialize CS8900 Ethernet controller.", 0xa, 0x0 ; `string'
00000 AREA |.rdata| { |??_C@_0DI@CCHNCAOI@INFO?3?5SMSC?5LAN91C111?5Ethernet?5co@| }, DATA, READONLY, SELECTION=2 ; comdat any
|??_C@_0DI@CCHNCAOI@INFO?3?5SMSC?5LAN91C111?5Ethernet?5co@| DCB "INFO: SM"
DCB "SC LAN91C111 Ethernet controller initialized.", 0xd, 0xa
DCB 0x0 ; `string'
00000 AREA |.rdata| { |??_C@_0EB@BEPALHMI@ERROR?3?5Failed?5to?5initialize?5SMSC@| }, DATA, READONLY, SELECTION=2 ; comdat any
|??_C@_0EB@BEPALHMI@ERROR?3?5Failed?5to?5initialize?5SMSC@| DCB "ERROR: F"
DCB "ailed to initialize SMSC LAN91C111 Ethernet controller.", 0xa
DCB 0x0 ; `string'
00000 AREA |.rdata| { |??_C@_0DJ@NEBMEBBH@ERROR?3?5Failed?5to?5initialize?5DM90@| }, DATA, READONLY, SELECTION=2 ; comdat any
|??_C@_0DJ@NEBMEBBH@ERROR?3?5Failed?5to?5initialize?5DM90@| DCB "ERROR: F"
DCB "ailed to initialize DM9000 Ethernet controller.", 0xa, 0x0 ; `string'
00000 AREA |.rdata| { |??_C@_0DA@CDHDIMPH@INFO?3?5DM9000?5Ethernet?5controller@| }, DATA, READONLY, SELECTION=2 ; comdat any
|??_C@_0DA@CDHDIMPH@INFO?3?5DM9000?5Ethernet?5controller@| DCB "INFO: DM9"
DCB "000 Ethernet controller initialized.", 0xd, 0xa, 0x0 ; `string'
00000 AREA |.rdata| { |??_C@_0DM@GJDOGNCA@INFO?3?5Trying?5to?5locate?1initializ@| }, DATA, READONLY, SELECTION=2 ; comdat any
|??_C@_0DM@GJDOGNCA@INFO?3?5Trying?5to?5locate?1initializ@| DCB "INFO: Tr"
DCB "ying to locate/initialize PCMCIA NIC in slot 0...", 0xd, 0xa
DCB 0x0 ; `string'
00000 AREA |.rdata| { |??_C@_0DM@MPEJGGJE@INFO?3?5Trying?5to?5locate?1initializ@| }, DATA, READONLY, SELECTION=2 ; comdat any
|??_C@_0DM@MPEJGGJE@INFO?3?5Trying?5to?5locate?1initializ@| DCB "INFO: Tr"
DCB "ying to locate/initialize PCMCIA NIC in slot 1...", 0xd, 0xa
DCB 0x0 ; `string'
00000 AREA |.rdata| { |??_C@_0DG@ELGKPAD@INFO?3?5Trying?5to?5initialize?5the?5b@| }, DATA, READONLY, SELECTION=2 ; comdat any
|??_C@_0DG@ELGKPAD@INFO?3?5Trying?5to?5initialize?5the?5b@| DCB "INFO: Tr"
DCB "ying to initialize the built-in SMSC NIC...", 0xd, 0xa, 0x0 ; `string'
00000 AREA |.rdata| { |??_C@_0DI@OJHOHFCK@INFO?3?5Trying?5to?5initialize?5the?5b@| }, DATA, READONLY, SELECTION=2 ; comdat any
|??_C@_0DI@OJHOHFCK@INFO?3?5Trying?5to?5initialize?5the?5b@| DCB "INFO: T"
DCB "rying to initialize the built-in cs8900 NIC...", 0xd, 0xa
DCB 0x0 ; `string'
00000 AREA |.rdata| { |??_C@_0CJ@CLAOAIAB@INFO?3?5Trying?5to?5initialize?5the?5D@| }, DATA, READONLY, SELECTION=2 ; comdat any
|??_C@_0CJ@CLAOAIAB@INFO?3?5Trying?5to?5initialize?5the?5D@| DCB "INFO: T"
DCB "rying to initialize the DM9000 ", 0xd, 0xa, 0x0 ; `string'
; Function compile flags: /Ogsy
00000 AREA |.text| { |InitSpecifiedEthDevice| }, CODE, ARM, SELECTION=1 ; comdat noduplicate
00000 |InitSpecifiedEthDevice| PROC
; 229 : {
00000 |$L40951|
00000 e92d47f0 stmdb sp!, {r4 - r10, lr}
00004 |$M40949|
00004 e3510000 cmp r1, #0
00008 e1a0a000 mov r10, r0
; 230 : UINT32 EbootDeviceAddress = 0;
; 231 : UINT32 Offset;
; 232 : UINT8 *pAttribute = NULL;
; 233 : UINT8 uByte;
; 234 : UINT32 SlotAddress = 0;
; 235 :
; 236 : // volatile MAINSTONEII_BLR_REGS *pBLRegs = (volatile MAINSTONEII_BLR_REGS *) OALPAtoVA(MAINSTONEII_BASE_REG_PA_FPGA, FALSE);
; 237 :
; 238 :
; 239 : // Determine the NIC's address.
; 240 : //
; 241 : switch (EthDevice)
0000c 0a000077 beq |$L40740|
00010 e3510001 cmp r1, #1
00014 0a000070 beq |$L40743|
00018 e3510002 cmp r1, #2
0001c 0a00004d beq |$L40746|
00020 e3510003 cmp r1, #3
00024 0a000026 beq |$L40752|
00028 e3510004 cmp r1, #4
0002c 1a00007a bne |$L40794|
; 254 : break;
; 255 : case ETH_DEVICE_DM9000:
; 256 : SlotAddress = (UINT32) OALPAtoVA(MAINSTONEII_BASE_REG_PA_SMSC_ETHERNET, FALSE);
00030 e3a01000 mov r1, #0
00034 e3a00201 mov r0, #1, 4
00038 eb000000 bl OALPAtoVA
0003c e1a04000 mov r4, r0
; 257 : EdbgOutputDebugString("INFO: Trying to initialize the DM9000 \r\n");
00040 e59f0258 ldr r0, [pc, #0x258]
00044 eb000000 bl EdbgOutputDebugString
; 343 : {
; 344 : EbootDeviceAddress = (SlotAddress);
; 345 : if (Dm9isaInit((UINT8 *) EbootDeviceAddress, 0, pKITLArgs->mac))
00048 e28a2018 add r2, r10, #0x18
0004c e3a01000 mov r1, #0
00050 e1a00004 mov r0, r4
00054 eb000000 bl Dm9isaInit
00058 e3500000 cmp r0, #0
0005c 0a000068 beq |$L40758|
; 346 : {
; 347 : pfnEDbgInit = (PFN_EDBG_INIT) Dm9isaInit;
; 348 : pfnEDbgGetFrame = (PFN_EDBG_GET_FRAME) Dm9isaGetFrame;
; 349 : pfnEDbgSendFrame = (PFN_EDBG_SEND_FRAME) Dm9isaSendFrame;
; 350 : pfnEDbgEnableInts = (PFN_EDBG_ENABLE_INTS) Dm9isaEnableInts;
00060 e59f41dc ldr r4, [pc, #0x1DC]
00064 e59f2230 ldr r2, [pc, #0x230]
; 351 : pfnEDbgDisableInts = (PFN_EDBG_DISABLE_INTS)Dm9isaDisableInts;
00068 e59f11ec ldr r1, [pc, #0x1EC]
0006c e59f3224 ldr r3, [pc, #0x224]
00070 e59f91dc ldr r9, [pc, #0x1DC]
00074 e59f7218 ldr r7, [pc, #0x218]
00078 e59f81e4 ldr r8, [pc, #0x1E4]
0007c e59f520c ldr r5, [pc, #0x20C]
00080 e59f61c4 ldr r6, [pc, #0x1C4]
00084 e59fe200 ldr lr, [pc, #0x200]
; 352 : #ifdef IMGSHAREETH
; 353 : pfnCurrentPacketFilter = (PFN_EDBG_CURRENT_PACKET_FILTER) Dm9isaCurrentPacketFilter;
; 354 : pfnMulticastList = (PFN_EDBG_MULTICAST_LIST) Dm9isaMulticastList;
; 355 : #endif
; 356 :
; 357 : // Save the device location information for later use.
; 358 : //
; 359 : pKITLArgs->devLoc.IfcType = Internal;
; 360 : pKITLArgs->devLoc.BusNumber = 0;
; 361 : pKITLArgs->devLoc.PhysicalLoc = (PVOID)(MAINSTONEII_BASE_REG_PA_SMSC_ETHERNET );
; 362 : pKITLArgs->devLoc.LogicalLoc = (DWORD)pKITLArgs->devLoc.PhysicalLoc;
; 363 :
; 364 : EdbgOutputDebugString("INFO: DM9000 Ethernet controller initialized.\r\n");
00088 e59f01f8 ldr r0, [pc, #0x1F8]
0008c e5842000 str r2, [r4]
00090 e5813000 str r3, [r1]
00094 e3a04000 mov r4, #0
00098 e3a03201 mov r3, #1, 4
0009c e5897000 str r7, [r9]
000a0 e5885000 str r5, [r8]
000a4 e586e000 str lr, [r6]
000a8 e58a4004 str r4, [r10, #4]
000ac e58a4008 str r4, [r10, #8]
000b0 e58a3010 str r3, [r10, #0x10]
000b4 e58a300c str r3, [r10, #0xC]
000b8 eb000000 bl EdbgOutputDebugString
; 365 : return(EDBG_ADAPTER_SMC9000);
000bc e3a04000 mov r4, #0
000c0 ea000056 b |$L40729|
000c4 |$L40752|
; 258 : break;
; 259 : case ETH_DEVICE_CS8900:
; 260 : SlotAddress = (UINT32) OALPAtoVA(MAINSTONEII_BASE_REG_PA_CS8900_ETHERNET, FALSE);
000c4 e3a01000 mov r1, #0
000c8 e3a00302 mov r0, #2, 6
000cc eb000000 bl OALPAtoVA
000d0 e1a04000 mov r4, r0
; 261 : EdbgOutputDebugString("INFO: Trying to initialize the built-in cs8900 NIC...\r\n");
000d4 e59f01a8 ldr r0, [pc, #0x1A8]
000d8 eb000000 bl EdbgOutputDebugString
; 408 : {
; 409 : // Use the cs8900 NIC.
; 410 : //
; 411 : EbootDeviceAddress = (SlotAddress);
; 412 : if (CS8900AInit((UINT8 *) EbootDeviceAddress, 0, pKITLArgs->mac))
000dc e28a2018 add r2, r10, #0x18
000e0 e3a01000 mov r1, #0
000e4 e1a00004 mov r0, r4
000e8 eb000000 bl CS8900AInit
000ec e3500000 cmp r0, #0
000f0 0a000047 beq |$L40786|
; 413 : {
; 414 : pfnEDbgInit = (PFN_EDBG_INIT) CS8900AInit;
; 415 : pfnEDbgGetFrame = (PFN_EDBG_GET_FRAME) CS8900AGetFrame;
000f4 e59f7168 ldr r7, [pc, #0x168]
000f8 e59f4180 ldr r4, [pc, #0x180]
000fc e59f8150 ldr r8, [pc, #0x150]
00100 e59f6174 ldr r6, [pc, #0x174]
; 416 : pfnEDbgSendFrame = (PFN_EDBG_SEND_FRAME) CS8900ASendFrame;
00104 e59f5140 ldr r5, [pc, #0x140]
00108 e59f0168 ldr r0, [pc, #0x168]
; 417 : pfnEDbgEnableInts = (PFN_EDBG_ENABLE_INTS) CS8900AEnableInts;
0010c e59fe130 ldr lr, [pc, #0x130]
00110 e59f215c ldr r2, [pc, #0x15C]
; 418 : pfnEDbgDisableInts = (PFN_EDBG_DISABLE_INTS)CS8900ADisableInts;
00114 e59f1140 ldr r1, [pc, #0x140]
00118 e59f3150 ldr r3, [pc, #0x150]
0011c e5874000 str r4, [r7]
; 419 : #ifdef IMGSHAREETH
; 420 : pfnCurrentPacketFilter = (PFN_EDBG_CURRENT_PACKET_FILTER) CS8900ACurrentPacketFilter;
; 421 : pfnMulticastList = (PFN_EDBG_MULTICAST_LIST) CS8900AMulticastList;
; 422 : #endif
; 423 :
; 424 : // Save the device location information for later use.
; 425 : //
; 426 : pKITLArgs->devLoc.IfcType = Internal;
00120 e3a04000 mov r4, #0
00124 e5886000 str r6, [r8]
00128 e5850000 str r0, [r5]
0012c e58e2000 str r2, [lr]
00130 e5813000 str r3, [r1]
00134 e58a4004 str r4, [r10, #4]
; 427 : pKITLArgs->devLoc.BusNumber = 0;
00138 e58a4008 str r4, [r10, #8]
; 428 : pKITLArgs->devLoc.PhysicalLoc = (PVOID)(MAINSTONEII_BASE_REG_PA_CS8900_ETHERNET);
; 429 : pKITLArgs->devLoc.LogicalLoc = (DWORD)pKITLArgs->devLoc.PhysicalLoc;
0013c e3a04002 mov r4, #2
00140 e3a03302 mov r3, #2, 6
00144 |$L40948|
; 430 :
; 431 : EdbgOutputDebugString("INFO: SMSC LAN91C111 Ethernet controller initialized.\r\n");
00144 e59f0120 ldr r0, [pc, #0x120]
00148 e58a300c str r3, [r10, #0xC]
0014c e58a3010 str r3, [r10, #0x10]
00150 eb000000 bl EdbgOutputDebugString
; 432 : return(EDBG_ADAPTER_DEFAULT);
00154 ea000031 b |$L40729|
00158 |$L40746|
; 251 : case ETH_DEVICE_SMSC:
; 252 : SlotAddress = (UINT32) OALPAtoVA(MAINSTONEII_BASE_REG_PA_SMSC_ETHERNET, FALSE);
00158 e3a01000 mov r1, #0
0015c e3a00201 mov r0, #1, 4
00160 eb000000 bl OALPAtoVA
00164 e1a04000 mov r4, r0
; 253 : EdbgOutputDebugString("INFO: Trying to initialize the built-in SMSC NIC...\r\n");
00168 e59f00f8 ldr r0, [pc, #0xF8]
0016c eb000000 bl EdbgOutputDebugString
; 374 : if (EthDevice == ETH_DEVICE_SMSC)
; 375 :
; 376 : {
; 377 : // Use the SMSC LAN91C111 NIC.
; 378 : //
; 379 : EbootDeviceAddress = (SlotAddress + 0x300);
; 380 : if (LAN91CInit((UINT8 *) EbootDeviceAddress, 0, pKITLArgs->mac))
00170 e28a2018 add r2, r10, #0x18
00174 e3a01000 mov r1, #0
00178 e2840c03 add r0, r4, #3, 24
0017c eb000000 bl LAN91CInit
00180 e3500000 cmp r0, #0
00184 0a000020 beq |$L40772|
; 381 : {
; 382 : pfnEDbgInit = (PFN_EDBG_INIT) LAN91CInit;
; 383 : pfnEDbgGetFrame = (PFN_EDBG_GET_FRAME) LAN91CGetFrame;
00188 e59f70d4 ldr r7, [pc, #0xD4]
0018c e59f40cc ldr r4, [pc, #0xCC]
; 384 : pfnEDbgSendFrame = (PFN_EDBG_SEND_FRAME) LAN91CSendFrame;
; 385 : pfnEDbgEnableInts = (PFN_EDBG_ENABLE_INTS) LAN91CEnableInts;
; 386 : pfnEDbgDisableInts = (PFN_EDBG_DISABLE_INTS)LAN91CDisableInts;
00190 e59f10c4 ldr r1, [pc, #0xC4]
00194 e59f30bc ldr r3, [pc, #0xBC]
00198 e59f80b4 ldr r8, [pc, #0xB4]
0019c e59f60ac ldr r6, [pc, #0xAC]
001a0 e59f50a4 ldr r5, [pc, #0xA4]
001a4 e59f009c ldr r0, [pc, #0x9C]
001a8 e59fe094 ldr lr, [pc, #0x94]
001ac e59f208c ldr r2, [pc, #0x8C]
001b0 e5874000 str r4, [r7]
001b4 e5813000 str r3, [r1]
; 387 : #ifdef IMGSHAREETH
; 388 : pfnCurrentPacketFilter = (PFN_EDBG_CURRENT_PACKET_FILTER) LAN91CCurrentPacketFilter;
; 389 : pfnMulticastList = (PFN_EDBG_MULTICAST_LIST) LAN91CMulticastList;
; 390 : #endif
; 391 :
; 392 : // Save the device location information for later use.
; 393 : //
; 394 : pKITLArgs->devLoc.IfcType = Internal;
001b8 e3a04000 mov r4, #0
; 395 : pKITLArgs->devLoc.BusNumber = 0;
; 396 : pKITLArgs->devLoc.PhysicalLoc = (PVOID)(MAINSTONEII_BASE_REG_PA_SMSC_ETHERNET + 0x300);
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -