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

📄 cfw_platform.cod

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

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

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


  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	|??_C@_1BO@PHGO@?$AAI?$AAn?$AAi?$AAt?$AAC?$AAl?$AAo?$AAc?$AAk?$AA?4?$AA?4?$AA?4?$AA?$AN?$AA?6?$AA?$AA@| [ DATA ] ; `string'
	EXPORT	|??_C@_1EE@DGKC@?$AAP?$AAr?$AAo?$AAc?$AAe?$AAs?$AAs?$AAo?$AAr?$AA?5?$AA?$DN?$AA?5?$AA?$CF?$AAd?$AAM?$AAh?$AAz?$AA?0?$AA?5?$AAB@| [ DATA ] ; `string'
	EXPORT	|OEMInit|
	IMPORT	|NKDbgPrintfW|
	IMPORT	|DebugTimerInit|
	IMPORT	|GetBoardInformation|
	IMPORT	|idleconv|
	IMPORT	|InitClock|
	IMPORT	|OEMInitInterrupts|
	IMPORT	|InitDebugEther|
	IMPORT	|pTOC|
	IMPORT	|lpWriteDebugStringFunc|
	IMPORT	|OEMInitDebugSerial|
	IMPORT	|OEMWriteDebugLED|
; File d:\wince420\platform\ep931x\kernel\hal\cfw_platform.c

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

  00000			 AREA	 |.pdata$$OEMInit|, PDATA, SELECTION=5, ASSOC=|.text| { |OEMInit| } ; comdat associative
|$T14796| DCD	|OEMInit|
	DCD	0x40003001

  00000			 AREA	 |.rdata| { |??_C@_1BO@PHGO@?$AAI?$AAn?$AAi?$AAt?$AAC?$AAl?$AAo?$AAc?$AAk?$AA?4?$AA?4?$AA?4?$AA?$AN?$AA?6?$AA?$AA@| }, DATA, READONLY, SELECTION=2 ; comdat any
|??_C@_1BO@PHGO@?$AAI?$AAn?$AAi?$AAt?$AAC?$AAl?$AAo?$AAc?$AAk?$AA?4?$AA?4?$AA?4?$AA?$AN?$AA?6?$AA?$AA@| DCB "I"
	DCB	0x0, "n", 0x0, "i", 0x0, "t", 0x0, "C", 0x0, "l", 0x0, "o"
	DCB	0x0, "c", 0x0, "k", 0x0, ".", 0x0, ".", 0x0, ".", 0x0, 0xd
	DCB	0x0, 0xa, 0x0, 0x0, 0x0			; `string'

  00000			 AREA	 |.rdata| { |??_C@_1EE@DGKC@?$AAP?$AAr?$AAo?$AAc?$AAe?$AAs?$AAs?$AAo?$AAr?$AA?5?$AA?$DN?$AA?5?$AA?$CF?$AAd?$AAM?$AAh?$AAz?$AA?0?$AA?5?$AAB@| }, DATA, READONLY, SELECTION=2 ; comdat any
|??_C@_1EE@DGKC@?$AAP?$AAr?$AAo?$AAc?$AAe?$AAs?$AAs?$AAo?$AAr?$AA?5?$AA?$DN?$AA?5?$AA?$CF?$AAd?$AAM?$AAh?$AAz?$AA?0?$AA?5?$AAB@| DCB "P"
	DCB	0x0, "r", 0x0, "o", 0x0, "c", 0x0, "e", 0x0, "s", 0x0, "s"
	DCB	0x0, "o", 0x0, "r", 0x0, " ", 0x0, "=", 0x0, " ", 0x0, "%"
	DCB	0x0, "d", 0x0, "M", 0x0, "h", 0x0, "z", 0x0, ",", 0x0, " "
	DCB	0x0, "B", 0x0, "u", 0x0, "s", 0x0, " ", 0x0, "=", 0x0, " "
	DCB	0x0, "%", 0x0, "d", 0x0, "M", 0x0, "h", 0x0, "z", 0x0, " "
	DCB	0x0, 0xd, 0x0, 0xa, 0x0, 0x0, 0x0	; `string'
; Function compile flags: /Ogsy

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

  00000		 |OEMInit| PROC

