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

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

?? main.c

?? 三星3442處理器Demo板:Eboot源碼包
?? C
?? 第 1 頁 / 共 4 頁
字號:
//
// Copyright (c) Microsoft Corporation.  All rights reserved.
//
//
// Use of this source code is subject to the terms of the Microsoft end-user
// license agreement (EULA) under which you licensed this SOFTWARE PRODUCT.
// If you did not accept the terms of the EULA, you are not authorized to use
// this source code. For a copy of the EULA, please see the LICENSE.RTF on your
// install media.
//
//
//
// Use of this source code is subject to the terms of the Microsoft end-user
// license agreement (EULA) under which you licensed this SOFTWARE PRODUCT.
// If you did not accept the terms of the EULA, you are not authorized to use
// this source code. For a copy of the EULA, please see the LICENSE.RTF on your
// install media.
//

#include <windows.h>
#include <bsp.h>
#include <ethdbg.h>
#include <fmd.h>
#include "loader.h"

// xm.hu

#define	ClearPending(bit) {\
			s2440INTt->SRCPND = bit;\
			s2440INTt->INTPND = bit;\
			s2440INTt->INTPND;\
		}

#define BIT_USBD		(0x1<<25)
#define BIT_DMA2		(0x1<<19)

// For USB Download function.
extern BOOL UbootReadData (DWORD cbData, LPBYTE pbData);
extern BOOL InitUSB ();
extern void Isr_Init();
// For USB Download function.

// xm.hu
void Port_Init(void);

char *inet_ntoa(DWORD dwIP);
DWORD inet_addr( char *pszDottedD );
BOOL EbootInitEtherTransport (EDBG_ADDR *pEdbgAddr, LPDWORD pdwSubnetMask,
                              BOOL *pfJumpImg,
                              DWORD *pdwDHCPLeaseTime,
                              UCHAR VersionMajor, UCHAR VersionMinor,
                              char *szPlatformString, char *szDeviceName,
                              UCHAR CPUId, DWORD dwBootFlags);
BOOL EbootEtherReadData (DWORD cbData, LPBYTE pbData);
EDBG_OS_CONFIG_DATA *EbootWaitForHostConnect (EDBG_ADDR *pDevAddr, EDBG_ADDR *pHostAddr);
// End   ***************************************

void Led_Display(int data);

// Globals
//
DWORD			g_ImageType;
MultiBINInfo	g_BINRegionInfo;
PBOOT_CFG		g_pBootCfg;
UCHAR			g_TOC[SECTOR_SIZE];
const PTOC 		g_pTOC = (PTOC)&g_TOC;
DWORD			g_dwImageStartBlock;
DWORD			g_dwTocEntry;
BOOL			g_bBootMediaExist = FALSE;
BOOL			g_bDownloadImage  = TRUE;
BOOL 			g_bWaitForConnect = TRUE;
BOOLEAN			g_bUSBDownload = FALSE;

EDBG_ADDR 		g_DeviceAddr; // NOTE: global used so it remains in scope throughout download process
                        // since eboot library code keeps a global pointer to the variable provided.

WORD			wNUM_BLOCKS;

// External definitions.
//
extern const BYTE ScreenBitmap[];



/*
    @func   void | SpinForever | Halts execution (used in error conditions).
    @rdesc  
    @comm    
    @xref   
*/
static void SpinForever(void)
{
    EdbgOutputDebugString("SpinForever...\r\n");

    while(1)
    {
        ;
    }
}


/*
    @func   void | main | Samsung bootloader C routine entry point.
    @rdesc  N/A.
    @comm    
    @xref   
*/
void main(void)
{

//  volatile S3C2440A_INTR_REG *s2440INTt = (S3C2440A_INTR_REG *)OALPAtoVA(S3C2440A_BASE_REG_PA_INTR, FALSE);
    // Clear LEDs.
    //   

  // Led_Display(1);

   Led_Display(1);
   while(0);

    Port_Init();
    Led_Display(0);

    while(0);
	
    //OEMWriteDebugLED(0, 0xF);
	
    // Common boot loader (blcommon) main routine.
    //    

	// xm.hu
//   ClearPending(BIT_USBD);
//  ClearPending(BIT_DMA2);

// s2440INTt->INTMSK&=~(BIT_USBD); 

    BootloaderMain();

    // Should never get here.
    // 
    SpinForever();
}


