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

📄 halether.cod

📁 EP9315的BSP包(WINCE下的BSP,内有各种驱动的详细的代码)
💻 COD
📖 第 1 页 / 共 5 页
字号:
; Listing generated by Microsoft (R) Optimizing Compiler Version 12.20.9615 

	TTL	d:\wince420\platform\ep931x\kernel\hal\.\halether.c
	CODE32

  00000			 AREA	 |.drectve|, DRECTVE
	DCB	"-defaultlib:coredll.lib "
	DCB	"-defaultlib:corelibc.lib "

	EXPORT	|bNewFilter| [ DATA ]
	EXPORT	|bNewMulticast| [ DATA ]

  00000			 AREA	 |.data|, DATA
	 COMMON	|pfnEDbgInit|, 0x4

	 COMMON	|pfnEDbgEnableInts|, 0x4

	 COMMON	|pfnEDbgDisableInts|, 0x4

	 COMMON	|pfnEDbgGetPendingInts|, 0x4

	 COMMON	|pfnEDbgGetFrame|, 0x4

	 COMMON	|pfnEDbgSendFrame|, 0x4

	 COMMON	|pfnEDbgReadEEPROM|, 0x4

	 COMMON	|pfnEDbgWriteEEPROM|, 0x4

	 COMMON	|pfnEDbgSetOptions|, 0x4

	 COMMON	|pfnCurrentPacketFilter|, 0x4

	 COMMON	|pfnMulticastList|, 0x4

	 COMMON	|RcvBuf|, 0x5dc

	 COMMON	|wLocalMAC|, 0x6


  00000			 AREA	 |.bss|, NOINIT
|bNewFilter| %	0x4

  00000			 AREA	 |.data|, DATA
	 COMMON	|dwFilter|, 0x4


  00004			 AREA	 |.bss|, NOINIT
|bNewMulticast| % 0x4

  00000			 AREA	 |.data|, DATA
	 COMMON	|dwNoOfEntry|, 0x4

	 COMMON	|ucMultiAddr|, 0xc0


  00000			 AREA	 |.rdata|, DATA, READONLY
|EdbgVendorIds| DCW 0x0
	DCW	0x0
	DCD	0x4033
	DCB	0x1
	DCB	"AD", 0x0
	DCW	0x1050
	DCW	0x940
	DCD	0x4005
	DCB	0x1
	DCB	"LS", 0x0
	DCW	0x1050
	DCW	0x940
	DCD	0x2078
	DCB	0x1
	DCB	"LS", 0x0
	DCW	0x10ec
	DCW	0x8029
	DCD	0xc0f0
	DCB	0x1
	DCB	"KS", 0x0
	DCW	0x10ec
	DCW	0x8129
	DCD	0x0
	DCB	0x4
	DCB	"RT", 0x0
	DCW	0x10ec
	DCW	0x8139
	DCD	0x900b
	DCB	0x4
	DCB	"RT", 0x0
	DCW	0x10ec
	DCW	0x8139
	DCD	0xd0c9
	DCB	0x4
	DCB	"RT", 0x0
	DCW	0x10ec
	DCW	0x8139
	DCD	0xe04c
	DCB	0x4
	DCB	"RT", 0x0
	DCW	0x1186
	DCW	0x1300
	DCD	0x50ba
	DCB	0x4
	DCB	"DL", 0x0
	DCW	0x100b
	DCW	0x20
	DCD	0xa0cc
	DCB	0x5
	DCB	"NG", 0x0
	DCW	0x10b7
	DCW	0x9050
	DCD	0x6008
	DCB	0x6
	DCB	"3C", 0x0
	DCW	0x10b7
	DCW	0x9200
	DCD	0x476
	DCB	0x6
	DCB	"3C", 0x0
	EXPORT	|CreateDeviceName|
	IMPORT	|strlen|
; File d:\wince420\platform\ep931x\kernel\hal\halether.c

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

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

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

  00000		 |CreateDeviceName| PROC

