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

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

?? main.c

?? 6410BSP3
?? 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"
#include "usb.h"

#include "s3c6410_ldi.h"
#include "s3c6410_display_con.h"
#include "InitialImage_rgb16_320x240.h"

// header files for whimory - hmseo-061028
#include <WMRTypes.h>
#include <VFLBuffer.h>
//#include <WMR.h>
#include <FTL.h>
#include <VFL.h>
#include <FIL.h>
#include <config.h>
#include <WMR_Utils.h>
//#include <WMR_Eboot.h>


// For USB Download function
extern BOOL InitializeUSB();
extern void InitializeInterrupt();
extern BOOL UbootReadData(DWORD cbData, LPBYTE pbData);
extern void OTGDEV_SetSoftDisconnect();
// To change Voltage for higher clock.
extern void LTC3714_Init();
extern void LTC3714_VoltageSet(UINT32,UINT32,UINT32);

// For Ethernet Download function.
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);
void	SaveEthernetAddress();

extern BOOL IsValidMBRSector();
extern BOOL CreateMBR();

// Eboot Internal static function
static void InitializeDisplay(void);
static void SpinForever(void);
static USHORT GetIPString(char *);

// Globals
//
DWORD			g_ImageType;
DWORD			g_dwMinImageStart;
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;
BOOL			g_bUSBDownload = FALSE;
BOOL 			*g_bCleanBootFlag;

//for KITL Configuration Of Args
OAL_KITL_ARGS	*g_KITLConfig;

//for Device ID Of Args
UCHAR			*g_DevID;


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.

DWORD			wNUM_BLOCKS;

void main(void)
{
    //GPIOTest_Function();
    OTGDEV_SetSoftDisconnect();
    BootloaderMain();

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

static USHORT GetIPString(char *szDottedD)
{
	USHORT InChar = 0;
	USHORT cwNumChars = 0;
	
  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)        // IP string cannot over 15.  xxx.xxx.xxx.xxx
              {
                  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);
              }
          }
      }
  }

	return cwNumChars;

}

/*
    @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: ");

		cwNumChars = GetIPString(szDottedD);

    // 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: ");

		cwNumChars = GetIPString(szDottedD);

    // 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++)
    {
        c = tolower(*(pStr + strlen(pStr) - 1 - nPos));
        if (c >= '0' && c <= '9')
            c -= '0';
        else if (c >= 'a' && c <= 'f')
        {
            c -= 'a';
            c  = (0xa + c);
        }

        for (nCnt = 0, n = 1 ; nCnt < nPos ; nCnt++)
        {
            n *= nBase;
        }
        nVal += (n * c);
    }

    return(nVal);
}


static void CvtMAC(USHORT MacAddr[3], char *pszDottedD )
{
    DWORD cBytes;
    char *pszLastNum;
    int atoi (const char *s);
    int i=0;
    BYTE *p = (BYTE *)MacAddr;

    // Replace the dots with NULL terminators
    pszLastNum = pszDottedD;
    for(cBytes = 0 ; cBytes < 6 ; cBytes++)
    {
        while(*pszDottedD != '.' && *pszDottedD != '\0')
        {
            pszDottedD++;
        }
        if (pszDottedD == '\0' && cBytes != 5)
        {
            // zero out the rest of MAC address
            while(i++ < 6)
            {
                *p++ = 0;
            }
            break;
        }
        *pszDottedD = '\0';
        *p++ = (BYTE)(mystrtoul(pszLastNum, 16) & 0xFF);
        i++;
        pszLastNum = ++pszDottedD;
    }
}


static void SetCS8900MACAddress(PBOOT_CFG pBootCfg)
{
    CHAR szDottedD[24];
    USHORT cwNumChars = 0;
    USHORT InChar = 0;

    memset(szDottedD, '0', 24);

    EdbgOutputDebugString ( "\r\nEnter new MAC address in hexadecimal (hh.hh.hh.hh.hh.hh): ");

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

    EdbgOutputDebugString ( "\r\n");

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

        EdbgOutputDebugString("INFO: MAC address set to: %x:%x:%x:%x:%x:%x\r\n",
                  pBootCfg->EdbgAddr.wMAC[0] & 0x00FF, pBootCfg->EdbgAddr.wMAC[0] >> 8,
                  pBootCfg->EdbgAddr.wMAC[1] & 0x00FF, pBootCfg->EdbgAddr.wMAC[1] >> 8,
                  pBootCfg->EdbgAddr.wMAC[2] & 0x00FF, pBootCfg->EdbgAddr.wMAC[2] >> 8);
    }
    else
    {
        EdbgOutputDebugString("WARNING: SetCS8900MACAddress: Invalid MAC address.\r\n");
    }
}


/*
    @func   BOOL | MainMenu | Manages the Samsung bootloader main menu.
    @rdesc  TRUE == Success and FALSE == Failure.
    @comm
    @xref
*/

