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

📄 halether.cod

📁 EP9315的BSP包(WINCE下的BSP,内有各种驱动的详细的代码)
💻 COD
📖 第 1 页 / 共 5 页
字号:

  00000			 AREA	 |.rdata| { |??_C@_0CP@BOGC@INFO?3?5EDBG?5using?5Internal?5EP931x@| }, DATA, READONLY, SELECTION=2 ; comdat any
|??_C@_0CP@BOGC@INFO?3?5EDBG?5using?5Internal?5EP931x@| DCB "INFO: EDBG u"
	DCB	"sing Internal EP931x controller.", 0xd, 0xa, 0x0 ; `string'

  00000			 AREA	 |.rdata| { |??_C@_0CG@LKBO@INFO?3?5EDBG?5using?5NE2000?5controll@| }, DATA, READONLY, SELECTION=2 ; comdat any
|??_C@_0CG@LKBO@INFO?3?5EDBG?5using?5NE2000?5controll@| DCB "INFO: EDBG u"
	DCB	"sing NE2000 controller.", 0xd, 0xa, 0x0 ; `string'

  00000			 AREA	 |.rdata| { |??_C@_0FJ@FLNM@Invalid?5Ethernet?5address?5read?5fr@| }, DATA, READONLY, SELECTION=2 ; comdat any
|??_C@_0FJ@FLNM@Invalid?5Ethernet?5address?5read?5fr@| DCB "Invalid Ether"
	DCB	"net address read from the debug ethernet controller, che"
	DCB	"ck switch settings", 0xa, 0x0		; `string'

  00000			 AREA	 |.rdata| { |??_C@_0EB@CCJL@Debug?5Ethernet?5card?5initialized?0@| }, DATA, READONLY, SELECTION=2 ; comdat any
|??_C@_0EB@CCJL@Debug?5Ethernet?5card?5initialized?0@| DCB "Debug Etherne"
	DCB	"t card initialized, MAC Address:%B:%B:%B:%B:%B:%B", 0xd, 0xa
	DCB	0x0					; `string'
; Function compile flags: /Ogsy

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

  00000		 |OEMEthInit| PROC

