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

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

?? sysinit.c

?? 這是單板上DPRAM的驅動程序
?? C
?? 第 1 頁 / 共 2 頁
字號:

#if (BSP_FPU == YES)
    NodeCfg.cputype |= 0x100;
#else
    NodeCfg.cputype &= ~0x100;
#endif

anchor = &NodeCfg;

#if (SC_BOOT_ROM == YES)
rom_anchor = &NodeCfg;
#endif /* SC_BOOT_ROM */

return(FreeMemPtr);
}


/***********************************************************************/
/*     SysInit: Initialize system variables, conduct startup dialog    */
/*              if configured, and set up component configuration      */
/*              tables.                                                */
/*                                                                     */
/*        NOTE: Interrupts are assumed to be disabled upon entry to    */
/*              this routine.                                          */
/*                                                                     */
/***********************************************************************/
void SysInit(void)
{
ULONG csum, magic, StorageOffset, size, rc;
ULONG storage_update=FALSE, error_flag;
UCHAR *FreeMemPtr, *LastByte;

#if BSP_NEW_SERIAL
    int i;
#endif

#if (SC_SD_PARAMETERS == SYS_CONF)
    UCHAR DebugModeSv;
#endif

/*---------------------------------------------------------------------*/
/*                                                                     */
/*---------------------------------------------------------------------*/
/* Initialize the system variables.  If SC_SD_PARAMETERS is STORAGE,   */
/* we will attempt to read the variables from the parameter storage    */
/* area.  The parameter storage area is formatted as follows:          */
/*                                                                     */
/*     |                           |                                   */
/*     |===========================|  (lowest addr in parameter        */
/*     | "Magic #" (4 bytes)       |   storage area)                   */
/*     |===========================|                                   */
/*     | SysVars checksum (4 bytes)|                                   */
/*     |---------------------------|                                   */
/*     | SysVars                   |                                   */
/*     |===========================|                                   */
/*     | BspVars checksum (4 bytes)|                                   */
/*     |---------------------------|                                   */
/*     | BspVars                   |                                   */
/*     |===========================|                                   */
/*     | AppVars checksum (4 bytes)|                                   */
/*     |---------------------------|                                   */
/*     | AppVars                   |                                   */
/*     |===========================|                                   */
/*     |                           |                                   */
/*                                                                     */
/* BspVars is only present if BSP_PARMS is non-zero (bsp.h)            */
/* AppVars is only present if SC_APP_PARMS is non-zero (sys_conf.h)    */
/*                                                                     */
/*---------------------------------------------------------------------*/

/*---------------------------------------------------------------------*/
/* Check that the parameters will fit.  "60" is the size of SysVars.   */
/*---------------------------------------------------------------------*/
#if ((60 + BSP_PARMS + SC_APP_PARMS + 16) > 256)
    #error "Too many parameters to fit in parameter storage area"
#endif

StorageRead(sizeof(NVVars), 0, &NVVars);

magic = NVVars.magic;
csum = NVVars.SysVars_CheckSum;
if ((csum != CheckSum(&SysVars, sizeof(SysVars))) || (magic != MAGIC))
    {
    storage_update = TRUE;
    SysVars = SysVarsDefaults;
    }

#if (SC_SD_PARAMETERS == SYS_CONF)
    DebugModeSv = SysVars.DebugMode;
    SysVars = SysVarsDefaults;
    SysVars.DebugMode = DebugModeSv;
#endif

#if (SC_SD_DEBUG_MODE != STORAGE)
    SysVars.DebugMode = SC_SD_DEBUG_MODE;
#endif

if ((SysVars.DebugMode > 4) || (SysVars.DebugMode < 1))
    SysVars.DebugMode = 1;

StorageOffset = (ULONG)(sizeof(SysVars) + 8);

#if BSP_PARMS
    csum = NVVars.BspVars_CheckSum;
    if ((csum != CheckSum(BspVars, BSP_PARMS)) || (magic != MAGIC))
        {
        storage_update = TRUE;
        BspGetdefaults(BspVars);
        }

    #if (SC_SD_PARAMETERS == SYS_CONF)
        BspGetdefaults(BspVars);
    #endif
    StorageOffset += (BSP_PARMS + 4);
#endif

#if SC_APP_PARMS
    csum = NVVars.AppVars_CheckSum;
    if ((csum != CheckSum(AppVars, SC_APP_PARMS)) || (magic != MAGIC))
        {
        storage_update = TRUE;
        AppGetdefaults(AppVars);
        }

    #if (SC_SD_PARAMETERS == SYS_CONF)
        AppGetdefaults(AppVars);
    #endif

#endif

/*---------------------------------------------------------------------*/
/* Initialize the polled serial driver so we can use Print() to print  */
/* messages out.  The polled serial driver will also be needed for the */
/* configuration dialog if it is configured.                           */
/*---------------------------------------------------------------------*/
#if !BSP_NEW_SERIAL
    Delay100ms();
    SerialSetup(SysVars.DefBaud, PROBE_CON_SER_PORT, SC_RBUG_PORT);
    SerialPollInit();
    SerialPollOn();
    Delay100ms();
#else
    SysBaud = SysVars.DefBaud;
    SysConsole = SC_APP_CONSOLE;
#endif

/*---------------------------------------------------------------------*/
/* The memory starting at "FreeMemStart" is available for allocation.  */
/* Call any high-level drivers that are configured so they can grab    */
/* some of this memory if they need it.  This technique allows us to   */
/* build systems in which the drivers use different numbers of buffers */
/* without having to re-compile the drivers.                           */
/*---------------------------------------------------------------------*/
FreeMemPtr = FreeMemStart;
FreeMemPtr = (UCHAR *)ALIGN((ULONG)FreeMemPtr, 4);

#if SC_RAM_SIZE
    LastByte = (UCHAR *)(SC_RAM_SIZE + BSP_RAM_BASE - 1);
#else
    LastByte = (UCHAR *)(RamSize() + (ULONG)BSP_RAM_BASE - 1UL);
#endif

#if BSP_NEW_SERIAL

    /*-----------------------------------------------------------------*/
    /* Set the variables ProbeCon and ProbeHst to pe used by dipi      */
    /* driver.                                                         */
    /*-----------------------------------------------------------------*/
    ProbeCon = PROBE_CON_SER_PORT;
    ProbeHst = SC_RBUG_PORT;

    /*-----------------------------------------------------------------*/
    /* Initialize the General Serial Messaage block manager            */
    /*-----------------------------------------------------------------*/
    /* Store the Starting address of the GS block area                 */
    /*-----------------------------------------------------------------*/
    #if (BSP_MMU == YES)
        FreeMemPtr = (UCHAR *)ALIGN((ULONG)FreeMemPtr, 4*1024);
        gGsBlkArea = (UCHAR *)FreeMemPtr;
    #endif                             
    FreeMemPtr = (UCHAR *)ALIGN((ULONG)FreeMemPtr, 4);
    FreeMemPtr = GSblkSetup(FreeMemPtr, (ULONG)LastByte, &error_flag);
    #if (BSP_MMU == YES)
        FreeMemPtr = (UCHAR *)ALIGN((ULONG)FreeMemPtr, 4*1024);
    #endif            
    /*-----------------------------------------------------------------*/
    /* Get the size of the GS block area allocated                     */
    /* Note: The two global variables, gGsBlkArea and gGsBlkAreaSize   */
    /*       are used by the MMU module to non-cache this region.      */
    /*-----------------------------------------------------------------*/
    #if (BSP_MMU == YES)
        gGsBlkAreaSize = (ULONG)(FreeMemPtr - gGsBlkArea);
    #endif                                  
    
    /*-----------------------------------------------------------------*/
    /* Initialize the lower serial driver.                             */
    /*-----------------------------------------------------------------*/
    SerialInit();

    /*-----------------------------------------------------------------*/
    /* Set up the "non pSOS serial ports" variables.                   */
    /*-----------------------------------------------------------------*/
    NumNon_pSOSChan = SC_NumNon_pSOSChan;
    i = 0;
    #if PROBE_CON_SER_PORT != 0
        Non_pSOSChan[i++] = PROBE_CON_SER_PORT;
    #endif
    #if SC_RBUG_PORT != 0
        Non_pSOSChan[i++] = SC_RBUG_PORT;
    #endif
    if (NumNon_pSOSChan < i)
	NumNon_pSOSChan = i;
#endif
     
#if !BSP_NEW_SERIAL && BSP_PARALLEL
    FreeMemPtr = (UCHAR *)ALIGN((ULONG)FreeMemPtr, 4);
    FreeMemPtr = GSblkSetup(FreeMemPtr, (ULONG)LastByte, &error_flag);
#endif
 
#   if BSP_NEW_SERIAL
        ProbeIOInit();
#   endif

#   if (BSP_NEW_SERIAL || BSP_PARALLEL)
    if (error_flag)
      {
       while(1)
          {
    Print("\n\t#############################################################\n");
    Print("\t#                                                           #\n");
    Print("\t# GSblkSetup needs more memory to configure all the MBLK's  #\n");
    Print("\t# configured in gsblk_bufcfg structure.                     #\n");
    Print("\t#                                                           #\n");
    Print("\t# You need to re-configure your GS Blocks according to      #\n");
    Print("\t# Your memory requirements.                                 #\n");
    Print("\t#                                                           #\n");
    Print("\t# Modify GS_BUFS_xx in \"sys_conf.h\" file or configure       #\n");
    Print("\t# more memory for the Board and re-run the application.     #\n");
    Print("\t#                                                           #\n");
    Print("\t#############################################################\n");
        for (rc=0; rc<50; rc++)
          Delay100ms();
          }
        }
#endif

/*---------------------------------------------------------------------*/
/* If interactive dialog is configured, do it now.                     */
/*---------------------------------------------------------------------*/
#if SC_STARTUP_DIALOG
    #if (SC_SD_PARAMETERS == SYS_CONF)
       #error "SC_SD_PARAMETERS must be STORAGE if SC_STARTUP_DIALOG is YES"
    #endif

    if ((Dialog() == YES) || (storage_update == TRUE))
        {
        Print("Updating parameter storage. "
              "This may take a while...");

        /*-------------------------------------------------------------*/
        /* Save changed system variables in parameter storage area     */
        /*-------------------------------------------------------------*/
        NVVars.magic = MAGIC;
        NVVars.SysVars_CheckSum = CheckSum(&SysVars, sizeof(SysVars));

        #if BSP_PARMS
            NVVars.BspVars_CheckSum = CheckSum(&BspVars, sizeof(BspVars));
        #endif

        #if SC_APP_PARMS
            NVVars.AppVars_CheckSum = CheckSum(&AppVars, sizeof(AppVars));
        #endif

        StorageWrite(sizeof(NVVars), 0, &NVVars);
        Print("Done\n");
        }
#endif

/*---------------------------------------------------------------------*/
/* The parameters are now set - so do the following:                   */
/*    * Call BSP to advise it of VME base address (if appropriate)     */
/*    * Advise BSP and application of "final" values of their          */
/*      parameters (if appropriate)                                    */
/*---------------------------------------------------------------------*/
#if BSP_VME
    SetVmeAddress(SysVars.VmeBaseAddr);
#endif

#if BSP_PARMS
    BspUse(BspVars);
#endif

#if SC_APP_PARMS
    AppUse(AppVars);
#endif

/*---------------------------------------------------------------------*/
/* Check that the parameters make sense, then build the component      */
/* configuration tables                                                */
/*---------------------------------------------------------------------*/
AdjustSysVars();

FreeMemPtr = BuildConfigTables(FreeMemPtr);

/*---------------------------------------------------------------------*/
/* Check FreeMemPtr to make sure it has not over run memory!           */
/* NOTE: If pSOS+ has been configured into the system, the FreeMemPtr  */
/*       is now part of pSOS+ region zero!  So it can't be used to     */
/*       allocate any more memory after this.                          */
/*---------------------------------------------------------------------*/
if (FreeMemPtr > LastByte)
    SysInitFail(MemErrMsg);
#if BSP_NEW_SERIAL
    /*-----------------------------------------------------------------*/
    /* Initialize the lower serial driver.                             */
    /*-----------------------------------------------------------------*/
    SysBaud = SysVars.DefBaud;
    SerialInit();
    ProbeIOReinit();
    /*ProbeIOInit(); -- err by szg */
#else
    /*-----------------------------------------------------------------*/
    /* Set up serial driver again (in case baud rate changed).         */
    /*-----------------------------------------------------------------*/
    SerialSetup(SysVars.DefBaud, PROBE_CON_SER_PORT, SC_RBUG_PORT);
    SerialPollInit();
    SerialPollOn();
    Delay100ms();
#endif


/*---------------------------------------------------------------------*/
/* Start pROBE+ running, if it is present.  Otherwise, transfer        */
/* control directly to pSOS+.                                          */
/*---------------------------------------------------------------------*/
#if SC_PROBE
    #if SC_BOOT_ROM
        if(SysVars.DebugMode == DBG_XS)

            Print("pROBE+ is now ready to talk to the host debugger"
                  " over this serial channel...\n");
	    else if (SysVars.DebugMode == DBG_XN)
            Print("pROBE+ is now ready to talk to the host debugger"
                  " over the network...\n");
     #endif
#if (SC_PROBE == USEROM)
    pROBE_tmp = (ULONG(*)(void))((ULONG)(NodeCfg.probect->td_code) +
    ENTRY_START_OFFSET + (ENTRY_LENGTH * PROBE_INIT_OFFSET));
    rc = (*pROBE_tmp)();

#else

    rc = pROBE_Init();
#endif
    while(1)
        {
        Print("pROBE+ Initialization Failed, Error Code 0x%08X\n", rc);
        Delay5sec();
        }

#elif (SC_PSOS || SC_PSOSM)

#if !BSP_NEW_SERIAL
    SerialPollOff();
#else
    ProbeExit();
#endif

#if ((SC_PSOS == USEROM) || (SC_PSOSM == USEROM))
    pSOS_tmp = (ULONG(*)(void))((ULONG)(NodeCfg.psosct->kc_psoscode) +
    ENTRY_START_OFFSET);
    rc = (*pSOS_tmp)();

#else

    PSOS_INIT();
#endif

#else
#if !BSP_NEW_SERIAL
    SerialPollOff();
#else
    ProbeExit();
#endif
    AppCode();   /* Not using pSOS or pROBE */
#endif

}