static BOOL MainMenu(PBOOT_CFG pBootCfg)
{
    BYTE KeySelect = 0;
    BOOL bConfigChanged = FALSE;
    BOOLEAN bDownload = TRUE;
    UINT32 nSyncRet;


    while(TRUE)
    {
        KeySelect = 0;

        EdbgOutputDebugString ( "\r\nEthernet Boot Loader Configuration:\r\n\r\n");
        EdbgOutputDebugString ( "0) IP address: %s\r\n",inet_ntoa(pBootCfg->EdbgAddr.dwIP));
        EdbgOutputDebugString ( "1) Subnet mask: %s\r\n", inet_ntoa(pBootCfg->SubnetMask));
        EdbgOutputDebugString ( "2) DHCP: %s\r\n", (pBootCfg->ConfigFlags & CONFIG_FLAGS_DHCP)?"Enabled":"Disabled");
        EdbgOutputDebugString ( "3) Boot delay: %d seconds\r\n", pBootCfg->BootDelay);
        EdbgOutputDebugString ( "4) Reset to factory default configuration\r\n");
        EdbgOutputDebugString ( "5) Startup image: %s\r\n", (g_pBootCfg->ConfigFlags & BOOT_TYPE_DIRECT) ? "LAUNCH EXISTING" : "DOWNLOAD NEW");
        EdbgOutputDebugString ( "6) Program disk image into SmartMedia card: %s\r\n", (pBootCfg->ConfigFlags & TARGET_TYPE_NAND)?"Enabled":"Disabled");
        EdbgOutputDebugString ( "7) Program CS8900 MAC address (%B:%B:%B:%B:%B:%B)\r\n",
                               g_pBootCfg->EdbgAddr.wMAC[0] & 0x00FF, g_pBootCfg->EdbgAddr.wMAC[0] >> 8,
                               g_pBootCfg->EdbgAddr.wMAC[1] & 0x00FF, g_pBootCfg->EdbgAddr.wMAC[1] >> 8,
                               g_pBootCfg->EdbgAddr.wMAC[2] & 0x00FF, g_pBootCfg->EdbgAddr.wMAC[2] >> 8);
        EdbgOutputDebugString ( "8) KITL Configuration: %s\r\n", (pBootCfg->ConfigFlags & CONFIG_FLAGS_KITL) ? "ENABLED" : "DISABLED");
//        EdbgOutputDebugString ( "9) Format Boot Media for BinFS\r\n");

        // N.B: we need this option here since BinFS is really a RAM image, where you "format" the media
        // with an MBR. There is no way to parse the image to say it's ment to be BinFS enabled.
        EdbgOutputDebugString ( "A) Format FIL (Erase All Blocks)\r\n");
        EdbgOutputDebugString ( "B) Format VFL (Format FIL + VFL Format)\r\n");
        EdbgOutputDebugString ( "C) Format FTL (Erase FTL Area + FTL Format)\r\n");
        EdbgOutputDebugString ( "E) Erase Physical Block 0\r\n");
        EdbgOutputDebugString ( "F) Make Initial Bad Block Information (Warning)\r\n");
        EdbgOutputDebugString ( "T) MLC Low level test \r\n");
        EdbgOutputDebugString ( "D) Download image now\r\n");
        EdbgOutputDebugString ( "L) LAUNCH existing Boot Media image\r\n");
        EdbgOutputDebugString ( "R) Read Configuration \r\n");
        EdbgOutputDebugString ( "U) DOWNLOAD image now(USB)\r\n");
        EdbgOutputDebugString ( "W) Write Configuration Right Now\r\n");
        EdbgOutputDebugString ( "\r\nEnter your selection: ");

        while (! ( ( (KeySelect >= '0') && (KeySelect <= '8') ) ||
                   ( (KeySelect == 'A') || (KeySelect == 'a') ) ||
                   ( (KeySelect == 'B') || (KeySelect == 'b') ) ||
                   ( (KeySelect == 'C') || (KeySelect == 'c') ) ||
                   ( (KeySelect == 'D') || (KeySelect == 'd') ) ||
                   ( (KeySelect == 'E') || (KeySelect == 'e') ) ||
                   ( (KeySelect == 'F') || (KeySelect == 'f') ) ||
                   ( (KeySelect == 'T') || (KeySelect == 't') ) ||
                   ( (KeySelect == 'L') || (KeySelect == 'l') ) ||
                   ( (KeySelect == 'R') || (KeySelect == 'r') ) ||
                   ( (KeySelect == 'U') || (KeySelect == 'u') ) ||
                   ( (KeySelect == 'W') || (KeySelect == 'w') ) ||
                   ( (KeySelect == 'X') || (KeySelect == 'x') ) ))
        {
            KeySelect = OEMReadDebugByte();
        }

        EdbgOutputDebugString ( "%c\r\n", KeySelect);

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
99麻豆久久久国产精品免费优播| 亚洲高清在线精品| 国产一区二区三区高清播放| 日韩视频一区二区| 国内精品久久久久影院色| 欧美成人精品二区三区99精品| 久久不见久久见免费视频1| 欧美成人三级在线| 国产91丝袜在线播放九色| 欧美经典一区二区三区| 99re成人精品视频| 亚洲狠狠爱一区二区三区| 欧美丰满美乳xxx高潮www| 九一九一国产精品| 亚洲国产精品99久久久久久久久| 成人小视频在线| 亚洲国产成人av| 久久看人人爽人人| 一本到不卡精品视频在线观看| 亚洲成a天堂v人片| 26uuu亚洲综合色| 91网址在线看| 日韩精品久久久久久| 久久久久高清精品| 在线观看视频欧美| 久草中文综合在线| 亚洲与欧洲av电影| ww亚洲ww在线观看国产| 一本大道av伊人久久综合| 日韩电影免费在线看| 国产精品少妇自拍| 91精品国产综合久久久蜜臀图片| 国产ts人妖一区二区| 亚洲成人午夜电影| 国产日韩一级二级三级| 欧美日韩一区高清| 大胆亚洲人体视频| 日本vs亚洲vs韩国一区三区 | 中文字幕欧美日本乱码一线二线 | 91免费观看视频| 人禽交欧美网站| 国产精品久久久久久久久搜平片| 精品视频全国免费看| 成人a级免费电影| 蜜臀久久久99精品久久久久久| 国产精品久久久久四虎| 日韩欧美在线1卡| 欧美一a一片一级一片| 国产**成人网毛片九色| 麻豆成人在线观看| 亚洲午夜久久久久久久久电影网| 久久久久9999亚洲精品| 欧美一区二区播放| 欧美日韩一级二级| 成年人午夜久久久| 国产aⅴ精品一区二区三区色成熟| 日韩中文字幕一区二区三区| 亚洲欧美视频在线观看| 国产婷婷色一区二区三区| 欧美大尺度电影在线| 欧美日韩精品久久久| 91啪九色porn原创视频在线观看| 国产成人在线视频网站| 久久国产人妖系列| 免费观看日韩av| 日韩综合小视频| 无码av中文一区二区三区桃花岛| 亚洲少妇屁股交4| 亚洲欧美在线观看| 亚洲国产高清不卡| 国产精品美女一区二区三区 | 国产欧美一区二区精品秋霞影院| 日韩欧美亚洲国产另类| 制服丝袜中文字幕一区| 欧美日韩国产系列| 精品视频在线免费| 欧美日韩在线播放三区| 欧美日韩一区二区电影| 欧美日韩精品系列| 欧美精品日韩一区| 日韩欧美在线影院| 日韩精品一区二区三区视频播放 | 91色视频在线| 色婷婷激情综合| 色成人在线视频| 欧美美女喷水视频| 日韩午夜电影在线观看| 日韩美女视频在线| 久久久99免费| 国产精品三级在线观看| 亚洲欧洲成人精品av97| 亚洲日本一区二区三区| 亚洲小少妇裸体bbw| 天堂va蜜桃一区二区三区| 秋霞成人午夜伦在线观看| 麻豆精品一区二区三区| 精品一区二区在线观看| 成人午夜精品在线| 色婷婷精品久久二区二区蜜臂av| 欧美日韩在线综合| 日韩欧美亚洲国产另类| 国产清纯白嫩初高生在线观看91| 国产精品入口麻豆原神| 一区二区三区在线视频免费| 午夜国产不卡在线观看视频| 精品一二三四区| 不卡视频一二三四| 欧美日韩一区二区三区四区| 精品免费国产二区三区| 国产精品免费丝袜| 午夜国产不卡在线观看视频| 久草中文综合在线| 99久久亚洲一区二区三区青草| 欧美专区亚洲专区| 26uuu欧美日本| 亚洲色图在线播放| 奇米色777欧美一区二区| 粉嫩嫩av羞羞动漫久久久 | 制服丝袜一区二区三区| 国产婷婷色一区二区三区在线| 一二三区精品福利视频| 国内精品视频666| 欧美中文字幕不卡| 久久蜜桃一区二区| 亚洲综合色婷婷| 高清av一区二区| 国产精品人成在线观看免费 | 4438x亚洲最大成人网| 国产亚洲欧美色| 日韩精品亚洲专区| 91视频91自| 久久综合九色综合欧美亚洲| 亚洲综合色婷婷| 成人综合激情网| 日韩免费福利电影在线观看| 亚洲男人都懂的| 国产99久久久国产精品| 91精品国产麻豆国产自产在线 | 综合欧美一区二区三区| 精油按摩中文字幕久久| 欧美日韩综合在线| 亚洲色图在线视频| k8久久久一区二区三区 | 欧美剧情片在线观看| 国产精品国产三级国产有无不卡 | 91免费版pro下载短视频| 久久这里只精品最新地址| 亚洲国产日韩a在线播放| 99热精品一区二区| 国产亚洲一区二区三区| 欧美天天综合网| 日韩一区在线免费观看| 粉嫩av一区二区三区粉嫩| 日韩美一区二区三区| 日韩av一区二区在线影视| 欧美在线观看视频一区二区| 1024精品合集| 99综合电影在线视频| 欧美激情中文不卡| 国产一区二区0| 精品久久五月天| 久久成人18免费观看| 日韩欧美一区中文| 免费在线视频一区| 欧美一区二区免费观在线| 天堂成人免费av电影一区| 777午夜精品免费视频| 亚洲成av人**亚洲成av**| 欧美日韩久久久久久| 午夜欧美在线一二页| 欧美日韩国产美| 天天影视涩香欲综合网| 欧美日本在线视频| 男男gaygay亚洲| 日韩欧美色综合| 另类的小说在线视频另类成人小视频在线 | 国产精品色眯眯| 99re成人精品视频| 亚洲自拍偷拍综合| 91精品国产综合久久婷婷香蕉| 日本女人一区二区三区| 777久久久精品| 久久99精品一区二区三区| 久久影音资源网| 高清国产一区二区| 亚洲日本va在线观看| 欧美在线观看视频在线| 亚洲成人在线免费| 欧美成人一级视频| 国产91在线|亚洲| 亚洲免费观看高清完整版在线| 日本电影欧美片| 日韩av一级片| 久久久不卡网国产精品二区| 成人av网站在线观看免费| 夜夜嗨av一区二区三区四季av| 7777精品伊人久久久大香线蕉的 | 成人精品一区二区三区四区| 亚洲精品国产a| 欧美男人的天堂一二区|