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

📄 halkitl.cod

📁 EP9315的BSP包(WINCE下的BSP,内有各种驱动的详细的代码)
💻 COD
📖 第 1 页 / 共 2 页
字号:
  000d0	e28d2000	 add       r2, sp, #0
  000d4	e28d1004	 add       r1, sp, #4
  000d8	e1a00006	 mov       r0, r6
  000dc	eb000000	 bl        EbootGetDHCPAddr
  000e0	e3500000	 cmp       r0, #0
  000e4	1a000001	 bne       |$L14192|
  000e8		 |$L14195|

; 182  :             return FALSE;

  000e8	e3a07000	 mov       r7, #0
  000ec	ea000039	 b         |$L14081|
  000f0		 |$L14192|
  000f0	e5961000	 ldr       r1, [r6]
  000f4		 |$L14095|

; 183  :     }
; 184  : 
; 185  :     MyAddr.wPort = htons (EDBG_SVC_PORT);

  000f4	e3a00cd5	 mov       r0, #0xD5, 24
  000f8	e3800003	 orr       r0, r0, #3
  000fc	e1c600ba	 strh      r0, [r6, #0xA]

; 186  :     KITLOutputDebugString ("Device %s, IP %s, Port %d\n", pKitl->szName, inet_ntoa (MyAddr.dwIP), htons (MyAddr.wPort));

  00100	e1a00001	 mov       r0, r1
  00104	eb000000	 bl        inet_ntoa
  00108	e1a04000	 mov       r4, r0
  0010c	e1d600ba	 ldrh      r0, [r6, #0xA]
  00110	e1a03800	 mov       r3, r0, lsl #16
  00114	e1a01823	 mov       r1, r3, lsr #16
  00118	e1a00401	 mov       r0, r1, lsl #8
  0011c	e1a02800	 mov       r2, r0, lsl #16
  00120	e1a01822	 mov       r1, r2, lsr #16
  00124	e1a00801	 mov       r0, r1, lsl #16
  00128	e1a02820	 mov       r2, r0, lsr #16
  0012c	e59f00d8	 ldr       r0, [pc, #0xD8]
  00130	e1823c23	 orr       r3, r2, r3, lsr #24
  00134	e1a02004	 mov       r2, r4
  00138	e1a01005	 mov       r1, r5
  0013c	eb000000	 bl        EdbgOutputDebugString

; 187  : 
; 188  :     // initialize KITL Ethernet transport layer
; 189  :     if (!KitlEtherInit (&MyAddr, dwDHCPLeaseTime)) {

  00140	e59d1000	 ldr       r1, [sp]
  00144	e1a00006	 mov       r0, r6
  00148	eb000000	 bl        KitlEtherInit
  0014c	e3500000	 cmp       r0, #0
  00150	1a000002	 bne       |$L14105|

; 190  :         KITLOutputDebugString ("Unable to initialize KITL Ether transport\n");

  00154	e59f00ac	 ldr       r0, [pc, #0xAC]
  00158	eb000000	 bl        EdbgOutputDebugString

; 191  :         return FALSE;

  0015c	ea00001d	 b         |$L14081|
  00160		 |$L14105|

; 192  :     }
; 193  :     
; 194  :     // fill in the blanks in KITLTRANSPORT structure.
; 195  :     pKitl->FrmHdrSize = KitlEtherGetFrameHdrSize ();

  00160	eb000000	 bl        KitlEtherGetFrameHdrSize

; 196  :     pKitl->Interrupt = (UCHAR) adp.SysIntrVal;
; 197  :     pKitl->dwPhysBuffer = EDBG_VIRTUAL_MEMORY;
; 198  :     pKitl->dwPhysBufLen = EDBG_MEMORY_SIZE;	// 128K of buffer available
; 199  :     pKitl->dwBootFlags = 0;
; 200  :     pKitl->WindowSize = EDBG_WINDOW_SIZE;
; 201  :     pKitl->pfnDecode = KitlEtherDecodeUDP;
; 202  :     pKitl->pfnEncode = KitlEtherEncodeUDP;
; 203  :     pKitl->pfnSend = EthSendFrame;

  00164	e59f2098	 ldr       r2, [pc, #0x98]
  00168	e5c80016	 strb      r0, [r8, #0x16]
  0016c	e3a09102	 mov       r9, #2, 2
  00170	e59d0014	 ldr       r0, [sp, #0x14]
  00174	e3899701	 orr       r9, r9, #1, 14

; 204  :     pKitl->pfnRecv = OEMEthGetFrame;

  00178	e59f3080	 ldr       r3, [pc, #0x80]
  0017c	e3a0a702	 mov       r10, #2, 14
  00180	e20010ff	 and       r1, r0, #0xFF
  00184	e5c80014	 strb      r0, [r8, #0x14]
  00188	e3a00008	 mov       r0, #8

; 205  :     pKitl->pfnEnableInt = KitlEthEnableInts;
; 206  :     pKitl->pfnSetHostCfg = SetHostCfg;
; 207  :     pKitl->pfnGetDevCfg = GetDevCfg;

  0018c	e59f1068	 ldr       r1, [pc, #0x68]
  00190	e5c80015	 strb      r0, [r8, #0x15]
  00194	e59f005c	 ldr       r0, [pc, #0x5C]
  00198	e59f5054	 ldr       r5, [pc, #0x54]
  0019c	e59f404c	 ldr       r4, [pc, #0x4C]
  001a0	e59f6044	 ldr       r6, [pc, #0x44]
  001a4	e5880020	 str       r0, [r8, #0x20]

; 208  : 
; 209  :     KITLOutputDebugString ("-InitEther\n");

  001a8	e59f0038	 ldr       r0, [pc, #0x38]
  001ac	e5887000	 str       r7, [r8]
  001b0	e5889018	 str       r9, [r8, #0x18]
  001b4	e588a01c	 str       r10, [r8, #0x1C]
  001b8	e5885024	 str       r5, [r8, #0x24]
  001bc	e5882028	 str       r2, [r8, #0x28]
  001c0	e588302c	 str       r3, [r8, #0x2C]
  001c4	e5884030	 str       r4, [r8, #0x30]
  001c8	e5881034	 str       r1, [r8, #0x34]
  001cc	e5886038	 str       r6, [r8, #0x38]
  001d0	eb000000	 bl        EdbgOutputDebugString

; 210  : 
; 211  :     return TRUE;

  001d4	e3a07001	 mov       r7, #1
  001d8		 |$L14081|

; 144  :         return FALSE;

  001d8	e1a00007	 mov       r0, r7

; 212  : }

  001dc	e28dd020	 add       sp, sp, #0x20
  001e0	e8bd47f0	 ldmia     sp!, {r4 - r10, lr}
  001e4	e12fff1e	 bx        lr
  001e8		 |$L14200|
  001e8	00000000	 DCD       |??_C@_0M@DHJI@?9InitEther?6?$AA@|
  001ec	00000000	 DCD       |SetHostCfg|
  001f0	00000000	 DCD       |KitlEthEnableInts|
  001f4	00000000	 DCD       |KitlEtherDecodeUDP|
  001f8	00000000	 DCD       |KitlEtherEncodeUDP|
  001fc	00000000	 DCD       |GetDevCfg|
  00200	00000000	 DCD       |OEMEthGetFrame|
  00204	00000000	 DCD       |EthSendFrame|
  00208	00000000	 DCD       |??_C@_0CL@FJON@Unable?5to?5initialize?5KITL?5Ether?5@|
  0020c	00000000	 DCD       |??_C@_0BL@KGFO@Device?5?$CFs?0?5IP?5?$CFs?0?5Port?5?$CFd?6?$AA@|
  00210	00000000	 DCD       |??_C@_0BH@PGGC@Using?5device?5name?3?5?$CFs?6?$AA@|
  00214	a0008864	 DCD       0xa0008864
  00218	45424f54	 DCD       0x45424f54
  0021c	00000000	 DCD       |MyAddr|
  00220	00000000	 DCD       |??_C@_0M@EILI@?$CLInitEther?6?$AA@|
  00224		 |$M14197|

			 ENDP  ; |InitEther|


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

  00000			 AREA	 |.pdata$$GetDevCfg|, PDATA, SELECTION=5, ASSOC=|.text| { |GetDevCfg| } ; comdat associative
|$T14208| DCD	|GetDevCfg|
	DCD	0x40001401
; Function compile flags: /Ogsy

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

  00000		 |GetDevCfg| PROC

; 98   : {

  00000	e92d4010	 stmdb     sp!, {r4, lr}
  00004		 |$M14206|
  00004	e1a03000	 mov       r3, r0
  00008	e1a04001	 mov       r4, r1

; 99   :     // put our IP info in the buffer
; 100  :     if (*pcbBuf < sizeof (MyAddr)) {

  0000c	e1d400b0	 ldrh      r0, [r4]
  00010	e1a01800	 mov       r1, r0, lsl #16
  00014	e1a02821	 mov       r2, r1, lsr #16
  00018	e352000c	 cmp       r2, #0xC

; 101  :         return FALSE;

  0001c	33a00000	 movcc     r0, #0

; 107  : }

  00020	38bd4010	 ldmccia   sp!, {r4, lr}
  00024	312fff1e	 bxcc      lr

; 102  :     }
; 103  :         
; 104  :     memcpy (pBuf, &MyAddr, sizeof (MyAddr));

  00028	e59f101c	 ldr       r1, [pc, #0x1C]
  0002c	e3a0200c	 mov       r2, #0xC
  00030	e1a00003	 mov       r0, r3
  00034	eb000000	 bl        memcpy

; 105  :     *pcbBuf = sizeof (MyAddr);

  00038	e3a0300c	 mov       r3, #0xC
  0003c	e1c430b0	 strh      r3, [r4]

; 106  :     return TRUE;

  00040	e3a00001	 mov       r0, #1

; 107  : }

  00044	e8bd4010	 ldmia     sp!, {r4, lr}
  00048	e12fff1e	 bx        lr
  0004c		 |$L14210|
  0004c	00000000	 DCD       |MyAddr|
  00050		 |$M14207|

			 ENDP  ; |GetDevCfg|


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

  00000			 AREA	 |.pdata$$SetHostCfg|, PDATA, SELECTION=5, ASSOC=|.text| { |SetHostCfg| } ; comdat associative
|$T14216| DCD	|SetHostCfg|
	DCD	0x40000200
; Function compile flags: /Ogsy

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

  00000		 |SetHostCfg| PROC

; 110  : {

  00000		 |$M14214|

; 111  :     // we automatically figure out the host address info during initial 
; 112  :     // handshake. No need to handle host cfg data here.
; 113  :     return TRUE;

  00000	e3a00001	 mov       r0, #1

; 114  : }

  00004	e12fff1e	 bx        lr
  00008		 |$M14215|

			 ENDP  ; |SetHostCfg|

	IMPORT	|OEMEthSendFrame|

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

  00000			 AREA	 |.pdata$$EthSendFrame|, PDATA, SELECTION=5, ASSOC=|.text| { |EthSendFrame| } ; comdat associative
|$T14225| DCD	|EthSendFrame|
	DCD	0x40000801
; Function compile flags: /Ogsy

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

  00000		 |EthSendFrame| PROC

; 117  : {

  00000	e52de004	 str       lr, [sp, #-4]!
  00004		 |$M14223|
  00004	e1a02000	 mov       r2, r0

; 118  : 
; 119  :     return (OEMEthSendFrame(pData, (DWORD)nLength));

  00008	e1a00801	 mov       r0, r1, lsl #16
  0000c	e1a01820	 mov       r1, r0, lsr #16
  00010	e1a00002	 mov       r0, r2
  00014	eb000000	 bl        OEMEthSendFrame

; 120  : 
; 121  : }

  00018	e8bd4000	 ldmia     sp!, {lr}
  0001c	e12fff1e	 bx        lr
  00020		 |$M14224|

			 ENDP  ; |EthSendFrame|

	EXPORT	|OEMKitlInit|
	EXPORT	|??_C@_0O@LGLA@?$CLOEMKitlInit?6?$AA@| [ DATA ] ; `string'
	EXPORT	|??_C@_0O@FBNM@?9OEMKitlInit?6?$AA@| [ DATA ] ; `string'
	IMPORT	|OEMInitDebugSerial|

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

  00000			 AREA	 |.pdata$$OEMKitlInit|, PDATA, SELECTION=5, ASSOC=|.text| { |OEMKitlInit| } ; comdat associative
|$T14236| DCD	|OEMKitlInit|
	DCD	0x40003201

  00000			 AREA	 |.rdata| { |??_C@_0O@LGLA@?$CLOEMKitlInit?6?$AA@| }, DATA, READONLY, SELECTION=2 ; comdat any
|??_C@_0O@LGLA@?$CLOEMKitlInit?6?$AA@| DCB "+OEMKitlInit", 0xa, 0x0 ; `string'

  00000			 AREA	 |.rdata| { |??_C@_0O@FBNM@?9OEMKitlInit?6?$AA@| }, DATA, READONLY, SELECTION=2 ; comdat any
|??_C@_0O@FBNM@?9OEMKitlInit?6?$AA@| DCB "-OEMKitlInit", 0xa, 0x0 ; `string'
; Function compile flags: /Ogsy

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

  00000		 |OEMKitlInit| PROC

; 225  : {

  00000	e92d4010	 stmdb     sp!, {r4, lr}
  00004		 |$M14234|
  00004	e1a04000	 mov       r4, r0

; 226  :     BOOL    bReturn = FALSE;
; 227  :     
; 228  : 
; 229  :     OEMInitDebugSerial();

  00008	eb000000	 bl        OEMInitDebugSerial

; 230  :     KITLOutputDebugString ("+OEMKitlInit\n");

  0000c	e59f00b0	 ldr       r0, [pc, #0xB0]
  00010	eb000000	 bl        EdbgOutputDebugString

; 231  : 
; 232  :     //
; 233  :     // Try to find a transport available
; 234  :     // In our case we need to find out which transport was used to download.
; 235  :     //
; 236  :     if(pDriverGlobals->eth.EbootMagicNum == PARALLEL_MAGIC_NUM)

  00014	e59f10a4	 ldr       r1, [pc, #0xA4]
  00018	e3a0320a	 mov       r3, #0xA, 4
  0001c	e3833b22	 orr       r3, r3, #0x22, 22
  00020	e5930000	 ldr       r0, [r3]
  00024	e1500001	 cmp       r0, r1
  00028	1a000002	 bne       |$L14115|

; 237  :     {
; 238  :         bReturn = InitParallelSerial(pKitl);

  0002c	e1a00004	 mov       r0, r4
  00030	eb000000	 bl        InitParallelSerial

; 239  :     }
; 240  :     else if (pDriverGlobals->eth.EbootMagicNum == EBOOT_MAGIC_NUM) 

  00034	ea000014	 b         |$L14232|
  00038		 |$L14115|
  00038	e59f107c	 ldr       r1, [pc, #0x7C]
  0003c	e1500001	 cmp       r0, r1

; 241  :     {
; 242  :         bActiveKitl = TRUE;
; 243  :         bReturn = InitEther (pKitl);
; 244  :     }
; 245  :     else

  00040	0a00000c	 beq       |$L14233|

; 246  :     {
; 247  :         pDriverGlobals->eth.EdbgHardwareType = EDBG_ADAPTER_CS8950;

  00044	e59f106c	 ldr       r1, [pc, #0x6C]
  00048	e3a00012	 mov       r0, #0x12

; 248  :         pDriverGlobals->eth.EdbgAddr.wMAC[0] = 0x2400; 

  0004c	e59f2060	 ldr       r2, [pc, #0x60]
  00050	e5810000	 str       r0, [r1]
  00054	e3a00b09	 mov       r0, #9, 22
  00058	e1c200b0	 strh      r0, [r2]

; 249  :         pDriverGlobals->eth.EdbgAddr.wMAC[1] = 0x1020;
; 250  :         pDriverGlobals->eth.EdbgAddr.wMAC[1] = 0x3412;

  0005c	e3a00b0d	 mov       r0, #0xD, 22
  00060	e59f1048	 ldr       r1, [pc, #0x48]
  00064	e3800012	 orr       r0, r0, #0x12

; 251  :         pDriverGlobals->eth.EdbgAddr.dwIP    = 0;

  00068	e59f203c	 ldr       r2, [pc, #0x3C]
  0006c	e1c100b0	 strh      r0, [r1]
  00070	e3a00000	 mov       r0, #0
  00074	e5820000	 str       r0, [r2]
  00078		 |$L14233|

; 252  : 
; 253  :         bActiveKitl = TRUE;

  00078	e59f0028	 ldr       r0, [pc, #0x28]
  0007c	e3a01001	 mov       r1, #1
  00080	e5801000	 str       r1, [r0]

; 254  :         bReturn = InitEther (pKitl);

  00084	e1a00004	 mov       r0, r4
  00088	eb000000	 bl        InitEther
  0008c		 |$L14232|
  0008c	e1a04000	 mov       r4, r0

; 255  :     }
; 256  : 
; 257  : 
; 258  :     KITLOutputDebugString ("-OEMKitlInit\n");

  00090	e59f000c	 ldr       r0, [pc, #0xC]
  00094	eb000000	 bl        EdbgOutputDebugString

; 259  :     return bReturn;

  00098	e1a00004	 mov       r0, r4

; 260  : }

  0009c	e8bd4010	 ldmia     sp!, {r4, lr}
  000a0	e12fff1e	 bx        lr
  000a4		 |$L14238|
  000a4	00000000	 DCD       |??_C@_0O@FBNM@?9OEMKitlInit?6?$AA@|
  000a8	00000000	 DCD       |bActiveKitl|
  000ac	a0008810	 DCD       0xa0008810
  000b0	a0008816	 DCD       0xa0008816
  000b4	a0008814	 DCD       0xa0008814
  000b8	a0008860	 DCD       0xa0008860
  000bc	45424f54	 DCD       0x45424f54
  000c0	50415241	 DCD       0x50415241
  000c4	00000000	 DCD       |??_C@_0O@LGLA@?$CLOEMKitlInit?6?$AA@|
  000c8		 |$M14235|

			 ENDP  ; |OEMKitlInit|

	END

⌨️ 快捷键说明

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