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

📄 ether.cod

📁 Ep93XX TionProV2 BSP
💻 COD
📖 第 1 页 / 共 3 页
字号:
  00214	00000000	 DCD         |MyAddr|
  00218	00000000	 DCD         |??_C@_0CC@IMFFEGPA@Card?5Type?5?$DN?5?$CFs?0?5Address?5?$DN?50x?$CFx?4?$AN@|
  0021c	00000000	 DCD         |??_C@_0CG@LLNPEPJJ@ERROR?3?5Unable?5to?5find?5network?5ca@|
  00220	00000000	 DCD         |??_C@_0DB@BDHKKPD@ERROR?3?5Failed?5to?5Initialize?5CS89@|
  00224	00000000	 DCD         |??_C@_06HMPOGANI@CS8950?$AA@|
  00228	00000000	 DCD         |pfnEDbgSendFrame|
  0022c	00000000	 DCD         |CS8950SendFrame|
  00230	00000000	 DCD         |pfnEDbgGetFrame|
  00234	00000000	 DCD         |CS8950GetFrame|
  00238	00000000	 DCD         |CS8950Init|
  0023c	00000000	 DCD         |??_C@_06PJNFHFFO@NE2000?$AA@|
  00240	00000000	 DCD         |NE2000SendFrame|
  00244	00000000	 DCD         |NE2000GetFrame|
  00248	00000000	 DCD         |NE2000Init|
  0024c		 |$M39510|

			 ENDP  ; |OEMEthHardwareInit|

	EXPORT	|OEMEthPreDownload|
	EXPORT	|??_C@_0L@OPLKAENE@EDB9307?11X?$AA@| [ DATA ] ; `string'
	EXPORT	|??_C@_0BP@KFHIKLKI@INFO?3?5Using?5device?5name?3?5?8?$CFs?8?6?$AA@| [ DATA ] ; `string'
	IMPORT	|EbootInitEtherTransport|
	IMPORT	|CreateDeviceName|
	IMPORT	|GetPlatformString|
	IMPORT	|memcpy|
	IMPORT	|memset|

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

  00000			 AREA	 |.pdata$$OEMEthPreDownload|, PDATA, SELECTION=5, ASSOC=|.text| { |OEMEthPreDownload| } ; comdat associative
|$T39523| DCD	|$L39522|
	DCD	0x40005b02

  00000			 AREA	 |.rdata| { |??_C@_0BP@KFHIKLKI@INFO?3?5Using?5device?5name?3?5?8?$CFs?8?6?$AA@| }, DATA, READONLY, SELECTION=2 ; comdat any
|??_C@_0BP@KFHIKLKI@INFO?3?5Using?5device?5name?3?5?8?$CFs?8?6?$AA@| DCB "I"
	DCB	"NFO: Using device name: '%s'", 0xa, 0x0 ; `string'

  00000			 AREA	 |.rdata| { |??_C@_0L@OPLKAENE@EDB9307?11X?$AA@| }, DATA, READONLY, SELECTION=2 ; comdat any
|??_C@_0L@OPLKAENE@EDB9307?11X?$AA@| DCB "EDB9307/1X", 0x0 ; `string'
; Function compile flags: /Ods

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

  00000		 |OEMEthPreDownload| PROC

