亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? cfw.c

?? 增加串口,主要是wince方面的
?? C
?? 第 1 頁 / 共 4 頁
字號:
/*++
THIS CODE AND INFORMATION IS PROVIDED "AS IS" WITHOUT WARRANTY OF
ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO
THE IMPLIED WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A
PARTICULAR PURPOSE.
Copyright (c) 2001. Samsung Electronics, co. ltd  All rights reserved.
--*/

#include "windows.h"
#include "nkintr.h"
#include "oalintr.h"
#include "shx.h"
#include "p2.h"
#include "p2debug.h"
#include "tchaud.h"
#include "drv_glob.h"
#include <memory.h>
#ifdef MODULE_CERTIFY
#include "key1024.c"    // OEMLoadInit/OEMLoadModule implementation and the public key used for module signature verification.
#endif
//#include "timer.h"
#include <S2410.h>
#include <pehdr.h>
#include <romldr.h>


extern const unsigned short ScreenBitmap[];

/*
    @doc    EXTERNAL KERNEL HAL

    @module cfwp2.c - P2 HW Support | 
        OEM support Functions for the Windows CE P2 Platform.
    
    @xref <f OEMInit> <f OEMInterruptEnable> <f OEMInterruptDisable> 
          <f OEMInterruptDone> <l HAL Overview.Windows CE Kernel OEM Interface>
          
    @topic Windows CE Kernel OEM Interface |
          This defines the HAL layer - OEM and platform dependent pieces of
          code which we expect the OEM to deliver to us. There are three pieces
          of OEM deliverable code  - the bootstrap loader & monitor (for 
          debugging), the HAL portions which are interfaces between the kernel
          and the firmware, and the driver interface. This topic covers just 
          the HAL portion.

          The philosophy is to keep the HAL layer as simple as possible.  The 
          HAL should not be confused with the machine or CPU independence. HAL 
          is specific for a particular CPU and platform. It includes interfaces 
          for the following devices:<nl>
          Real Time Clock<nl>
          Interval Timer (used for the scheduler operation) <nl>
          Interrupt handlers and support <nl>

          Note that it does not include abstractions for devices like the DMA 
          controller etc. since the kernel does not use one. Also note that the
          list could change for different CPU's and platforms - for instance, 
          some chips might include a lot of peripheral devices (like the 
          interval timer) on the CPU chip itself, removing the need for a 
          separate interface for them.

          The interfaces for the real time clock and interval timer are still 
          being developed. But they should in general be extremely simple and
          straightforward. For details on the interrupt support model in the 
          kernel look at <l Interrupt Support Overview.Kernel Interrupt Support>

    @xref <l Interrupt Support Overview.Kernel Interrupt Support>
          <f OEMInit> <f OEMInterruptEnable> <f OEMInterruptDisable> 
          <f OEMInterruptDone> <f HookInterrupt>
             
 */


unsigned long OEMClockFreq;				// OEM clock frequency is used only in OAL

//
// Kernel global variables used by GetIdleTime( ) to determine CPU utilization
//
extern DWORD idleconv; 					// translation constant in 1 ms units
extern DWORD curridlehigh, curridlelow;	// 64-bit idle time in ms

extern int P2ISR();
extern void InitClock();
extern void HalCpuInit();
extern void HalTimerInit();
extern void HalSleep(DWORD);

extern void TIMERINIT();
extern void InitDebugEther(void);

static void HzhInitPIO(void);
static void InitDisplay(void);
static void OEMInitInterrupts(void);
static void InitSDMMC(void);

typedef volatile WORD *PVWORD;    /* pointer to a volatile word */
typedef volatile DWORD *PVDWORD;    /* pointer to a volatile dword */


#define REG(base, id)   (*(PVWORD)((base)+(id)))
#define REG32(base, id)   (*(PVDWORD)((base)+(id)))

/*
#if (CE_MAJOR_VER == 0x0003)
	//Cedar
	// The kernel exports...
	#ifdef AddrCurMSec
		// Some kernels export a pointer to the CurMSec variable.
		static volatile DWORD * pCurMSec  = (volatile DWORD *) AddrCurMSec;
		static volatile DWORD * pDiffMSec = (volatile DWORD *) AddrDiffMSec;
	#else
		extern volatile DWORD CurMSec;
		extern volatile DWORD DiffMSec;
		static volatile DWORD * pCurMSec = &CurMSec;
		static volatile DWORD * pDiffMSec = &DiffMSec;
	#endif

	extern DWORD dwSleepMin;
	extern DWORD dwPartialDiffMSec;
	extern DWORD ticksleft;

#else
// dougfir or later
//
	#ifdef AddrCurMSec
		// Some kernels export a pointer to the CurMSec variable.
		static volatile DWORD * pCurMSec  = (volatile DWORD *) AddrCurMSec;
	#else
		extern volatile DWORD CurMSec;
		static volatile DWORD * pCurMSec = &CurMSec;
	#endif
	
extern DWORD dwReschedTime;
#endif
*/