; 156  : {

  00000	e92d4030	 stmdb     sp!, {r4, r5, lr}
  00004		 |$M14410|
  00004	e1a04000	 mov       r4, r0
  00008	e1a05001	 mov       r5, r1

; 157  :     //int i;
; 158  :     DWORD dwUpperMAC = UpperDWFromMAC(pMyAddr);

  0000c	eb000000	 bl        UpperDWFromMAC

; 159  : 
; 160  :     strcpy(szBuf,EBOOT_PLATFORM_STRING);

  00010	e3a0004f	 mov       r0, #0x4F
  00014	e5c50001	 strb      r0, [r5, #1]
  00018	e3a00000	 mov       r0, #0
  0001c	e3a03052	 mov       r3, #0x52
  00020	e5c50003	 strb      r0, [r5, #3]
  00024	e3a01042	 mov       r1, #0x42
  00028	e5c53000	 strb      r3, [r5]

; 161  :     szBuf += strlen(szBuf);    

  0002c	e1a00005	 mov       r0, r5
  00030	e5c51002	 strb      r1, [r5, #2]
  00034	eb000000	 bl        strlen
  00038	e1a03000	 mov       r3, r0

; 162  :     itoa10(((pMyAddr->wMAC[2]>>8) | ((pMyAddr->wMAC[2] & 0x00ff) << 8)), szBuf);

  0003c	e1d400b8	 ldrh      r0, [r4, #8]
  00040	e0831005	 add       r1, r3, r5
  00044	e1a04800	 mov       r4, r0, lsl #16
  00048	e1a02824	 mov       r2, r4, lsr #16
  0004c	e20200ff	 and       r0, r2, #0xFF
  00050	e1a02400	 mov       r2, r0, lsl #8
  00054	e1820c24	 orr       r0, r2, r4, lsr #24
  00058	eb000000	 bl        itoa10

; 163  : }

  0005c	e8bd4030	 ldmia     sp!, {r4, r5, lr}
  00060	e12fff1e	 bx        lr
  00064		 |$M14411|

			 ENDP  ; |CreateDeviceName|


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

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

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

  00000		 |itoa10| PROC

; 107  : {

  00000	e92d40f0	 stmdb     sp!, {r4 - r7, lr}
  00004		 |$M14434|
  00004	e1a04000	 mov       r4, r0
  00008	e1a06001	 mov       r6, r1

; 108  :     int i = 0; 

  0000c	e3a07000	 mov       r7, #0

; 109  : 
; 110  :     // Get absolute value of number
; 111  :     unsigned int val = (unsigned int)((n < 0) ? -n : n);

  00010	e3540000	 cmp       r4, #0
  00014	e2642000	 rsb       r2, r4, #0
  00018	e1a05007	 mov       r5, r7
  0001c	51a02004	 movpl     r2, r4
  00020		 |$L14130|

; 112  : 
; 113  :     // Extract digits in reverse order
; 114  :     do {
; 115  :         s[i++] = (val % 10) + '0';

  00020	e59f0078	 ldr       r0, [pc, #0x78]
  00024	e0810092	 umull     r0, r1, r2, r0
  00028	e1a031a1	 mov       r3, r1, lsr #3
  0002c	e0830103	 add       r0, r3, r3, lsl #2
  00030	e0421080	 sub       r1, r2, r0, lsl #1
  00034	e2812030	 add       r2, r1, #0x30
  00038	e1a00c02	 mov       r0, r2, lsl #24
  0003c	e1a01c40	 mov       r1, r0, asr #24
  00040	e7c51006	 strb      r1, [r5, +r6]

; 116  :     } while (val /= 10);

  00044	e1b02003	 movs      r2, r3
  00048	e2855001	 add       r5, r5, #1
  0004c	1afffff3	 bne       |$L14130|

; 117  : 
; 118  :     // Add sign if number negative
; 119  :     if (n < 0) s[i++] = '-';

  00050	e3540000	 cmp       r4, #0
  00054	43a0002d	 movmi     r0, #0x2D
  00058	47c50006	 strmib    r0, [r5, +r6]
  0005c	42855001	 addmi     r5, r5, #1

; 120  : 
; 121  :     s[i--] = '\0';

  00060	e2454001	 sub       r4, r5, #1
  00064	e7c57006	 strb      r7, [r5, +r6]

; 122  : 
; 123  :     // Reverse string
; 124  :     for (n = 0; n < i; n++, i--) {

  00068	e3540000	 cmp       r4, #0
  0006c	da000009	 ble       |$L14136|
  00070		 |$L14134|
  00070	e1a02007	 mov       r2, r7
  00074	e1a01004	 mov       r1, r4

; 125  :         char swap = s[n];

  00078	e1b230d6	 ldrsb     r3, [r2, +r6]!

; 126  :         s[n] = s[i];

  0007c	e1b100d6	 ldrsb     r0, [r1, +r6]!
  00080	e2877001	 add       r7, r7, #1
  00084	e2444001	 sub       r4, r4, #1
  00088	e1570004	 cmp       r7, r4
  0008c	e5c20000	 strb      r0, [r2]

; 127  :         s[i] = swap;

  00090	e5c13000	 strb      r3, [r1]
  00094	bafffff5	 blt       |$L14134|
  00098		 |$L14136|

; 128  :     }
; 129  : }

  00098	e8bd40f0	 ldmia     sp!, {r4 - r7, lr}
  0009c	e12fff1e	 bx        lr
  000a0		 |$L14438|
  000a0	cccccccd	 DCD       0xcccccccd
  000a4		 |$M14435|

			 ENDP  ; |itoa10|


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

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

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

  00000		 |UpperDWFromMAC| PROC

; 139  : {

  00000	e92d4010	 stmdb     sp!, {r4, lr}
  00004		 |$M14443|
  00004	e1a02000	 mov       r2, r0

; 140  :     DWORD ret;
; 141  : 
; 142  :     //
; 143  :     // The WORDs in wMAC field are in net order, so we need to do some
; 144  :     // serious shifting around.
; 145  :     // A hex ethernet address of 12 34 56 78 9a bc is stored in wMAC array as
; 146  :     // wMAC[0] = 3412, wMAC[1] = 7856, wMAC[2] = bc9a.
; 147  :     // The 4 byte return value should look like 0x00123456
; 148  :     //
; 149  :     ret = (pAddr->wMAC[0] & 0x00ff) << 16;
; 150  :     ret |= pAddr->wMAC[0] & 0xff00;
; 151  :     ret |= pAddr->wMAC[1] & 0x00ff;
; 152  :     return ret;

  00008	e1d200b4	 ldrh      r0, [r2, #4]
  0000c	e1a01800	 mov       r1, r0, lsl #16
  00010	e1d200b6	 ldrh      r0, [r2, #6]
  00014	e1a04821	 mov       r4, r1, lsr #16
  00018	e1a01800	 mov       r1, r0, lsl #16
  0001c	e1a02821	 mov       r2, r1, lsr #16
  00020	e20200ff	 and       r0, r2, #0xFF
  00024	e20430ff	 and       r3, r4, #0xFF
  00028	e1803803	 orr       r3, r0, r3, lsl #16
  0002c	e2041cff	 and       r1, r4, #0xFF, 24
  00030	e1830001	 orr       r0, r3, r1

; 153  : }

  00034	e8bd4010	 ldmia     sp!, {r4, lr}
  00038	e12fff1e	 bx        lr
  0003c		 |$M14444|

			 ENDP  ; |UpperDWFromMAC|

	EXPORT	|OEMEthInit|
	EXPORT	|??_C@_0CG@LKBO@INFO?3?5EDBG?5using?5NE2000?5controll@| [ DATA ] ; `string'
	EXPORT	|??_C@_0DB@LMBN@ERROR?3?5Failed?5to?5Initialize?5CS89@| [ DATA ] ; `string'
	EXPORT	|??_C@_0CP@BOGC@INFO?3?5EDBG?5using?5Internal?5EP931x@| [ DATA ] ; `string'
	EXPORT	|??_C@_0DF@PDDG@Unsupported?5debug?5Ethernet?5param@| [ DATA ] ; `string'
	EXPORT	|??_C@_0FJ@FLNM@Invalid?5Ethernet?5address?5read?5fr@| [ DATA ] ; `string'
	EXPORT	|??_C@_0EB@CCJL@Debug?5Ethernet?5card?5initialized?0@| [ DATA ] ; `string'
	IMPORT	|EdbgOutputDebugString|
	IMPORT	|NE2000Init|
	IMPORT	|NE2000EnableInts|
	IMPORT	|NE2000DisableInts|
	IMPORT	|NE2000GetPendingInts|
	IMPORT	|NE2000GetFrame|
	IMPORT	|NE2000SendFrame|
	IMPORT	|NE2000ReadEEPROM|
	IMPORT	|NE2000WriteEEPROM|
	IMPORT	|NE2000SetOptions|
	IMPORT	|memcpy|
	IMPORT	|Ne2000CurrentPacketFilter|
	IMPORT	|NE2000MulticastList|
	IMPORT	|CS8950Init|
	IMPORT	|CS8950EnableInts|
	IMPORT	|CS8950DisableInts|
	IMPORT	|CS8950GetPendingInterrupts|
	IMPORT	|CS8950GetFrame|
	IMPORT	|VBridgeInit|
	IMPORT	|CS8950SendFrame|
	IMPORT	|CS8950ReadEEPROM|
	IMPORT	|CS8950WriteEEPROM|
	IMPORT	|VBridgeKSetLocalMacAddress|
	IMPORT	|CS8950DMAInit|

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

  00000			 AREA	 |.pdata$$OEMEthInit|, PDATA, SELECTION=5, ASSOC=|.text| { |OEMEthInit| } ; comdat associative
|$T14458| DCD	|OEMEthInit|
	DCD	0x4000da02

  00000			 AREA	 |.rdata| { |??_C@_0DF@PDDG@Unsupported?5debug?5Ethernet?5param@| }, DATA, READONLY, SELECTION=2 ; comdat any
|??_C@_0DF@PDDG@Unsupported?5debug?5Ethernet?5param@| DCB "Unsupported de"
	DCB	"bug Ethernet parameters - adapter: %u", 0xa, 0x0 ; `string'

  00000			 AREA	 |.rdata| { |??_C@_0DB@LMBN@ERROR?3?5Failed?5to?5Initialize?5CS89@| }, DATA, READONLY, SELECTION=2 ; comdat any
|??_C@_0DB@LMBN@ERROR?3?5Failed?5to?5Initialize?5CS89@| DCB "ERROR: Faile"
	DCB	"d to Initialize CS8950 DMA buffer.", 0xd, 0xa, 0x0 ; `string'

⌨️ 快捷键说明

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