亚洲欧美第一页_禁久久精品乱码_粉嫩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一区二区三区免费野_久草精品视频
一本色道久久综合亚洲aⅴ蜜桃 | 欧美日韩一区不卡| 欧美顶级少妇做爰| 国产精品美女久久久久久久久| 午夜激情综合网| av在线不卡免费看| 精品国产乱码久久久久久久久 | 六月丁香婷婷久久| 欧美亚洲动漫制服丝袜| 国产精品久久久久9999吃药| 久久av老司机精品网站导航| 欧美日韩的一区二区| 自拍偷拍国产亚洲| 成人自拍视频在线| 久久色在线观看| 麻豆91免费看| 91精品综合久久久久久| 五月婷婷另类国产| 欧美日韩免费高清一区色橹橹| 亚洲欧洲综合另类| 91视频.com| 亚洲免费在线视频| 一本大道久久a久久精品综合| 国产精品婷婷午夜在线观看| 国产精品资源在线观看| 久久久综合九色合综国产精品| 看电视剧不卡顿的网站| 制服丝袜中文字幕一区| 日韩高清在线不卡| 日韩一区二区免费高清| 久久精品免费观看| 久久综合五月天婷婷伊人| 国产一区激情在线| 久久久久国色av免费看影院| 国产福利一区二区三区在线视频| 亚洲精品一区二区三区99| 国产精品夜夜爽| 国产精品伦理一区二区| 99re热这里只有精品免费视频| 自拍偷在线精品自拍偷无码专区 | 亚洲h精品动漫在线观看| 欧美日韩精品一区二区三区| 丝袜美腿一区二区三区| 欧美一区二区在线视频| 久草中文综合在线| 欧美国产精品v| 91免费看`日韩一区二区| 亚洲国产视频直播| 精品久久久久一区| 成人福利视频在线看| 有码一区二区三区| 91精品免费在线| 国产成人综合在线| 亚洲欧美日韩国产综合在线| 欧美日韩国产在线播放网站| 精品一区免费av| **欧美大码日韩| 欧美一区二区高清| 国产精品99久久久久久久女警| 18成人在线观看| 日韩视频在线你懂得| 99久久99精品久久久久久| 日韩精品电影在线| 26uuu另类欧美亚洲曰本| 91网站最新地址| 久久av老司机精品网站导航| 《视频一区视频二区| 日韩欧美在线综合网| 91香蕉视频mp4| 国产在线播放一区| 亚洲成人中文在线| 中文字幕va一区二区三区| 欧美日韩国产天堂| 99免费精品在线| 久久国产剧场电影| 亚洲一卡二卡三卡四卡| 国产欧美va欧美不卡在线| 91精品国产黑色紧身裤美女| 成人激情免费视频| 国产一区二区免费在线| 日韩黄色在线观看| 日韩毛片精品高清免费| 国产亚洲欧美色| 日韩一区二区在线免费观看| 色就色 综合激情| 国产999精品久久久久久| 麻豆一区二区三| 亚洲国产aⅴ成人精品无吗| 国产精品卡一卡二| 精品国产1区二区| 欧美久久久影院| 99re热这里只有精品视频| 国产a区久久久| 国产一区欧美日韩| 久久99九九99精品| 日韩精品福利网| 亚洲成人精品影院| 亚洲综合色成人| 亚洲综合久久久| 一区二区成人在线观看| 自拍av一区二区三区| 国产精品午夜在线| 精品国产网站在线观看| 精品国产91久久久久久久妲己| 欧美一区二区三区影视| 欧美精品乱人伦久久久久久| 欧美三级在线视频| 91黄色小视频| 精品视频在线视频| 欧美视频自拍偷拍| 欧美日韩1234| 日韩欧美一区在线观看| 91精品国产免费| 久久综合久久综合久久| 久久蜜桃一区二区| 国产片一区二区三区| 国产精品蜜臀在线观看| 亚洲欧洲韩国日本视频| 亚洲乱码日产精品bd| 一个色综合网站| 天堂资源在线中文精品| 日韩vs国产vs欧美| 久久99日本精品| 国产成人在线看| 91首页免费视频| 欧美人动与zoxxxx乱| 日韩欧美的一区| 亚洲国产精华液网站w| 亚洲欧洲制服丝袜| 首页欧美精品中文字幕| 激情欧美一区二区| 成人三级伦理片| 在线视频亚洲一区| 日韩一级高清毛片| 欧美国产精品v| 亚洲国产中文字幕在线视频综合| 美国十次了思思久久精品导航| 国产一区二区免费在线| 色婷婷av一区二区三区gif| 欧美一二三区在线观看| 国产日韩欧美亚洲| 午夜不卡av在线| 国产剧情av麻豆香蕉精品| 日本高清不卡一区| 欧美另类z0zxhd电影| 中文字幕乱码日本亚洲一区二区 | 精品国产乱码久久久久久图片| 欧美高清在线一区二区| 亚洲成人综合网站| 国产一区二区三区四区在线观看| 91麻豆精品秘密| 日韩精品一区在线观看| 亚洲三级小视频| 免费观看一级特黄欧美大片| 国内久久婷婷综合| 99热在这里有精品免费| 欧美高清www午色夜在线视频| 国产亚洲精品超碰| 亚洲国产日韩综合久久精品| 国产一区二区0| 精品视频一区 二区 三区| 久久精品免费在线观看| 亚洲午夜激情网站| 国产成人综合在线观看| 欧美一区二区视频观看视频| **欧美大码日韩| 国产精品资源在线看| 欧美精品99久久久**| 中文字幕欧美一区| 久久99精品一区二区三区三区| 在线看国产日韩| 综合激情网...| 国产成人免费视频网站高清观看视频| 欧美久久久久久久久久| 亚洲最大的成人av| 成人午夜视频在线| 精品久久免费看| 蜜臀av性久久久久av蜜臀妖精| 欧美午夜一区二区三区免费大片| 国产精品乱码一区二区三区软件| 视频一区欧美精品| 欧洲一区在线电影| 亚洲欧洲三级电影| 岛国精品在线观看| 久久久久9999亚洲精品| 韩国毛片一区二区三区| 日韩午夜小视频| 国产精品综合久久| 精品国产乱码久久久久久蜜臀 | 色播五月激情综合网| 国产性天天综合网| 精品伊人久久久久7777人| 欧美va在线播放| 另类小说一区二区三区| 欧美一二三区在线| 激情久久久久久久久久久久久久久久| 欧美一个色资源| 精品一区二区在线免费观看| 欧美变态tickle挠乳网站| 国内久久婷婷综合|