// dougfir or later
//
	#ifdef AddrCurMSec
		// Some kernels export a pointer to the CurMSec variable.
		static volatile DWORD * pCurMSec  = (volatile DWORD *) AddrCurMSec;
	#else
		extern volatile DWORD CurMSec;
		static volatile DWORD * pCurMSec = &CurMSec;
	#endif
	
extern DWORD dwReschedTime;


extern BOOL fIntrTime;
extern BOOL bProfileTimerRunning;

volatile ULARGE_INTEGER CurTicks = { 0, 0 };
volatile ULARGE_INTEGER * pCurTicks = &CurTicks;

extern DWORD dwReschedIncrement;
extern DWORD OEMCount1ms;


#define NOT_FIXEDUP		   (DWORD*)-1
DWORD *pdwXIPLoc = NOT_FIXEDUP;
extern  ROMChain_t         *OEMRomChain;

/*
    @func   void | InitRomChain | Collects chain information for all image regions for the kernel.
    @rdesc  N/A.
    @comm    
    @xref   
*/

void InitRomChain(void)
{
	static		ROMChain_t	s_pNextRom[MAX_ROM] = {0};
	DWORD		dwRomCount = 0;
    DWORD       dwChainCount = 0;
    DWORD		*pdwCurXIP;
    DWORD       dwNumXIPs;
    PXIPCHAIN_ENTRY pChainEntry = NULL;

    if(pdwXIPLoc == NOT_FIXEDUP)
	{
        return;  // no chain or not fixed up properly
    }

    // set the top bit to mark it as a virtual address
    pdwCurXIP = (DWORD*)(((DWORD)pdwXIPLoc) | 0x80000000);

    // first DWORD is number of XIPs
    dwNumXIPs = (*pdwCurXIP);

    if(dwNumXIPs > MAX_ROM)
	{
      lpWriteDebugStringFunc(TEXT("ERROR: Number of XIPs exceeds MAX\n"));
      return;
    }

    pChainEntry = (PXIPCHAIN_ENTRY)(pdwCurXIP + 1);

    while(dwChainCount < dwNumXIPs)
    {
        if ((pChainEntry->usFlags & ROMXIP_OK_TO_LOAD) &&  // flags indicates valid XIP
            *(LPDWORD)(((DWORD)(pChainEntry->pvAddr)) + ROM_SIGNATURE_OFFSET) == ROM_SIGNATURE)
        {
            s_pNextRom[dwRomCount].pTOC = *(ROMHDR **)(((DWORD)(pChainEntry->pvAddr)) + ROM_SIGNATURE_OFFSET + 4);
            s_pNextRom[dwRomCount].pNext = NULL;

            if (dwRomCount != 0)
            {
                s_pNextRom[dwRomCount-1].pNext = &s_pNextRom[dwRomCount];
            }
            else
            {
                OEMRomChain = s_pNextRom;
            }
            dwRomCount++;
        }
        else
        {
            lpWriteDebugStringFunc( _T("Invalid XIP found\n") );
        }

        ++pChainEntry;
		dwChainCount++;
	}
}


#define FROM_BCD(n)		((((n) >> 4) * 10) + ((n) & 0xf))