; 268  : {

  00000		 |$L39522|
  00000	e52de004	 str         lr, [sp, #-4]!
  00004	e24dd04c	 sub         sp, sp, #0x4C
  00008		 |$M39520|

; 269  :     char szDeviceName[EDBG_MAX_DEV_NAMELEN];
; 270  :     char* szPlatformString = EBOOT_PLATFORM_STRING;

  00008	e59f3158	 ldr         r3, [pc, #0x158]
  0000c	e58d301c	 str         r3, [sp, #0x1C]

; 271  :     DWORD dwSubnetMask      = 0;

  00010	e3a03000	 mov         r3, #0
  00014	e58d3018	 str         r3, [sp, #0x18]

; 272  :     BOOL fGotJumpImg        = FALSE;

  00018	e3a03000	 mov         r3, #0
  0001c	e58d3038	 str         r3, [sp, #0x38]

; 273  :     DWORD DHCPLeaseTime     = DEFAULT_DHCP_LEASE;

  00020	e3a03bfd	 mov         r3, #0xFD, 22
  00024	e3833080	 orr         r3, r3, #0x80
  00028	e58d3030	 str         r3, [sp, #0x30]

; 274  :     DWORD dwBootFlags       = 0;

  0002c	e3a03000	 mov         r3, #0
  00030	e58d3034	 str         r3, [sp, #0x34]

; 275  :     DWORD *pDHCPLeaseTime   = &DHCPLeaseTime;

  00034	e28d3030	 add         r3, sp, #0x30
  00038	e58d303c	 str         r3, [sp, #0x3C]

; 276  : 
; 277  :     //
; 278  :     // Clear out the device name.
; 279  :     //
; 280  :     memset(szDeviceName, 0, EDBG_MAX_DEV_NAMELEN);

  0003c	e3a02010	 mov         r2, #0x10
  00040	e3a01000	 mov         r1, #0
  00044	e28d0020	 add         r0, sp, #0x20
  00048	eb000000	 bl          memset

; 281  : 
; 282  :     //
; 283  :     // Get the device name and platform strings from the spi eeprom or
; 284  :     // get the default.
; 285  :     //
; 286  :     GetPlatformString(szPlatformString);

  0004c	e59d001c	 ldr         r0, [sp, #0x1C]
  00050	eb000000	 bl          GetPlatformString

; 287  :     CreateDeviceName(&MyAddr, szDeviceName);

  00054	e28d1020	 add         r1, sp, #0x20
  00058	e59f0100	 ldr         r0, [pc, #0x100]
  0005c	eb000000	 bl          CreateDeviceName

; 288  : 
; 289  :     EdbgOutputDebugString("INFO: Using device name: '%s'\n", szDeviceName);

  00060	e28d1020	 add         r1, sp, #0x20
  00064	e59f00f8	 ldr         r0, [pc, #0xF8]
  00068	eb000000	 bl          EdbgOutputDebugString

; 290  : 
; 291  : #ifdef EBOOT_STATIC_IP
; 292  :     MyAddr.dwIP    = inet_addr(EBOOT_CS8950_IP_ADDRESS); // for example
; 293  : 
; 294  : //    MyAddr.wMAC = EBOOT_CS8950_MAC_ADDRESS; 
; 295  :     EdbgOutputDebugString("Mac Address: 0x%x 0x%x 0x%x \n", MyAddr.wMAC[0], MyAddr.wMAC[1], MyAddr.wMAC[2]);
; 296  :    
; 297  :     MyAddr.wPort   = EBOOT_CS8950_TFTP_PORT;  
; 298  : 
; 299  :     dwSubnetMask   = inet_addr(EBOOT_CS8950_SUBNET_MASK);  // in my case
; 300  : 
; 301  :     if (MyAddr.dwIP && dwSubnetMask)
; 302  :     {
; 303  :         pDHCPLeaseTime = NULL;
; 304  :     }
; 305  : #endif
; 306  :     //
; 307  :     // Initialize the TFTP transport.
; 308  :     //
; 309  :     if (!EbootInitEtherTransport(&MyAddr, 
; 310  :                                  &dwSubnetMask, 
; 311  :                                  &fGotJumpImg, 
; 312  :                                  pDHCPLeaseTime, 
; 313  :                                  EBOOT_VERSION_MAJOR, 
; 314  :                                  EBOOT_VERSION_MINOR, 
; 315  :                                  szPlatformString, 
; 316  :                                  szDeviceName, 
; 317  :                                  EDBG_CPU_ARM720, 
; 318  :                                  dwBootFlags))

  0006c	e59d3034	 ldr         r3, [sp, #0x34]
  00070	e58d3014	 str         r3, [sp, #0x14]
  00074	e3a03041	 mov         r3, #0x41
  00078	e58d3010	 str         r3, [sp, #0x10]
  0007c	e28d3020	 add         r3, sp, #0x20
  00080	e58d300c	 str         r3, [sp, #0xC]
  00084	e59d301c	 ldr         r3, [sp, #0x1C]
  00088	e58d3008	 str         r3, [sp, #8]
  0008c	e3a03000	 mov         r3, #0
  00090	e58d3004	 str         r3, [sp, #4]
  00094	e3a03001	 mov         r3, #1
  00098	e58d3000	 str         r3, [sp]
  0009c	e59d303c	 ldr         r3, [sp, #0x3C]
  000a0	e28d2038	 add         r2, sp, #0x38
  000a4	e28d1018	 add         r1, sp, #0x18
  000a8	e59f00b0	 ldr         r0, [pc, #0xB0]
  000ac	eb000000	 bl          EbootInitEtherTransport
  000b0	e58d0044	 str         r0, [sp, #0x44]
  000b4	e59d3044	 ldr         r3, [sp, #0x44]
  000b8	e3530000	 cmp         r3, #0
  000bc	1a000002	 bne         |$L39439|

; 319  :     {
; 320  :         return(BL_ERROR);

  000c0	e3e03000	 mvn         r3, #0
  000c4	e58d3040	 str         r3, [sp, #0x40]
  000c8	ea000020	 b           |$L39429|
  000cc		 |$L39439|

; 321  :     }
; 322  : 
; 323  :     //
; 324  :     // Save the Ethernet address in boot args area.
; 325  :     //
; 326  :     memcpy(&(pDriverGlobals->eth.EdbgAddr), &MyAddr, sizeof(MyAddr));

  000cc	e3a0200c	 mov         r2, #0xC
  000d0	e59f1088	 ldr         r1, [pc, #0x88]
  000d4	e3a03b22	 mov         r3, #0x22, 22
  000d8	e3830010	 orr         r0, r3, #0x10
  000dc	eb000000	 bl          memcpy

; 327  :     memcpy(&pDriverGlobals->eth.strEdbgName, szDeviceName, EDBG_MAX_DEV_NAMELEN);

  000e0	e3a02010	 mov         r2, #0x10
  000e4	e28d1020	 add         r1, sp, #0x20
  000e8	e3a03b22	 mov         r3, #0x22, 22
  000ec	e3830064	 orr         r0, r3, #0x64
  000f0	eb000000	 bl          memcpy

; 328  : 
; 329  :     //
; 330  :     //pDriverGlobals->eth.etherFlags = LDRFL_USE_EDBG | LDRFL_ADDR_VALID | LDRFL_JUMPIMG;
; 331  :     //
; 332  :     if (pDHCPLeaseTime)

  000f4	e59d303c	 ldr         r3, [sp, #0x3C]
  000f8	e3530000	 cmp         r3, #0
  000fc	0a000005	 beq         |$L39442|

; 333  :     {
; 334  :         pDriverGlobals->eth.DHCPLeaseTime = *pDHCPLeaseTime;    // DHCP

  00100	e3a03b22	 mov         r3, #0x22, 22
  00104	e3832058	 orr         r2, r3, #0x58
  00108	e59d303c	 ldr         r3, [sp, #0x3C]
  0010c	e5933000	 ldr         r3, [r3]
  00110	e5823000	 str         r3, [r2]

; 335  :     }
; 336  :     else

  00114	ea000003	 b           |$L39444|
  00118		 |$L39442|

; 337  :     {
; 338  :         pDriverGlobals->eth.DHCPLeaseTime = 0;                  // Static IP

  00118	e3a03b22	 mov         r3, #0x22, 22
  0011c	e3832058	 orr         r2, r3, #0x58
  00120	e3a03000	 mov         r3, #0
  00124	e5823000	 str         r3, [r2]
  00128		 |$L39444|

; 339  :     }
; 340  : 
; 341  :     return(fGotJumpImg? BL_JUMP : BL_DOWNLOAD);

  00128	e59d3038	 ldr         r3, [sp, #0x38]
  0012c	e3530000	 cmp         r3, #0
  00130	0a000002	 beq         |$L39517|
  00134	e3a03001	 mov         r3, #1
  00138	e58d3048	 str         r3, [sp, #0x48]
  0013c	ea000001	 b           |$L39518|
  00140		 |$L39517|
  00140	e3a03000	 mov         r3, #0
  00144	e58d3048	 str         r3, [sp, #0x48]
  00148		 |$L39518|
  00148	e59d3048	 ldr         r3, [sp, #0x48]
  0014c	e58d3040	 str         r3, [sp, #0x40]
  00150		 |$L39429|

; 319  :     {
; 320  :         return(BL_ERROR);

  00150	e59d0040	 ldr         r0, [sp, #0x40]

; 342  : }

  00154	e28dd04c	 add         sp, sp, #0x4C
  00158	e49de004	 ldr         lr, [sp], #4
  0015c	e12fff1e	 bx          lr
  00160		 |$L39525|
  00160	00000000	 DCD         |MyAddr|
  00164	00000000	 DCD         |??_C@_0BP@KFHIKLKI@INFO?3?5Using?5device?5name?3?5?8?$CFs?8?6?$AA@|
  00168	00000000	 DCD         |??_C@_0L@OPLKAENE@EDB9307?11X?$AA@|
  0016c		 |$M39521|

			 ENDP  ; |OEMEthPreDownload|

	EXPORT	|OEMEthGetSecs|
	IMPORT	|GetSystemTimeInUSec|

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

  00000			 AREA	 |.pdata$$OEMEthGetSecs|, PDATA, SELECTION=5, ASSOC=|.text| { |OEMEthGetSecs| } ; comdat associative
|$T39532| DCD	|$L39531|
	DCD	0x40001102
; Function compile flags: /Ods

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

  00000		 |OEMEthGetSecs| PROC

; 352  : {

  00000		 |$L39531|
  00000	e52de004	 str         lr, [sp, #-4]!
  00004	e24dd010	 sub         sp, sp, #0x10
  00008		 |$M39529|

; 353  :     DWORD dwReturnValue;
; 354  : 
; 355  : 
; 356  :     //
; 357  :     // Debug timer.
; 358  :     //
; 359  :     dwReturnValue = (DWORD)(GetSystemTimeInUSec()>>(ULONGLONG)20);

  00008	eb000000	 bl          GetSystemTimeInUSec
  0000c	e58d100c	 str         r1, [sp, #0xC]
  00010	e58d0008	 str         r0, [sp, #8]
  00014	e59d2008	 ldr         r2, [sp, #8]
  00018	e59d300c	 ldr         r3, [sp, #0xC]
  0001c	e1a02a22	 mov         r2, r2, lsr #20
  00020	e1a03603	 mov         r3, r3, lsl #12
  00024	e1833002	 orr         r3, r3, r2
  00028	e58d3000	 str         r3, [sp]

; 360  :     return(dwReturnValue);

  0002c	e59d3000	 ldr         r3, [sp]
  00030	e58d3004	 str         r3, [sp, #4]
  00034	e59d0004	 ldr         r0, [sp, #4]

; 361  : }

  00038	e28dd010	 add         sp, sp, #0x10
  0003c	e49de004	 ldr         lr, [sp], #4
  00040	e12fff1e	 bx          lr
  00044		 |$M39530|

			 ENDP  ; |OEMEthGetSecs|

	EXPORT	|SC_WriteDebugLED|

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

  00000			 AREA	 |.pdata$$SC_WriteDebugLED|, PDATA, SELECTION=5, ASSOC=|.text| { |SC_WriteDebugLED| } ; comdat associative
|$T39539| DCD	|$L39538|
	DCD	0x40000503
; Function compile flags: /Ods

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

  00000		 |SC_WriteDebugLED| PROC

; 366  : {

  00000		 |$L39538|
  00000	e1a0c00d	 mov         r12, sp
  00004	e92d0003	 stmdb       sp!, {r0, r1}
  00008	e92d5000	 stmdb       sp!, {r12, lr}
  0000c		 |$M39536|

; 367  :     return;
; 368  : }

  0000c	e89d6000	 ldmia       sp, {sp, lr}
  00010	e12fff1e	 bx          lr
  00014		 |$M39537|

			 ENDP  ; |SC_WriteDebugLED|

	END

⌨️ 快捷键说明

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