/*
    @func   void | InitDisplay | Initializes the LCD controller and displays a splashscreen image.
    @rdesc  N/A.
    @comm    
    @xref   
*/
static void InitDisplay(void)
{
    volatile S3C2440A_IOPORT_REG *s2440IOP = (S3C2440A_IOPORT_REG *)OALPAtoVA(S3C2440A_BASE_REG_PA_IOPORT, FALSE);
    volatile S3C2440A_LCD_REG    *s2440LCD = (S3C2440A_LCD_REG *)OALPAtoVA(S3C2440A_BASE_REG_PA_LCD, FALSE);
	unsigned int clkval_calc;  // 040507
    // Set up the LCD controller registers to display a power-on bitmap image.

	RETAILMSG(1, (TEXT("LCD PWM INIT NOW ---- XM.HU  MODIFY\r\n")));

     s2440IOP->GPBDN     &= ~(0x1);
    s2440IOP->GPBCON    &= ~0x3;
	s2440IOP->GPBCON    |= 0x1;	
	s2440IOP->GPBDAT  |= 0x1;
	
    //
    s2440IOP->GPCDN     = 0xFFFFFFFF;
    s2440IOP->GPCCON    = 0xAAAAAAAA;
                                    
    s2440IOP->GPDDN     = 0xFFFFFFFF;
    s2440IOP->GPDCON    = 0xAAAAAAAA; 

	//clkval_calc = (WORD)((float)(S3C2440A_HCLK)/(2.0*5000000)+0.5)-1;    //- ksk 20051114
	clkval_calc = (WORD)((float)(S3C2440A_HCLK)/(2.0*6000000)+0.5)-1;    //+ ksk 20051114
    s2440LCD->LCDCON1   =  (clkval_calc           <<  8) |       /* VCLK = HCLK / ((CLKVAL + 1) * 2) -> About 7 Mhz  */
                           (0   <<  7)  |       /* LCD_MVAL(13) 0 : Each Frame                                   */
                           (3           <<  5) |       /* TFT LCD Pannel                                   */
                           (12          <<  1) |       /* 16bpp Mode                                       */
                           (0           <<  0) ;       /* Disable LCD Output                               */

    s2440LCD->LCDCON2   =  (LCD_VBPD        << 24) |   /* VBPD          :   1                              */
                           (LCD_LINEVAL_TFT << 14) |   /* Vertical Size : 320 - 1                          */
                           (1        <<  6) |   /* 2 VFPD          :   2                              */
                           (LCD_VSPW        <<  0) ;   /* VSPW          :   1                              */

    s2440LCD->LCDCON3   =  (29        << 19) |   /* HBPD          :   6                              */
                           (LCD_HOZVAL_TFT  <<  8) |   /* HOZVAL_TFT    : 240 - 1                          */
                           (9        <<  0) ;   /* HFPD          :   2                              */


    s2440LCD->LCDCON4   =  (LCD_MVAL        <<  8) |   /* MVAL          :  13                              */
                           (LCD_HSPW        <<  0) ;   /* HSPW          :   4                              */

#if 1
    s2440LCD->LCDCON5   =  (0           << 12) |       /* BPP24BL       : LSB valid                        */
                           (1           << 11) |       /* FRM565 MODE   : 5:6:5 Format                     */
                           (1           << 10) |       /* 0 INVVCLK       : VCLK Falling Edge                */
                           (1           <<  9) |       /* INVVLINE      : Inverted Polarity                */
                           (1           <<  8) |       /* INVVFRAME     : Inverted Polarity                */
                           (0           <<  7) |       /* INVVD         : Normal                           */
                           (0           <<  6) |       /* INVVDEN       : Normal                           */
                           (1           <<  5) |       /* 0 INVPWREN      : Normal                           */
                           (1           <<  4) |       /* 0 INVENDLINE    : Normal                           */
                           (1           <<  3) |       /* PWREN         : Disable PWREN                    */
                           (1           <<  2) |       /* ENLEND        : Disable LEND signal              */
                           (0           <<  1) |       /*0  BSWP          : Swap Disable                     */
                           (1           <<  0) ;       /* HWSWP         : Swap Enable                      */
#else
	s2440LCD->LCDCON5   =  (0           << 12) |   /* BPP24BL       : LSB valid                        */
							(1 << 11) |		// FRM565 MODE   : 5:6:5 Format // 0
							(1<<10)|
							(1<<6)|
							(1<<5)|
				(0           <<  9) |   /* INVVLINE      : Inverted Polarity                */
				(0           <<  8) |   /* INVVFRAME     : Inverted Polarity                */
				(1           <<  4) |   /* INVENDLINE    : Normal                           */
				(1           <<  2) |   /* ENLEND        : Disable LEND signal              */
				(0           <<  1) |   /* BSWP          : Swap Disable                     */
				(0           <<  0) ;   /* HWSWP         : Swap Enable  */
#endif
    s2440LCD->LCDSADDR1 = ((IMAGE_FRAMEBUFFER_DMA_BASE >> 22)     << 21) | 
                          ((M5D(IMAGE_FRAMEBUFFER_DMA_BASE >> 1)) <<  0);

    s2440LCD->LCDSADDR2 = M5D((IMAGE_FRAMEBUFFER_DMA_BASE + (LCD_XSIZE_TFT * LCD_YSIZE_TFT * 2)) >> 1);

    s2440LCD->LCDSADDR3 = (((LCD_XSIZE_TFT - LCD_XSIZE_TFT) / 1) << 11) | (LCD_XSIZE_TFT / 1);        

    //s2440LCD->TCONSEL   |= 0x3;
    s2440LCD->LCDINTMSK|=(3);  // ADD XM.HU
	s2440LCD->TCONSEL   &= (~7);
  //  s2440LCD->TCONSEL   |= (0x1<<4); // DEL

	s2440LCD->TPAL      = 0x0;        
    s2440LCD->LCDCON1  |= 1; // ENVID

    // Display a bitmap image on the LCD...
    //
    memcpy((void *)IMAGE_FRAMEBUFFER_UA_BASE, ScreenBitmap, LCD_ARRAY_SIZE_TFT_16BIT);

}