//------------------------------------------------------------------------------
//
//  @func   void | OEMInit | Initialize Hardware Interfaces
//  @rdesc  none
//  @comm   OEMInit is called by the kernel after it has performed minimal
//          initialization. Interrupts are disabled and the kernel is not
//          ready to handle exceptions. The only kernel service available
//          to this function is <f HookInterrupt>. This should be used to 
//          install ISR's for all the hardware interrupts to be handled by
//          the firmware. Note that ISR's must be installed for any interrupt
//          that is to be routed to a device driver - otherwise the 
//          <f InterruptInitialize> call from the driver will fail.
//  @xref   <l Overview.Windows CE Kernel OEM Interface> <f HookInterrupt>
//          <f InterruptInitialize>
//            
//------------------------------------------------------------------------------
void OEMInit()  
{
    // Instead of calling OEMWriteDebugString directly, call through exported
    // function pointer.  This will allow these messages to be seen if debug
    // message output is redirected to Ethernet or the parallel port.  Otherwise,
    // lpWriteDebugStringFunc == OEMWriteDebugString.
    lpWriteDebugStringFunc(TEXT("\nWindows CE Firmware Init\r\n"));

#ifdef MODULE_CERTIFY
    //
    // Set the module signature verification hooks
    //
    pOEMLoadInit   = OEMLoadInit;
    pOEMLoadModule = OEMLoadModule;
    //
    // Init the signature verification public key
    //
    InitPubKey(g_bSignPublicKeyBlob,sizeof(g_bSignPublicKeyBlob));
#endif

    //
    // Set up translation constant for GetIdleTime() (1 ms units).
    // Note: Since curridlehigh, curridlelow is counting in ms, and GetIdleTime()
    // reports in ms, the conversion ratio is one.  If curridlehigh, curridlelow
    // were using other units (like ticks), then the conversion would be calculated
    // from the clock frequency.
    //
    idleconv = 1;

	// Initialize interrupts.
	//
    lpWriteDebugStringFunc(TEXT("INFO: Initializing system interrupts...\r\n"));
	OEMInitInterrupts();

	// Initialize the system clock(s).
	//
    lpWriteDebugStringFunc(TEXT("INFO: Initializing system clock(s)...\r\n"));
    InitClock();

    // Initialize driver globals area.
	//
    lpWriteDebugStringFunc(TEXT("INFO: Initializing driver globals area...\r\n"));
    memset((PVOID)DRIVER_GLOBALS_ZEROINIT_START, 0, DRIVER_GLOBALS_ZEROINIT_SIZE);
    
    
    //
    HzhInitPIO();
    // Initialize S2410X01 LCD controller
	InitDisplay();
	
	InitSDMMC();
	
    // Initialize debug Ethernet (KITL) connection.
    //
	InitDebugEther();	

	// Initialize the ROM chain (multi-region).
	//
	InitRomChain();
	lpWriteDebugStringFunc(TEXT("OEMInit Done...\r\n"));
}