; 186  : {

  00000	e92d40f0	 stmdb     sp!, {r4 - r7, lr}
  00004	e24dd00c	 sub       sp, sp, #0xC
  00008		 |$M14456|
  00008	e1a06000	 mov       r6, r0

; 187  :     PULONG      pulEthernetBase;
; 188  :     BOOL        bTemp;
; 189  : 
; 190  :     DEBUGMSG(1, (TEXT("+OEMEthInit\r\n")));
; 191  : 
; 192  :     //
; 193  :     // Store info from bootargs in the adapter object.
; 194  :     //
; 195  :     pAdapter->Addr.dwIP     = pDriverGlobals->eth.EdbgAddr.dwIP;

  0000c	e59f0350	 ldr       r0, [pc, #0x350]

; 196  :     //pAdapter->Addr          = pDriverGlobals->eth.EdbgAddr;
; 197  :     pAdapter->DHCPLeaseTime = pDriverGlobals->eth.DHCPLeaseTime;

  00010	e59f1348	 ldr       r1, [pc, #0x348]

; 198  :     pAdapter->EdbgFlags     = pDriverGlobals->eth.EdbgFlags;
; 199  :     //uiActiveNicNumber       = pDriverGlobals->eth.EdbgHardwareType;
; 200  : 
; 201  :     //
; 202  :     // Some parameters included in boot args for future use, make sure these aren't set
; 203  :     //
; 204  :     switch(pDriverGlobals->eth.EdbgHardwareType)
; 205  :     {

  00014	e3a07000	 mov       r7, #0
  00018	e5900000	 ldr       r0, [r0]
  0001c	e5860000	 str       r0, [r6]
  00020	e5910000	 ldr       r0, [r1]
  00024	e59f1330	 ldr       r1, [pc, #0x330]
  00028	e5860010	 str       r0, [r6, #0x10]
  0002c	e5910000	 ldr       r0, [r1]
  00030	e59f1320	 ldr       r1, [pc, #0x320]
  00034	e5860014	 str       r0, [r6, #0x14]
  00038	e5911000	 ldr       r1, [r1]
  0003c	e3510001	 cmp       r1, #1
  00040	0a00003d	 beq       |$L14165|
  00044	e3510012	 cmp       r1, #0x12
  00048	0a000003	 beq       |$L14168|

; 296  :     default:
; 297  : 
; 298  :         EdbgOutputDebugString
; 299  :         (
; 300  :             "Unsupported debug Ethernet parameters - adapter: %u\n",
; 301  :              pDriverGlobals->eth.EdbgHardwareType
; 302  :         );

  0004c	e59f0300	 ldr       r0, [pc, #0x300]
  00050	eb000000	 bl        EdbgOutputDebugString

; 303  :         return (FALSE);

  00054	e3a00000	 mov       r0, #0
  00058	ea000093	 b         |$L14153|
  0005c		 |$L14168|

; 248  :         break;
; 249  : 
; 250  :     //
; 251  :     // Put in the CS8950 ethernet routines.
; 252  :     //
; 253  :     case EDBG_ADAPTER_CS8950:
; 254  :         pfnEDbgInit           = CS8950Init;

  0005c	e59f02ec	 ldr       r0, [pc, #0x2EC]

; 255  :         pfnEDbgEnableInts     = CS8950EnableInts;     
; 256  :         pfnEDbgDisableInts    = CS8950DisableInts;    
; 257  :         pfnEDbgGetPendingInts = CS8950GetPendingInterrupts; 
; 258  :         pfnEDbgGetFrame       = CS8950GetFrame;       
; 259  :         pfnEDbgSendFrame      = CS8950SendFrame;      
; 260  :         pfnEDbgReadEEPROM     = CS8950ReadEEPROM;     
; 261  :         pfnEDbgWriteEEPROM    = CS8950WriteEEPROM;    
; 262  :         pfnEDbgSetOptions     = NULL;
; 263  :         pfnCurrentPacketFilter= NULL; //CS8950CurrentPacketFilter;
; 264  :         pfnMulticastList      = NULL; // CS8950MulticastList;
; 265  :         pulEthernetBase       = (ULONG *)ETHERNET_BASE;

  00060	e3a0420b	 mov       r4, #0xB, 4
  00064	e59f52ac	 ldr       r5, [pc, #0x2AC]
  00068	e3844801	 orr       r4, r4, #1, 16
  0006c	e59f12a0	 ldr       r1, [pc, #0x2A0]
  00070	e5850000	 str       r0, [r5]
  00074	e59f02d0	 ldr       r0, [pc, #0x2D0]
  00078	e59f228c	 ldr       r2, [pc, #0x28C]
  0007c	e5810000	 str       r0, [r1]
  00080	e59f02c0	 ldr       r0, [pc, #0x2C0]
  00084	e59f1278	 ldr       r1, [pc, #0x278]
  00088	e5820000	 str       r0, [r2]
  0008c	e59f02b0	 ldr       r0, [pc, #0x2B0]
  00090	e59f2264	 ldr       r2, [pc, #0x264]
  00094	e5810000	 str       r0, [r1]
  00098	e59f02a0	 ldr       r0, [pc, #0x2A0]
  0009c	e59f1250	 ldr       r1, [pc, #0x250]
  000a0	e5820000	 str       r0, [r2]
  000a4	e59f0290	 ldr       r0, [pc, #0x290]
  000a8	e59f223c	 ldr       r2, [pc, #0x23C]
  000ac	e5810000	 str       r0, [r1]
  000b0	e59f0280	 ldr       r0, [pc, #0x280]
  000b4	e59f1228	 ldr       r1, [pc, #0x228]
  000b8	e5820000	 str       r0, [r2]
  000bc	e59f0270	 ldr       r0, [pc, #0x270]
  000c0	e59f2214	 ldr       r2, [pc, #0x214]
  000c4	e5810000	 str       r0, [r1]
  000c8	e59f0204	 ldr       r0, [pc, #0x204]
  000cc	e59f11f8	 ldr       r1, [pc, #0x1F8]
  000d0	e5807000	 str       r7, [r0]

; 266  :         pAdapter->SysIntrVal  = SYSINTR_ETHER;

  000d4	e3a00017	 mov       r0, #0x17
  000d8	e5817000	 str       r7, [r1]

; 267  : 
; 268  : 
; 269  :         //
; 270  :         // CS8950 DMA's to SDRAM.  Need to give the library a physical and virtual
; 271  :         // address to uncached memory.
; 272  :         //
; 273  :         bTemp = CS8950DMAInit
; 274  :         (
; 275  :             CS8950_PHYSICAL_MEMORY, 
; 276  :             CS8950_VIRTUAL_MEMORY, 
; 277  :             CS8950_MEMORY_SIZE
; 278  :         );

  000dc	e3a0120a	 mov       r1, #0xA, 4
  000e0	e5827000	 str       r7, [r2]
  000e4	e3811801	 orr       r1, r1, #1, 16
  000e8	e586000c	 str       r0, [r6, #0xC]
  000ec	e3a02803	 mov       r2, #3, 16
  000f0	e3a00801	 mov       r0, #1, 16
  000f4	eb000000	 bl        CS8950DMAInit

; 279  : 
; 280  :         if(!bTemp)

  000f8	e3500000	 cmp       r0, #0

; 281  :         {
; 282  :             EdbgOutputDebugString("ERROR: Failed to Initialize CS8950 DMA buffer.\r\n");

  000fc	059f022c	 ldreq     r0, [pc, #0x22C]
  00100	0a000049	 beq       |$L14455|

; 283  :             return FALSE;
; 284  :         }
; 285  : 
; 286  : 
; 287  :         //
; 288  :         // We need to do this since the board does not have a MAC address.
; 289  :         // Lets use the same mac address as eboot.
; 290  :         //
; 291  :         CS8950WriteEEPROM(0, pDriverGlobals->eth.EdbgAddr.wMAC[0]);

  00104	e59f0220	 ldr       r0, [pc, #0x220]
  00108	e1d010b0	 ldrh      r1, [r0]
  0010c	e3a00000	 mov       r0, #0
  00110	eb000000	 bl        CS8950WriteEEPROM

; 292  :         CS8950WriteEEPROM(1, pDriverGlobals->eth.EdbgAddr.wMAC[1]);

  00114	e59f320c	 ldr       r3, [pc, #0x20C]
  00118	e3a00001	 mov       r0, #1
  0011c	e1d310b0	 ldrh      r1, [r3]
  00120	eb000000	 bl        CS8950WriteEEPROM

; 293  :         CS8950WriteEEPROM(2, pDriverGlobals->eth.EdbgAddr.wMAC[2]);

  00124	e59f31f8	 ldr       r3, [pc, #0x1F8]
  00128	e3a00002	 mov       r0, #2
  0012c	e1d310b0	 ldrh      r1, [r3]
  00130	eb000000	 bl        CS8950WriteEEPROM

; 294  :         EdbgOutputDebugString("INFO: EDBG using Internal EP931x controller.\r\n");

  00134	e59f01e4	 ldr       r0, [pc, #0x1E4]

; 295  :         break;

  00138	ea000025	 b         |$L14453|
  0013c		 |$L14165|

; 206  : #if 0
; 207  :     case EDBG_ADAPTER_SMC9000:
; 208  :         pfnEDbgInit           = SMCInit;
; 209  :         pfnEDbgEnableInts     = SMCEnableInts;     
; 210  :         pfnEDbgDisableInts    = SMCDisableInts;    
; 211  :         pfnEDbgGetPendingInts = SMCGetPendingInterrupts; 
; 212  :         pfnEDbgGetFrame       = SMCGetFrame;       
; 213  :         pfnEDbgSendFrame      = SMCSendFrame;      
; 214  :         pfnEDbgReadEEPROM     = SMCReadEEPROM;     
; 215  :         pfnEDbgWriteEEPROM    = SMCWriteEEPROM;
; 216  :         pfnEDbgSetOptions     = SMCSetOptions;
; 217  :         pfnCurrentPacketFilter= NULL;
; 218  :         pfnMulticastList      = NULL;
; 219  :         pulEthernetBase       = (ULONG *)0x12345678;
; 220  : 
; 221  :         EdbgOutputDebugString("INFO: EDBG using SMC9000 controller.\r\n");
; 222  :         break;
; 223  : #endif // 0
; 224  : 
; 225  :     //
; 226  :     // Ethernet base needs to be passed in from eboot.
; 227  :     // TODO
; 228  :     //
; 229  :     case EDBG_ADAPTER_NE2000:
; 230  :         pfnEDbgInit           = NE2000Init;

  0013c	e59f01d8	 ldr       r0, [pc, #0x1D8]

; 231  :         pfnEDbgEnableInts     = NE2000EnableInts;     
; 232  :         pfnEDbgDisableInts    = NE2000DisableInts;    
; 233  :         pfnEDbgGetPendingInts = NE2000GetPendingInts; 
; 234  :         pfnEDbgGetFrame       = NE2000GetFrame;       
; 235  :         pfnEDbgSendFrame      = NE2000SendFrame;      
; 236  :         pfnEDbgReadEEPROM     = NE2000ReadEEPROM;     
; 237  :         pfnEDbgWriteEEPROM    = NE2000WriteEEPROM;    
; 238  :         pfnEDbgSetOptions     = NE2000SetOptions;
; 239  :         pfnCurrentPacketFilter= Ne2000CurrentPacketFilter;
; 240  :         pfnMulticastList      = NE2000MulticastList;
; 241  :         pulEthernetBase       = (ULONG *)(PCMCIACARD_IO + 0x320);

  00140	e3a044b1	 mov       r4, #0xB1, 8
  00144	e59f51cc	 ldr       r5, [pc, #0x1CC]
  00148	e3844e32	 orr       r4, r4, #0x32, 28
  0014c	e59f11c0	 ldr       r1, [pc, #0x1C0]
  00150	e5850000	 str       r0, [r5]
  00154	e59f01b4	 ldr       r0, [pc, #0x1B4]
  00158	e59f21ac	 ldr       r2, [pc, #0x1AC]
  0015c	e5810000	 str       r0, [r1]
  00160	e59f01a0	 ldr       r0, [pc, #0x1A0]
  00164	e59f1198	 ldr       r1, [pc, #0x198]
  00168	e5820000	 str       r0, [r2]
  0016c	e59f018c	 ldr       r0, [pc, #0x18C]
  00170	e59f2184	 ldr       r2, [pc, #0x184]
  00174	e5810000	 str       r0, [r1]
  00178	e59f0178	 ldr       r0, [pc, #0x178]
  0017c	e59f1170	 ldr       r1, [pc, #0x170]
  00180	e5820000	 str       r0, [r2]
  00184	e59f0164	 ldr       r0, [pc, #0x164]
  00188	e59f215c	 ldr       r2, [pc, #0x15C]
  0018c	e5810000	 str       r0, [r1]
  00190	e59f0150	 ldr       r0, [pc, #0x150]
  00194	e59f1148	 ldr       r1, [pc, #0x148]
  00198	e5820000	 str       r0, [r2]
  0019c	e59f013c	 ldr       r0, [pc, #0x13C]
  001a0	e59f2134	 ldr       r2, [pc, #0x134]
  001a4	e5810000	 str       r0, [r1]
  001a8	e59f0128	 ldr       r0, [pc, #0x128]
  001ac	e59f1120	 ldr       r1, [pc, #0x120]
  001b0	e5820000	 str       r0, [r2]
  001b4	e59f0114	 ldr       r0, [pc, #0x114]
  001b8	e59f210c	 ldr       r2, [pc, #0x10C]
  001bc	e5810000	 str       r0, [r1]
  001c0	e59f0100	 ldr       r0, [pc, #0x100]
  001c4	e5820000	 str       r0, [r2]

; 242  : 
; 243  :         //
; 244  :         // TODO - Change the interrupt later.
; 245  :         //
; 246  :         pAdapter->SysIntrVal  = KITL_SYSINTR_NOINTR;

  001c8	e3e00000	 mvn       r0, #0
  001cc	e586000c	 str       r0, [r6, #0xC]

; 247  :         EdbgOutputDebugString("INFO: EDBG using NE2000 controller.\r\n");

  001d0	e59f00ec	 ldr       r0, [pc, #0xEC]
  001d4		 |$L14453|
  001d4	eb000000	 bl        EdbgOutputDebugString

; 304  :     }
; 305  : 
; 306  :     //
; 307  :     // Initialize the ethernet device.
; 308  :     //
; 309  :     //
; 310  :     if (!pfnEDbgInit((BYTE *) pulEthernetBase,1,pAdapter->Addr.wMAC) )

  001d8	e5953000	 ldr       r3, [r5]
  001dc	e2862004	 add       r2, r6, #4
  001e0	e3a01001	 mov       r1, #1
  001e4	e1a00004	 mov       r0, r4
  001e8	e1a0e00f	 mov       lr, pc
  001ec	e12fff13	 bx        r3
  001f0	e3500000	 cmp       r0, #0

; 311  :     {
; 312  :         return (FALSE);

  001f4	0a00000d	 beq       |$L14454|

; 313  :     }
; 314  : 
; 315  :     //
; 316  :     // Check the MAC address - this can be invalid if the switches are set wrong.
; 317  :     //
; 318  :     if ( !pAdapter->Addr.wMAC[0] && !pAdapter->Addr.wMAC[1] && !pAdapter->Addr.wMAC[2] ) 

  001f8	e1d600b4	 ldrh      r0, [r6, #4]
  001fc	e1a01800	 mov       r1, r0, lsl #16
  00200	e1b02821	 movs      r2, r1, lsr #16
  00204	1a00000b	 bne       |$L14184|
  00208	e1d600b6	 ldrh      r0, [r6, #6]
  0020c	e1a01800	 mov       r1, r0, lsl #16
  00210	e1b02821	 movs      r2, r1, lsr #16
  00214	1a000007	 bne       |$L14184|
  00218	e1d600b8	 ldrh      r0, [r6, #8]
  0021c	e1a01800	 mov       r1, r0, lsl #16
  00220	e1b02821	 movs      r2, r1, lsr #16
  00224	1a000003	 bne       |$L14184|

; 319  :     {
; 320  :         EdbgOutputDebugString
; 321  :         (
; 322  :             "Invalid Ethernet address read from the debug ethernet controller, check switch settings\n"
; 323  :         );

  00228	e59f0090	 ldr       r0, [pc, #0x90]
  0022c		 |$L14455|
  0022c	eb000000	 bl        EdbgOutputDebugString
  00230		 |$L14454|

; 324  :         return (FALSE);

  00230	e1a00007	 mov       r0, r7
  00234	ea00001c	 b         |$L14153|
  00238		 |$L14184|

; 325  :     }
; 326  : 
; 327  :     //
; 328  :     // Save out local mac address.
; 329  :     //
; 330  :     memcpy ((char *)wLocalMAC, pAdapter->Addr.wMAC, sizeof(wLocalMAC));

  00238	e59f507c	 ldr       r5, [pc, #0x7C]
  0023c	e2861004	 add       r1, r6, #4
  00240	e3a02006	 mov       r2, #6
  00244	e1a00005	 mov       r0, r5
  00248	eb000000	 bl        memcpy

; 331  :     
; 332  :     EdbgOutputDebugString("Debug Ethernet card initialized, MAC Address:%B:%B:%B:%B:%B:%B\r\n",
; 333  :                           pAdapter->Addr.wMAC[0] & 0x00FF, pAdapter->Addr.wMAC[0] >> 8,
; 334  :                           pAdapter->Addr.wMAC[1] & 0x00FF, pAdapter->Addr.wMAC[1] >> 8,
; 335  :                           pAdapter->Addr.wMAC[2] & 0x00FF, pAdapter->Addr.wMAC[2] >> 8  );

  0024c	e1d630b8	 ldrh      r3, [r6, #8]
  00250	e1d610b6	 ldrh      r1, [r6, #6]
  00254	e1a00803	 mov       r0, r3, lsl #16

⌨️ 快捷键说明

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