/*
    @func   void | SetIP | Accepts IP address from user input.
    @rdesc  N/A.
    @comm    
    @xref   
*/

static void SetIP(PBOOT_CFG pBootCfg)
{
    CHAR   szDottedD[16];   // The string used to collect the dotted decimal IP address.
    USHORT cwNumChars = 0;
    USHORT InChar = 0;

    EdbgOutputDebugString("\r\nEnter new IP address: ");

    while(!((InChar == 0x0d) || (InChar == 0x0a)))
    {
        InChar = OEMReadDebugByte();
        if (InChar != OEM_DEBUG_COM_ERROR && InChar != OEM_DEBUG_READ_NODATA) 
        {
            // If it's a number or a period, add it to the string.
            //
            if (InChar == '.' || (InChar >= '0' && InChar <= '9')) 
            {
                if (cwNumChars < 16) 
                {
                    szDottedD[cwNumChars++] = (char)InChar;
                    OEMWriteDebugByte((BYTE)InChar);
                }
            }
            // If it's a backspace, back up.
            //
            else if (InChar == 8) 
            {
                if (cwNumChars > 0) 
                {
                    cwNumChars--;
                    OEMWriteDebugByte((BYTE)InChar);
                }
            }
        }
    }

    // If it's a carriage return with an empty string, don't change anything.
    //
    if (cwNumChars) 
    {
        szDottedD[cwNumChars] = '\0';
        pBootCfg->EdbgAddr.dwIP = inet_addr(szDottedD);
    }
}


/*
    @func   void | SetMask | Accepts subnet mask from user input.
    @rdesc  N/A.
    @comm    
    @xref   
*/
static void SetMask(PBOOT_CFG pBootCfg)
{
    CHAR szDottedD[16]; // The string used to collect the dotted masks.
    USHORT cwNumChars = 0;
    USHORT InChar = 0;

    EdbgOutputDebugString("\r\nEnter new subnet mask: ");

    while(!((InChar == 0x0d) || (InChar == 0x0a)))
    {
        InChar = OEMReadDebugByte();
        if (InChar != OEM_DEBUG_COM_ERROR && InChar != OEM_DEBUG_READ_NODATA) 
        {
            // If it's a number or a period, add it to the string.
            //
            if (InChar == '.' || (InChar >= '0' && InChar <= '9')) 
            {
                if (cwNumChars < 16) 
                {
                    szDottedD[cwNumChars++] = (char)InChar;
                    OEMWriteDebugByte((BYTE)InChar);
                }
            }
            // If it's a backspace, back up.
            //
            else if (InChar == 8) 
            {
                if (cwNumChars > 0) 
                {
                    cwNumChars--;
                    OEMWriteDebugByte((BYTE)InChar);
                }
            }
        }
    }

    // If it's a carriage return with an empty string, don't change anything.
    //
    if (cwNumChars) 
    {
        szDottedD[cwNumChars] = '\0';
        pBootCfg->SubnetMask = inet_addr(szDottedD);
    }
}