//------------------------------------------------------------------------------
//  
//  @func   BOOL | OEMInterruptEnable | Enable a hardware interrupt
//  @rdesc  Returns TRUE if valid interrupt ID or FALSE if invalid ID.
//  @comm   This function is called by the Kernel when a device driver
//          calls <f InterruptInitialize>. The system is not preemptible when this
//          function is called.
//  @xref   <l Overview.Windows CE Kernel OEM Interface> <f InterruptInitialize>
//  
//------------------------------------------------------------------------------
BOOL 
OEMInterruptEnable(DWORD  idInt,	// @parm Interrupt ID to be enabled. See <l Interrupt ID's.Interrupt ID's>  for a list of possble values.
				   LPVOID pvData,	// @parm ptr to data passed in in the <f InterruptInitialize> call
		           DWORD  cbData)	// @parm Size of data pointed to be <p pvData>
{
	volatile INTreg *s2410INT = (INTreg *)INT_BASE;
	volatile IOPreg *s2410IOP = (IOPreg *)IOP_BASE;
	volatile MMCreg *s2410SDIO = (MMCreg *)MMC_BACE;
	BOOL bRet = TRUE;

	INTERRUPTS_OFF();
	
	switch (idInt) 
	{

	case SYSINTR_VMINI:		// Vmini.
		//return (TRUE);
		break;

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
色久优优欧美色久优优| 国内久久婷婷综合| 日韩欧美一级精品久久| 国产大片一区二区| 午夜欧美大尺度福利影院在线看| 日韩精品一区二区三区老鸭窝| 99久久国产免费看| 激情深爱一区二区| 亚洲一二三区不卡| 国产精品国产自产拍高清av| 欧美高清视频一二三区| 成人国产精品免费观看动漫 | 日韩亚洲欧美中文三级| 成人av第一页| 精品一区二区三区香蕉蜜桃| 亚洲在线一区二区三区| 国产精品系列在线| 精品国产伦理网| 欧美三级韩国三级日本一级| 成人免费av在线| 极品少妇xxxx精品少妇偷拍| 亚洲午夜成aⅴ人片| 成人欧美一区二区三区小说| 欧美精品一区二| 欧美日韩视频在线一区二区| 色哟哟日韩精品| 成人免费视频免费观看| 久久精品72免费观看| 香港成人在线视频| 亚洲综合色视频| 亚洲欧美日韩系列| 中文字幕亚洲一区二区va在线| 国产区在线观看成人精品| 久久这里只有精品6| 日韩欧美国产午夜精品| 7777精品伊人久久久大香线蕉完整版| 91亚洲精品一区二区乱码| 国产精品一级片| 国产成人在线观看| 国产精品99久久久久久似苏梦涵| 精彩视频一区二区| 国产一区二区91| 国产成人在线看| 成人午夜碰碰视频| 成人免费视频一区| 91在线国产福利| 91久久香蕉国产日韩欧美9色| 91女神在线视频| 色狠狠一区二区三区香蕉| 在线观看日产精品| 欧美三级日韩三级国产三级| 欧美乱妇15p| 日韩色视频在线观看| 亚洲精品一区二区三区精华液 | 精品美女在线播放| 久久久精品人体av艺术| 国产精品免费人成网站| 亚洲乱码精品一二三四区日韩在线| 一区二区在线免费观看| 肉丝袜脚交视频一区二区| 日韩激情一区二区| 久久不见久久见免费视频1 | 欧美v日韩v国产v| 日韩久久久久久| 久久久久久久精| 日韩毛片视频在线看| 亚洲午夜成aⅴ人片| 毛片基地黄久久久久久天堂| 国产成人综合亚洲网站| 91看片淫黄大片一级| 在线电影一区二区三区| 欧美精品一区二区高清在线观看| 久久精品欧美日韩精品| 亚洲日本电影在线| 日韩avvvv在线播放| 国产福利精品导航| 91国偷自产一区二区使用方法| 91精品免费在线| 国产日韩欧美精品一区| 亚洲一区在线电影| 九九热在线视频观看这里只有精品| 成人小视频免费观看| 欧美三级电影网| 国产午夜精品美女毛片视频| 亚洲精选视频免费看| 日韩电影一区二区三区| 成人午夜免费视频| 欧美精品色一区二区三区| 欧美国产成人在线| 日本在线观看不卡视频| 国产·精品毛片| 91麻豆精品国产自产在线| 国产欧美日韩另类一区| 天堂在线亚洲视频| 91亚洲精品久久久蜜桃| 精品福利一区二区三区| 一区二区三区蜜桃网| 国产综合色精品一区二区三区| 99国产欧美久久久精品| 日韩欧美国产高清| 亚洲综合一区在线| 国产精品一区二区x88av| 91.成人天堂一区| 亚洲人成网站色在线观看| 韩国欧美一区二区| 欧美高清hd18日本| 亚洲另类春色国产| 国产精品1024| 日韩免费一区二区| 天天影视涩香欲综合网| 91丨porny丨中文| 国产欧美在线观看一区| 日韩va亚洲va欧美va久久| 欧美午夜视频网站| 亚洲精品久久嫩草网站秘色| 国产精品1区2区| 久久综合狠狠综合久久综合88| 秋霞电影网一区二区| 在线观看欧美黄色| 一区二区三区资源| 91免费观看视频| 国产精品无遮挡| 成人免费精品视频| 久久精品亚洲一区二区三区浴池 | 91精品国产福利在线观看| 成人免费在线观看入口| 成人高清视频免费观看| 国产清纯白嫩初高生在线观看91| 久久电影网站中文字幕| 日韩视频一区二区三区在线播放 | 亚洲成在线观看| 欧美日韩一区 二区 三区 久久精品| 亚洲免费伊人电影| 91麻豆.com| 夜夜嗨av一区二区三区中文字幕 | 色综合天天视频在线观看| 国产精品免费视频观看| 99久久久久久| 玉米视频成人免费看| 欧美影院午夜播放| 午夜精品在线视频一区| 欧美久久久久中文字幕| 五月婷婷久久丁香| 日韩一级高清毛片| 久久爱www久久做| 国产日产亚洲精品系列| 成人黄色软件下载| 亚洲精品乱码久久久久久| 欧美日韩一区二区三区在线| 午夜精品一区二区三区三上悠亚| 777午夜精品免费视频| 免费一级片91| 国产亚洲精品超碰| 99久久久久免费精品国产| 亚洲一区在线观看视频| 日韩视频一区二区三区在线播放| 国产一区欧美一区| 国产精品超碰97尤物18| 在线免费观看日韩欧美| 日韩电影在线免费观看| 欧美va日韩va| 99久久国产综合精品女不卡| 亚洲影视在线播放| 日韩欧美一区二区免费| 国产精品夜夜嗨| 亚洲免费观看视频| 日韩三级免费观看| 成人免费观看男女羞羞视频| 亚洲一区二区精品久久av| 欧美成人三级电影在线| 成人av在线一区二区三区| 亚洲综合色噜噜狠狠| 久久一区二区三区四区| 91色在线porny| 琪琪一区二区三区| 1000部国产精品成人观看| 777奇米成人网| 91在线小视频| 久久草av在线| 亚洲精品视频一区| 久久美女艺术照精彩视频福利播放 | 亚洲欧美日韩国产综合| 欧美四级电影在线观看| 国产精品亚洲一区二区三区妖精| 亚洲精品写真福利| 26uuu亚洲综合色欧美| 99久久综合狠狠综合久久| 蜜桃传媒麻豆第一区在线观看| 中文字幕一区二区在线播放| 91精品国产麻豆国产自产在线 | 国产精品18久久久久久久久久久久 | 欧美中文字幕一区二区三区 | 久久99精品久久久久| 亚洲精品视频自拍| 久久久精品综合| 欧美日韩精品专区| 99re视频精品| 国产精品系列在线观看| 日韩和欧美一区二区三区| 亚洲色图欧洲色图婷婷|