; 174  : {

  00000	e52de004	 str       lr, [sp, #-4]!
  00004		 |$M14794|

; 175  :     fstemp  *LogPtr;
; 176  : 
; 177  :     //
; 178  :     // Initialize the debug timer first.
; 179  :     //
; 180  :     DebugTimerInit();

  00004	eb000000	 bl        DebugTimerInit

; 181  : 
; 182  :     //
; 183  :     // Get the board information. Requires debug timer so we must put
; 184  :     // it after getting the boardinformation.
; 185  :     //
; 186  :     GetBoardInformation();

  00008	eb000000	 bl        GetBoardInformation

; 187  : 
; 188  :     //
; 189  :     // Initialize the debug serial port.
; 190  :     //
; 191  :     OEMInitDebugSerial();

  0000c	eb000000	 bl        OEMInitDebugSerial

; 192  :     
; 193  : 
; 194  : #ifdef DEBUG
; 195  :     //
; 196  :     // Instead of calling OEMWriteDebugString directly, call through exported
; 197  :     // function pointer.  This will allow these messages to be seen if debug
; 198  :     // message output is redirected to Ethernet or the parallel port.
; 199  :     // Otherwise, lpWriteDebugStringFunc == OEMWriteDebugString.
; 200  :     //
; 201  :     lpWriteDebugStringFunc(TEXT("Windows CE Firmware Init\r\n"));
; 202  : #endif
; 203  :     OEMWriteDebugLED(0, 0);

  00010	e3a01000	 mov       r1, #0
  00014	e3a00000	 mov       r0, #0
  00018	eb000000	 bl        OEMWriteDebugLED

; 204  : 
; 205  :     //
; 206  :     // Always boot from clean memory configuration.
; 207  :     // This is a hack, but I want to make sure that memory is cleared before 
; 208  :     // booting.
; 209  :     //
; 210  :     LogPtr = (fstemp *)(pTOC->ulRAMFree | 0x20000000);

  0001c	e59f3098	 ldr       r3, [pc, #0x98]
  00020	e5930000	 ldr       r0, [r3]
  00024	e5901018	 ldr       r1, [r0, #0x18]

; 211  :     LogPtr->version = LogPtr->magic1 = LogPtr->magic2 = 0;

  00028	e3a00000	 mov       r0, #0
  0002c	e3812202	 orr       r2, r1, #2, 4
  00030	e5820000	 str       r0, [r2]

; 212  : 
; 213  : 
; 214  :     //DEBUGMSG(1, (TEXT("Boot Args @0x%x, signature 0x%08x\r\n"),
; 215  :     //             pBootArgs, pBootArgs->dwSig));
; 216  :     
; 217  :     /*
; 218  :      * Set up translation constant for GetIdleTime() (1 ms units).
; 219  :      *
; 220  :      * Note: Since curridlehigh, curridlelow is counting in ms, and
; 221  :      * GetIdleTime() reports in ms, the conversion ratio is one. If
; 222  :      * curridlehigh, curridlelow were using other units (like ticks),
; 223  :      * then the conversion would be calculated from the clock frequency.
; 224  :      */
; 225  :     idleconv = 1;

  00034	e3a01001	 mov       r1, #1
  00038	e5820004	 str       r0, [r2, #4]
  0003c	e5820008	 str       r0, [r2, #8]
  00040	e59f0070	 ldr       r0, [pc, #0x70]
  00044	e5801000	 str       r1, [r0]

; 226  : 
; 227  :     //dpCurSettings.ulZoneMask =  0x8100;  //20 turn on loader zones
; 228  : 
; 229  : 
; 230  : 
; 231  :     /*
; 232  :      * Initialize timer used for delays in the HAL.
; 233  :      */
; 234  : #ifdef DEBUG
; 235  :     lpWriteDebugStringFunc(TEXT("Initialize timer used for delays")
; 236  :                            TEXT("in the HAL\r\n"));
; 237  : #endif
; 238  : 
; 239  :     //
; 240  :     // Start up the scheduling timer.
; 241  :     //
; 242  :     lpWriteDebugStringFunc(TEXT("InitClock...\r\n"));

  00048	e59f1064	 ldr       r1, [pc, #0x64]
  0004c	e59f005c	 ldr       r0, [pc, #0x5C]
  00050	e5912000	 ldr       r2, [r1]
  00054	e1a0e00f	 mov       lr, pc
  00058	e12fff12	 bx        r2

; 243  :     InitClock();

  0005c	eb000000	 bl        InitClock

; 244  : 
; 245  :     //
; 246  :     // Initialize interrupts.
; 247  :     //
; 248  :     OEMInitInterrupts();

  00060	eb000000	 bl        OEMInitInterrupts

; 249  : 
; 250  :     // Only support one core module (0) under CE - interrupts come in on IRQ0.
; 251  :     // ARM doesn't use HookInterrupt - OEMInterruptHandler called by kernel
; 252  :     // instead.
; 253  : 
; 254  : #ifdef DEBUG
; 255  :     //      dpCurSettings.ulZoneMask = 0xffffffff;
; 256  :     lpWriteDebugStringFunc(TEXT("Firmware Init Done.\r\n"));
; 257  : #endif
; 258  : 
; 259  :     //
; 260  :     // Initialize EDBG/KITL if a bootloader started us.
; 261  :     //
; 262  :     //if (pBootArgs->ucLoaderFlags & LDRFL_USE_EDBG)
; 263  :     //    InitDebugEther();
; 264  : 
; 265  :     if((DRIVER_GLOBALS_POINTER)->eth.EbootMagicNum == EBOOT_MAGIC_NUM ||
; 266  :        (DRIVER_GLOBALS_POINTER)->eth.EbootMagicNum == PARALLEL_MAGIC_NUM)

  00064	e59f1040	 ldr       r1, [pc, #0x40]
  00068	e3a0320a	 mov       r3, #0xA, 4
  0006c	e3833b22	 orr       r3, r3, #0x22, 22
  00070	e5930000	 ldr       r0, [r3]
  00074	e1500001	 cmp       r0, r1
  00078	0a000002	 beq       |$L14744|
  0007c	e59f1024	 ldr       r1, [pc, #0x24]
  00080	e1500001	 cmp       r0, r1
  00084	1a000000	 bne       |$L14743|
  00088		 |$L14744|

; 267  :     {
; 268  :         InitDebugEther();

  00088	eb000000	 bl        InitDebugEther
  0008c		 |$L14743|

; 269  :     }
; 270  : 
; 271  : #ifdef  BSP_EP931X_CRUNCH
; 272  :     //
; 273  :     // Set up the coprocessor environment variables.
; 274  :     //
; 275  :     cbNKCoProcRegSize               = 0xB0;
; 276  :     fNKSaveCoProcReg                = 1;
; 277  :     pOEMSaveCoProcRegister          = OEMSaveCoProcRegister;
; 278  :     pOEMRestoreCoProcRegister       = OEMRestoreCoProcRegister;
; 279  :     pOEMInitCoProcRegisterSavedArea = OEMInitCoProcRegisterSavedArea;
; 280  : 
; 281  : #endif // BSP_EP931X_CRUNCH
; 282  : 
; 283  :     //
; 284  :     // Print out the current clock rates to the debug port.
; 285  :     //
; 286  :     NKDbgPrintfW
; 287  :     (
; 288  :         L"Processor = %dMhz, Bus = %dMhz \r\n", 
; 289  :         (REAL_FCLOCK/1000000), 
; 290  :         (REAL_HCLOCK/1000000)
; 291  :     );

  0008c	e59f0010	 ldr       r0, [pc, #0x10]
  00090	e3a02063	 mov       r2, #0x63
  00094	e3a010c7	 mov       r1, #0xC7
  00098	eb000000	 bl        NKDbgPrintfW

; 292  : }

  0009c	e8bd4000	 ldmia     sp!, {lr}
  000a0	e12fff1e	 bx        lr
  000a4		 |$L14798|
  000a4	00000000	 DCD       |??_C@_1EE@DGKC@?$AAP?$AAr?$AAo?$AAc?$AAe?$AAs?$AAs?$AAo?$AAr?$AA?5?$AA?$DN?$AA?5?$AA?$CF?$AAd?$AAM?$AAh?$AAz?$AA?0?$AA?5?$AAB@|
  000a8	50415241	 DCD       0x50415241
  000ac	45424f54	 DCD       0x45424f54
  000b0	00000000	 DCD       |??_C@_1BO@PHGO@?$AAI?$AAn?$AAi?$AAt?$AAC?$AAl?$AAo?$AAc?$AAk?$AA?4?$AA?4?$AA?4?$AA?$AN?$AA?6?$AA?$AA@|
  000b4	00000000	 DCD       |lpWriteDebugStringFunc|
  000b8	00000000	 DCD       |idleconv|
  000bc	00000000	 DCD       |pTOC|
  000c0		 |$M14795|

			 ENDP  ; |OEMInit|

	EXPORT	|OEMGetExtensionDRAM|

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

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

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

  00000		 |OEMGetExtensionDRAM| PROC

; 302  : {

  00000		 |$M14802|

; 303  :     //*lpMemStart = (SDRAM_VIRTUAL_MEMORY + SDRAM_MAIN_BLOCK_SIZE);
; 304  :     //*lpMemLen   = SDRAM_MAIN_BLOCK_SIZE;
; 305  :     //return TRUE;
; 306  :     return FALSE;

  00000	e3a00000	 mov       r0, #0

; 307  : }

  00004	e12fff1e	 bx        lr
  00008		 |$M14803|

			 ENDP  ; |OEMGetExtensionDRAM|

	EXPORT	|OEMTranslateIrq|

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

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

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

  00000		 |OEMTranslateIrq| PROC

; 321  : {

  00000		 |$M14810|

; 322  :     return Irq;
; 323  : }

  00000	e12fff1e	 bx        lr
  00004		 |$M14811|

			 ENDP  ; |OEMTranslateIrq|

	EXPORT	|OEMTranslateSysIntr|

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

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

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

  00000		 |OEMTranslateSysIntr| PROC

; 337  : {

  00000		 |$M14818|

; 338  :     return SysIntr;
; 339  : }

  00000	e12fff1e	 bx        lr
  00004		 |$M14819|

			 ENDP  ; |OEMTranslateSysIntr|

	EXPORT	|OEMRequestSysIntr|

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

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

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

  00000		 |OEMRequestSysIntr| PROC

; 352  : {

  00000		 |$M14826|

; 353  :     return Irq;
; 354  : }

  00000	e12fff1e	 bx        lr
  00004		 |$M14827|

			 ENDP  ; |OEMRequestSysIntr|

	EXPORT	|OEMGetInterrupt|

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

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

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

  00000		 |OEMGetInterrupt| PROC

; 366  : {

  00000		 |$M14833|

; 367  :     return FALSE;

  00000	e3a00000	 mov       r0, #0

; 368  : }

  00004	e12fff1e	 bx        lr
  00008		 |$M14834|

			 ENDP  ; |OEMGetInterrupt|

	END

⌨️ 快捷键说明

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