/*
    @func   void | SetDelay | Accepts an autoboot delay value from user input.
    @rdesc  N/A.
    @comm    
    @xref   
*/
static void SetDelay(PBOOT_CFG pBootCfg)
{
    CHAR szCount[16];
    USHORT cwNumChars = 0;
    USHORT InChar = 0;

    EdbgOutputDebugString("\r\nEnter maximum number of seconds to delay [1-255]: ");

    while(!((InChar == 0x0d) || (InChar == 0x0a)))
    {
        InChar = OEMReadDebugByte();
        if (InChar != OEM_DEBUG_COM_ERROR && InChar != OEM_DEBUG_READ_NODATA) 
        {
            // If it's a number or a period, add it to the string.
            //
            if ((InChar >= '0' && InChar <= '9')) 
            {
                if (cwNumChars < 16) 
                {
                    szCount[cwNumChars++] = (char)InChar;
                    OEMWriteDebugByte((BYTE)InChar);
                }
            }
            // If it's a backspace, back up.
            //
            else if (InChar == 8) 
            {
                if (cwNumChars > 0) 
                {
                    cwNumChars--;
                    OEMWriteDebugByte((BYTE)InChar);
                }
            }
        }
    }

    // If it's a carriage return with an empty string, don't change anything.
    //
    if (cwNumChars) 
    {
        szCount[cwNumChars] = '\0';
        pBootCfg->BootDelay = atoi(szCount);
        if (pBootCfg->BootDelay > 255)
        {
            pBootCfg->BootDelay = 255;
        } 
        else if (pBootCfg->BootDelay < 1)
        {
            pBootCfg->BootDelay = 1;
        }
    }
}