static void Delay5sec(void)
{
    ULONG i;
 
    for (i=0; i<50; i++)
        Delay100ms();
}
 
#if __cplusplus
}
#endif

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
丁香六月久久综合狠狠色| 在线亚洲一区二区| 亚洲精品国久久99热| 日韩一区二区电影在线| 91亚洲精品乱码久久久久久蜜桃| 婷婷成人激情在线网| 中日韩av电影| 精品国产三级电影在线观看| 色婷婷av一区二区三区gif| 国产激情一区二区三区桃花岛亚洲| 亚洲国产日韩a在线播放性色| 国产精品久久久久一区二区三区共| 日韩亚洲国产中文字幕欧美| 在线视频你懂得一区| 国产成人免费视频网站| 麻豆精品国产91久久久久久| 午夜精品久久久久久久久| 亚洲区小说区图片区qvod| 国产日产精品一区| 亚洲精品在线观看网站| 日韩三级免费观看| 欧美人成免费网站| 在线精品观看国产| 一本久久a久久免费精品不卡| 国产宾馆实践打屁股91| 色综合久久久久综合体桃花网| 国产精品123区| 精品亚洲国产成人av制服丝袜| 天天色图综合网| 亚洲一级二级在线| 亚洲综合在线电影| 亚洲精品视频观看| 亚洲免费av观看| 亚洲精品精品亚洲| 亚洲最大色网站| 亚洲一区二区影院| 亚洲综合999| 亚洲资源在线观看| 亚洲综合免费观看高清在线观看| 亚洲美腿欧美偷拍| 亚洲一区二区视频在线观看| 综合激情成人伊人| 亚洲人成精品久久久久久| 亚洲日穴在线视频| 亚洲精品久久久蜜桃| 亚洲一区二区在线免费观看视频| 亚洲国产精品嫩草影院| 亚洲动漫第一页| 蜜臀99久久精品久久久久久软件| 日韩在线一区二区| 麻豆成人av在线| 国产成人综合亚洲网站| www.欧美亚洲| 在线亚洲一区二区| 欧美一区二区观看视频| 精品久久久久久久久久久久包黑料| 精品剧情v国产在线观看在线| 久久人人爽人人爽| 国产精品国产三级国产aⅴ中文| 亚洲精品久久7777| 日本亚洲电影天堂| 国产精品一区免费在线观看| 粉嫩aⅴ一区二区三区四区五区| 99久久久久免费精品国产| 欧洲在线/亚洲| 欧美一区二区免费视频| 国产欧美日韩亚州综合| 中文字幕中文字幕在线一区 | 国产**成人网毛片九色| 97久久超碰精品国产| 欧美三级乱人伦电影| 日韩女优毛片在线| 国产精品久久毛片| 午夜视频一区在线观看| 国产精品资源网站| 色哟哟欧美精品| 日韩欧美国产成人一区二区| 中文无字幕一区二区三区| 亚洲一区二区三区在线播放| 九九精品视频在线看| 99久久婷婷国产综合精品| 中文字幕欧美日本乱码一线二线| 亚洲欧美在线aaa| 日日欢夜夜爽一区| 白白色 亚洲乱淫| 欧美一区午夜视频在线观看 | 五月天丁香久久| 国产精品综合在线视频| 欧美在线制服丝袜| 久久久久免费观看| 午夜亚洲国产au精品一区二区| 国产精品69毛片高清亚洲| 欧美私模裸体表演在线观看| 久久精品一区蜜桃臀影院| 亚洲在线观看免费| 成人丝袜18视频在线观看| 91麻豆精品国产91久久久久久久久 | 亚洲国产成人精品视频| 国产成人精品三级麻豆| 91麻豆精品国产自产在线观看一区 | 2017欧美狠狠色| 亚洲国产aⅴ成人精品无吗| 福利一区二区在线| 日韩一区二区三区精品视频| 亚洲女厕所小便bbb| 激情欧美一区二区| 欧美日本视频在线| 亚洲欧美激情视频在线观看一区二区三区| 捆绑调教一区二区三区| 欧美中文字幕一区| 亚洲欧美另类久久久精品2019| 国产91精品久久久久久久网曝门| 在线不卡中文字幕播放| 亚洲自拍偷拍综合| 91原创在线视频| 中文字幕视频一区| 国产成人高清在线| 久久综合色婷婷| 久久不见久久见中文字幕免费| 欧美精品v国产精品v日韩精品| 亚洲一区欧美一区| 一本色道久久综合亚洲aⅴ蜜桃| 中文字幕不卡在线播放| 国产一本一道久久香蕉| 日韩欧美电影一二三| 日韩精品电影在线| 欧美精选在线播放| 亚洲一卡二卡三卡四卡五卡| 色先锋资源久久综合| 国产精品国产三级国产aⅴ原创| 国产乱人伦偷精品视频不卡 | 午夜免费欧美电影| 欧美视频在线一区二区三区 | 最新热久久免费视频| 成人av在线影院| 日韩不卡一区二区| 欧美日韩高清一区二区不卡| 婷婷综合五月天| 欧美日韩精品欧美日韩精品一 | 亚洲国产综合人成综合网站| 色综合天天综合网国产成人综合天| 国产精品天美传媒沈樵| 成人毛片在线观看| 亚洲私人黄色宅男| 色欧美88888久久久久久影院| 亚洲裸体xxx| 欧美色图片你懂的| 日本一不卡视频| 日韩欧美一二三区| 国产原创一区二区三区| 国产日韩欧美不卡| 99国产精品久| 夜夜亚洲天天久久| 欧美一区二区三区啪啪| 黄色小说综合网站| 国产精品乱码人人做人人爱| 91免费小视频| 午夜激情综合网| 精品对白一区国产伦| 东方aⅴ免费观看久久av| 亚洲精品乱码久久久久久日本蜜臀| 在线亚洲人成电影网站色www| 日本少妇一区二区| 久久精品一二三| 色菇凉天天综合网| 美女www一区二区| 中文字幕精品综合| 在线免费亚洲电影| 久久不见久久见免费视频1| 国产精品久久久一本精品| 91福利视频在线| 激情丁香综合五月| 一区二区三区在线观看视频| 欧美一级一区二区| 成人午夜激情片| 亚洲不卡一区二区三区| 久久久不卡网国产精品二区| 色天使色偷偷av一区二区| 免费人成黄页网站在线一区二区 | 亚洲综合一区二区三区| 精品福利在线导航| 91色综合久久久久婷婷| 麻豆国产精品一区二区三区| 国产精品国产自产拍在线| 这里只有精品99re| 91免费在线看| 国产麻豆精品视频| 五月天丁香久久| 国产精品家庭影院| 日韩欧美成人激情| 在线观看成人小视频| 国产成人精品三级麻豆| 免费成人在线观看| 亚洲另类春色校园小说| 精品国产第一区二区三区观看体验 | 久久久久综合网| 91麻豆精品国产91久久久久久久久| av男人天堂一区| 狠狠色2019综合网| 亚洲国产人成综合网站|