static ULONG mystrtoul(PUCHAR pStr, UCHAR nBase)
{
    UCHAR nPos=0;
    BYTE c;
    ULONG nVal = 0;
    UCHAR nCnt=0;
    ULONG n=0;

    // fulllibc doesn't implement isctype or iswctype, which are needed by
    // strtoul, rather than including coredll code, here's our own simple strtoul.

    if (pStr == NULL)
        return(0);

    for (nPos=0 ; nPos < strlen(pStr) ; nPos++)
    {

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
色久综合一二码| 日韩电影在线观看网站| 成人性色生活片免费看爆迷你毛片| 欧美日韩中文一区| 一区二区理论电影在线观看| 99国内精品久久| 一区二区三区中文字幕精品精品| 色婷婷香蕉在线一区二区| 亚洲综合在线五月| 欧美一级欧美一级在线播放| 黄色小说综合网站| 久久久噜噜噜久噜久久综合| 成人aaaa免费全部观看| 亚洲另类色综合网站| 91麻豆高清视频| 亚洲一区二区三区中文字幕| 欧美精品丝袜中出| 国产乱妇无码大片在线观看| 国产精品成人在线观看| 欧美日韩中字一区| 黑人巨大精品欧美黑白配亚洲| 国产精品毛片久久久久久| 欧美在线免费播放| 久久激情综合网| 日韩一区在线看| 欧美亚洲一区二区在线观看| 久久国产尿小便嘘嘘| 中文字幕制服丝袜一区二区三区| 欧美三区在线观看| 国产精品自产自拍| 亚洲一区二区综合| 国产片一区二区三区| 欧美亚洲高清一区| 国产精品一区二区三区99| 亚洲综合小说图片| 国产日本欧洲亚洲| 欧美美女黄视频| 成人一区二区视频| 热久久免费视频| 亚洲伦在线观看| 26uuu色噜噜精品一区二区| 在线精品视频免费播放| 韩国一区二区视频| 夜夜嗨av一区二区三区网页 | 国产亚洲精品免费| 欧美日韩一区二区三区免费看 | 日韩欧美一区二区久久婷婷| 97精品国产露脸对白| 久久精工是国产品牌吗| 亚洲影视在线观看| 日本一二三不卡| 欧美成人午夜电影| 欧美精品视频www在线观看 | 成人免费毛片app| 免费精品视频在线| 亚洲在线一区二区三区| 国产精品视频线看| 久久夜色精品国产噜噜av| 91精品啪在线观看国产60岁| 欧美亚洲国产一区二区三区| 91色|porny| 国产成人精品一区二| 国产在线不卡视频| 蜜臀av性久久久久av蜜臀妖精| 亚洲制服丝袜av| 亚洲一区二区三区在线| 亚洲欧美日韩久久| 亚洲欧洲日韩在线| 国产精品欧美一级免费| 国产欧美精品日韩区二区麻豆天美| 精品国产91乱码一区二区三区| 91麻豆精品久久久久蜜臀| 欧美区在线观看| 欧美另类高清zo欧美| 欧美精三区欧美精三区| 在线观看视频一区| 欧洲激情一区二区| 欧美日韩视频一区二区| 91久久精品一区二区三区| 色香蕉久久蜜桃| 91麻豆精品秘密| 欧美偷拍一区二区| 欧美老女人在线| 91精品国产aⅴ一区二区| 3atv一区二区三区| 日韩欧美在线123| 日韩精品一区二区三区老鸭窝| 精品三级av在线| 26uuu国产日韩综合| 国产日韩欧美a| 国产精品色呦呦| 亚洲人一二三区| 亚洲妇女屁股眼交7| 日韩avvvv在线播放| 国内精品免费**视频| 国产成人精品亚洲777人妖| 成人看片黄a免费看在线| 99热精品国产| 欧美精品丝袜久久久中文字幕| 日韩久久久久久| 久久精品一区二区三区不卡牛牛| 欧美国产精品一区| 一区二区三区在线免费播放| 婷婷开心久久网| 国精产品一区一区三区mba桃花 | 亚洲精品高清视频在线观看| 亚洲在线视频一区| 久久99久久久久久久久久久| 国产高清成人在线| 一本久久综合亚洲鲁鲁五月天 | 国产欧美一区二区精品婷婷| 国产精品高潮呻吟| 亚洲电影第三页| 国产黄色精品网站| 91搞黄在线观看| 欧美成人a在线| 成人免费视频在线观看| 亚洲成人在线网站| 国产91综合网| 欧美日韩黄色影视| 国产精品黄色在线观看| 亚洲地区一二三色| 国产suv精品一区二区6| 欧美日韩在线一区二区| 久久伊人蜜桃av一区二区| 亚洲三级久久久| 激情综合网av| 欧美日韩一区不卡| 国产欧美日韩综合| 美女视频一区二区三区| 91麻豆视频网站| 26uuu精品一区二区| 午夜精品福利一区二区蜜股av | 欧美在线看片a免费观看| 欧美草草影院在线视频| 亚洲激情五月婷婷| 国产九色sp调教91| 欧美三级韩国三级日本三斤| 国产女人aaa级久久久级| 日韩不卡一区二区三区| 色综合久久中文字幕| 国产欧美一区二区三区网站| 日韩av午夜在线观看| 色噜噜狠狠成人中文综合| 欧美经典三级视频一区二区三区| 日韩一区欧美二区| 日本久久精品电影| 亚洲日本成人在线观看| 国产盗摄视频一区二区三区| 日韩丝袜情趣美女图片| 午夜精品一区二区三区三上悠亚| 99国产精品久久久久| 国产日产欧美一区| 国产精品综合在线视频| 欧美tickling挠脚心丨vk| 免费高清成人在线| 91精品啪在线观看国产60岁| 亚洲第一二三四区| 在线影视一区二区三区| 亚洲手机成人高清视频| 成人免费看片app下载| 国产三级一区二区三区| 国产乱码精品一区二区三区忘忧草| 日韩欧美中文一区二区| 麻豆精品一区二区综合av| 欧美日韩电影在线| 午夜精品久久久久久久久久久| 欧美在线观看一区| 亚洲成年人网站在线观看| 在线观看亚洲一区| 天堂久久一区二区三区| 欧美日韩在线三级| 日欧美一区二区| 欧美日韩国产美女| 日韩电影一二三区| 精品久久久久久综合日本欧美| 蜜臀av性久久久久av蜜臀妖精| 精品国产一区a| 国产主播一区二区| 中文字幕一区二区三区四区 | 一本高清dvd不卡在线观看| 亚洲欧美一区二区三区国产精品| 色综合久久88色综合天天6| 亚洲制服丝袜av| 91精品国产综合久久久久| 狠狠色综合播放一区二区| 久久亚洲影视婷婷| 高清免费成人av| 亚洲男人天堂一区| 欧美日韩国产在线观看| 免费成人在线观看| 久久精品视频免费| 91久久精品一区二区三区| 香蕉av福利精品导航| 337p粉嫩大胆色噜噜噜噜亚洲| 成人视屏免费看| 亚洲国产精品嫩草影院| 精品欧美一区二区三区精品久久| 国产suv精品一区二区6| 亚洲一区二区三区四区的|