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

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

?? btldr_pi ().c~

?? 針對德州儀器DM270開發板的bootloader,其實現了內核的下載以及文件系統的下載
?? C~
?? 第 1 頁 / 共 4 頁
字號:
/* * File: btldr_pi.c * * An implementation of a bootloader command processor which exposes the * btldr_pi.h interface. Please see btldr_pi.h for more info. * * SEE ALSO: *   btldr_pi.h * * Copyright (C) 2002 RidgeRun, Inc. * Author: RidgeRun, Inc  <skranz@ridgerun.com> *  - Support for DSC25 added, 9-6-02, Gregory Nutt *  - Support for DM270 added, 2-19-03, Gregory Nutt * *  This program is free software; you can redistribute  it and/or modify it *  under  the terms of  the GNU General  Public License as published by the *  Free Software Foundation;  either version 2 of the  License, or (at your *  option) any later version. * *  THIS  SOFTWARE  IS  PROVIDED  ``AS  IS''  AND   ANY  EXPRESS  OR IMPLIED *  WARRANTIES,   INCLUDING, BUT NOT  LIMITED  TO, THE IMPLIED WARRANTIES OF *  MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.  IN *  NO  EVENT  SHALL   THE AUTHOR  BE    LIABLE FOR ANY   DIRECT,  INDIRECT, *  INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT *  NOT LIMITED   TO, PROCUREMENT OF  SUBSTITUTE GOODS  OR SERVICES; LOSS OF *  USE, DATA,  OR PROFITS; OR  BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON *  ANY THEORY OF LIABILITY, WHETHER IN  CONTRACT, STRICT LIABILITY, OR TORT *  (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF *  THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * *  You should have received a copy of the  GNU General Public License along *  with this program; if not, write  to the Free Software Foundation, Inc., *  675 Mass Ave, Cambridge, MA 02139, USA. * * Please report all bugs/problems to the author or <support@dsplinux.net> * * key: RRGPLCR (do not remove) * */#include "types.h"#include "btldr_pi.h"#include "flash.h"#include "net.h"#include "ether.h"#include "tftp.h"#include "io.h"#include "memconfig.h"#include "util.h"#include "srec.h"#include "rawbin.h"#include "osd.h"#include "decompress.h"#include "cache.h"#include "linux.h"// Memory that can be used by the gunzip uncompressor// Last 1 Mbytes of SD RAM#define SDRAM_END ( BSPCONF_SDRAM_BASE + BSPCONF_SDRAM_SIZE)#define GUNZIP_MALLOC_SIZE  (1024 * 1024) // 1 Mbyte#define GUNZIP_MALLOC_START (SDRAM_END - GUNZIP_MALLOC_SIZE)extern int __KernCommandLineMagicStr; // defined by linker script.extern int __KernCommandLineOverride; // defined by linker script.extern int __EtherMACMagicStr;        // defined by linker script.extern int __EtherMAC;                // defined by linker script.extern int btldr_start; // These values are determined by theextern int btldr_end;   // the linker script when the btldr is                        // built. This allows the bootloader to                        // know at run time what address range                        // it occupies. This is important for the                        // bootloader's ability to store itself in                        // flash.extern unsigned int FlashFileSysStart; // These values are determined by theextern unsigned int FlashFileSysEnd ;  // linker script and allow the user to                                       // override the start and end boundaries                                       // that define where the filesystem will                                       // be stored in FLASH. This lets users,                                       // that know exactly how big there kernel                                       // is, to get rid of the some padding that                                       // might normally exists between the kernel                                       // and filesystem component bins as defined                                       // by the comp_flash_info* arrays defined                                       // later in this file. This is talked about                                       // in the memory map portion of the BSP                                       // documentation.unsigned long FlashLockMode; // This is a global variable that will                             // be tested by the flash*.c module before                             // erases or writes flash. If the special                             // code 0xBEEFFEED is not present here then                             // the all flash mod operations will fail                             // and report a flash locked state.char *free_memory_start;     // used by gunzip uncompressorint free_memory_size;        // in bytes#ifdef REPLACE_VECTOR_TABLE/* For the OMAP710 we need these to support replacing the vector table. */extern int __vector_start;extern int __vector_end;#endifextern int main(int argc, char *argv[]); // Signature of the bootloader                                         // entry point. This entry_addr                                         // will be required whenever                                         // the bootloader flashes itself.typedef void(*KERN_SIG)(int r0, int r1); // Signature of the kernel entry point                                          // which the bootloader will be calling                                         // whenever a "boot" command is executed.typedef unsigned int MAGIC_t;typedef struct {  MAGIC_t MAGIC_NUM;  unsigned int START_OFFSET;  unsigned int END_OFFSET;} comp_flash_info_t;//typedef unsigned short u16;//typedef unsigned int u32;#if DSC21typedef struct {    u16 control;    u16 mode;    u16 count;    u16 src_lo;    u16 src_hi;    u16 dest_lo;    u16 dest_hi;    u16 status;} dma_reg_t;#define MAX_DMA_SIZE 0x7FC#elif DSC24typedef struct {    u16 src_hi;    u16 src_lo;    u16 dest_hi;    u16 dest_lo;    u16 count;    u16 mode;    u16 control;} dma_reg_t;#define MAX_DMA_SIZE 0xFFF0#elif DSC25typedef struct {    u16 control;    u16 mode;    u16 count;    u16 src_lo;    u16 src_hi;    u16 dest_lo;    u16 dest_hi;    u16 status;} dma_reg_t;#elif DM270typedef struct {    u16 control;    u16 mode;    u16 count;    u16 src_lo;    u16 src_hi;    u16 dest_lo;    u16 dest_hi;    u16 status;} dma_reg_t;#define MAX_DMA_SIZE 0x7FC#elif DM310typedef struct {    u16 control;    u16 mode;    u16 count;    u16 src_lo;    u16 src_hi;    u16 dest_lo;    u16 dest_hi;    u16 status;} dma_reg_t;#endif#define MAGIC_DEF 0xbeeffacestatic comp_flash_info_t comp_flash_info[c_END] = {  { /* c_BOOTLDR */    MAGIC_DEF,    BSPCONF_BTLDR_FLASH_OFFSET,    BSPCONF_BTLDR_FLASH_OFFSET+BSPCONF_BTLDR_FLASH_SIZE-1  },  { /* c_PARAMS */    MAGIC_DEF,    BSPCONF_PARAMS_FLASH_OFFSET,    BSPCONF_PARAMS_FLASH_OFFSET+BSPCONF_PARAMS_FLASH_SIZE-1  },  { /* c_KERNEL */    MAGIC_DEF,    BSPCONF_KERNEL_FLASH_OFFSET,    BSPCONF_KERNEL_FLASH_OFFSET+BSPCONF_KERNEL_FLASH_SIZE-1  },  { /* c_FILESYS */    MAGIC_DEF,    BSPCONF_FS_FLASH_OFFSET,    BSPCONF_FS_FLASH_OFFSET+BSPCONF_FS_FLASH_SIZE-1  },#ifdef REPLACE_VECTOR_TABLE  { /* c_VECTORS */    MAGIC_DEF,    BSPCONF_FLASH_OFFSET,                       /* Offset to start of region */    BSPCONF_FLASH_OFFSET + 0x00000030,          /* Offset to start of region */#endif};typedef struct {  unsigned int load_addr;  unsigned int entry_addr;  unsigned int num_bytes;} FHEADER_t;typedef struct {  int is_SDRAM_resident;  int is_SRAM_resident;  int is_FLASH_resident;  FHEADER_t fheader;} comp_info_t;static comp_info_t comp_info[c_END];static params_t current_params;static progress_meter_CBack_t prog_strobe;static int strobe_cnt;static int strobe_delta;#define CMDMAX 10static unsigned char cmd[CMDMAX];extern void StageTwoBoardInit(void);/****************************** Routine: Description: ******************************/void btldr_init(void){  unsigned int i, start, end, bytes, f_type;  unsigned char *fill_p;  io_init();  f_type = flash_init(); // f_type set as either 160 or 128                         // as underlying implementation detects                         // the type of flash chips of the EVM.//  tftp_init();  net_init();//  ether_init();  cache_init();  for (i=0; i<c_END; i++) {    comp_info[i].is_SDRAM_resident = FALSE; // default; override below if necessary.    comp_info[i].is_SRAM_resident = FALSE; // default; override below if necessary.    comp_info[i].is_FLASH_resident = FALSE; // default; override below if necessary.  }  if(f_type==640){ //   comp_flash_info = (comp_flash_info_t *) comp_flash_info_640;    }  else{SYSTEM_FATAL("Wrong Flash!");}  {    // Has the user supplied filesystem location overrides    // in the linker script? If so pick those up now.    unsigned int FileSysStart;    unsigned int FileSysEnd;    FileSysStart = (unsigned int)(&FlashFileSysStart);    FileSysEnd   = (unsigned int)(&FlashFileSysEnd);    if (FileSysStart || FileSysEnd) {      // Yes, at least one of them is defined to be      // non zero which means the user wants to override      // the normal hardcoded flash location used      // when storing a filesytem (See rrload linker script      // for more details).      if (FileSysStart) {        if (FileSysStart <= comp_flash_info[c_KERNEL].START_OFFSET) {          util_printf("\n");          util_printf("Error - Linker script FileSysStart too small and\n");          util_printf("        leaves no room for storing a kernel image!\n");          while (1) {}        }        else {          comp_flash_info[c_KERNEL].END_OFFSET    = FileSysStart-1;          comp_flash_info[c_FILESYS].START_OFFSET = FileSysStart;        }      }      if (FileSysEnd) {        comp_flash_info[c_FILESYS].END_OFFSET = FileSysEnd;      }    }  }    // Fill the params area with 0xff so that if we  // dump this area using the emulator we'll more  // easily see our param strings in a sea of 0xff  // chars instead of random data. Not logically  // necessary, just convienient -- and not fool  // proof either as when you start editing params  // using the UI to make strings shorter than they  // where originally then some remnants from the  // old string values will show beyond the null char  // of the new string.  fill_p=(unsigned char *)&current_params;  bytes = sizeof(params_t);  for (i=0; i<bytes; i++) {    *fill_p = 0xFF;    fill_p++;  }  // Assign some default string values within the params area.  current_params.MAX_STR_LEN       = PARAM_STR_LEN; // space avail for each string below.  current_params.server_IP[0]      = '\0';  current_params.server_MAC[0]     = '\0';  current_params.device_IP[0]      = '\0';  current_params.device_MAC[0]     = '\0';  current_params.kernel_path[0]    = '\0';  current_params.filesys_path[0]   = '\0';  current_params.kernel_cmdline[0] = '\0';  current_params.user_data_1[0]    = '\0';  current_params.user_data_2[0]    = '\0';  current_params.user_data_3[0]    = '\0';  current_params.user_data_4[0]    = '\0';  current_params.user_data_5[0]    = '\0';#if defined(DSC24_OSD)  current_params.OSD_path[0]    = '\0';  current_params.OSD_enable[0]     = '\0';#endif  // Next, fill in information for the bootloader proper.  start = (unsigned int)(&btldr_start);  end   = (unsigned int)(&btldr_end);  bytes = (end - start) + 1;  comp_info[c_BOOTLDR].is_SRAM_resident = TRUE;//  comp_info[c_BOOTLDR].is_SDRAM_resident = TRUE;  comp_info[c_BOOTLDR].fheader.load_addr = start;  comp_info[c_BOOTLDR].fheader.num_bytes = bytes;  comp_info[c_BOOTLDR].fheader.entry_addr =(unsigned int) &main;#ifdef REPLACE_VECTOR_TABLE  // Next, fill in information for the vector table  start = (unsigned int)(&__vector_start);  end   = (unsigned int)(&__vector_end);  bytes = (end - start) + 1;  comp_info[c_VECTORS].is_SDRAM_resident = TRUE;  comp_info[c_VECTORS].fheader.load_addr = start;  comp_info[c_VECTORS].fheader.num_bytes = bytes;#endif  // Next, indicate that we at least have some default set of params.  comp_info[c_PARAMS].is_SRAM_resident = TRUE;//  comp_info[c_PARAMS].is_SDRAM_resident = TRUE;  // Next, copy any params that might be stored in  // flash into our, so far defaulted, SDRAM based params  // structure otherwise leave it as is.  Ignore any errors  cmd_copy_comp(c_PARAMS,sd_FLASH,sd_SRAM,f_NA,NULL,0);  //cmd_copy_comp(c_PARAMS,sd_FLASH,sd_SDRAM,f_NA,NULL,0);  // Next, Establish correct is_FLASH_resident setting for   // the various components.  {    MAGIC_t magicn;    comp_t comp;    // Next, Do we have the bootloader stored?    comp_info[c_BOOTLDR].is_FLASH_resident = TRUE; // no magic num associated                                                   // with flash bootldr image.                                                   // So just assign a default.    // Next, Do we have bootloader user params stored?    comp = c_PARAMS;    flash_read(comp_flash_info[comp].START_OFFSET,               (unsigned short *) &magicn,               sizeof(MAGIC_t),               NULL);    if (comp_flash_info[comp].MAGIC_NUM == magicn) {      comp_info[comp].is_FLASH_resident = TRUE;    }    // Next, Do we have a kernel stored?    comp = c_KERNEL;    flash_read(comp_flash_info[comp].START_OFFSET,               (unsigned short *) &magicn,               sizeof(MAGIC_t),               NULL);    if (comp_flash_info[comp].MAGIC_NUM == magicn) {      comp_info[comp].is_FLASH_resident = TRUE;#if BSPCONF_BTLDR_MEMMAP_DEBUG      flash_read(comp_flash_info[comp].START_OFFSET + sizeof(MAGIC_t),		 (unsigned short *) &(comp_info[comp].fheader),		 sizeof(FHEADER_t),		 NULL);#endif    }    // Next, Do we have a filesystem stored?    comp = c_FILESYS;

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
欧美一个色资源| 日韩成人午夜精品| 激情五月激情综合网| 91无套直看片红桃| wwww国产精品欧美| 蜜桃久久精品一区二区| 91麻豆免费在线观看| 国产拍欧美日韩视频二区| 日本欧美久久久久免费播放网| 91日韩在线专区| 国产精品欧美一级免费| 激情综合网天天干| 91精品福利在线一区二区三区| 一区二区高清在线| 99re在线精品| 亚洲欧洲av在线| 成人黄色网址在线观看| 国产午夜亚洲精品午夜鲁丝片| 污片在线观看一区二区| 欧美私人免费视频| 亚洲制服丝袜av| 91久久久免费一区二区| 日韩美女视频一区二区| 99视频国产精品| 中文字幕亚洲不卡| 99精品欧美一区二区三区综合在线| 国产午夜精品一区二区| 国产成人综合自拍| 欧美激情一二三区| heyzo一本久久综合| 国产精品黄色在线观看| 99精品黄色片免费大全| 成人欧美一区二区三区小说 | 亚洲欧洲99久久| 99久久伊人精品| 亚洲激情图片qvod| 欧美日韩精品一区二区三区| 午夜视频久久久久久| 欧美精品在线视频| 久久99国产精品麻豆| 久久美女艺术照精彩视频福利播放| 韩国一区二区三区| 中文成人综合网| 欧美影院精品一区| 七七婷婷婷婷精品国产| 欧美xxxx在线观看| 国产伦精品一区二区三区免费| 欧美激情一区三区| 色av一区二区| 日产国产高清一区二区三区| 日韩一区二区免费高清| 狠狠色丁香婷婷综合久久片| 中文字幕精品综合| 在线亚洲一区二区| 日韩精彩视频在线观看| 久久久久国色av免费看影院| av激情综合网| 日本亚洲一区二区| 亚洲国产精品成人综合| 欧美视频精品在线| 激情六月婷婷综合| 亚洲欧美欧美一区二区三区| 欧美精品久久一区二区三区| 国产在线麻豆精品观看| 亚洲少妇中出一区| 欧美v国产在线一区二区三区| 成人黄色一级视频| 日本特黄久久久高潮| 国产精品久久久久久久久免费桃花| 欧美亚洲一区二区在线| 狠狠狠色丁香婷婷综合激情 | 色乱码一区二区三区88| 青青草国产成人99久久| 国产精品乱人伦一区二区| 欧美中文字幕一区二区三区| 国产一区二区美女| 视频一区中文字幕国产| 国产精品人成在线观看免费| 91精品国产色综合久久不卡电影 | 日韩一区二区电影| 色先锋aa成人| 国产一区二区视频在线播放| 亚洲电影在线播放| 亚洲欧洲av另类| 精品处破学生在线二十三| 91精品1区2区| av网站免费线看精品| 美洲天堂一区二卡三卡四卡视频| 一区二区三区欧美| 亚洲欧洲国产专区| 久久亚洲免费视频| 日韩欧美一区二区不卡| 色猫猫国产区一区二在线视频| 国产91高潮流白浆在线麻豆| 理论片日本一区| 日韩av电影免费观看高清完整版| 亚洲午夜精品网| 亚洲精品国产无天堂网2021| 欧美国产欧美亚州国产日韩mv天天看完整| 在线电影国产精品| 欧美视频在线一区二区三区| 99精品久久免费看蜜臀剧情介绍| 国产.精品.日韩.另类.中文.在线.播放| 青椒成人免费视频| 男女视频一区二区| 视频在线观看国产精品| 亚洲成av人片在线| 亚瑟在线精品视频| 日韩精品视频网| 日本欧美一区二区三区乱码| 青青草97国产精品免费观看无弹窗版| 亚洲成av人综合在线观看| 亚洲一区二区在线观看视频| 亚洲一区免费视频| 婷婷亚洲久悠悠色悠在线播放 | 国产在线国偷精品产拍免费yy| 日本网站在线观看一区二区三区| 日韩精品乱码免费| 狂野欧美性猛交blacked| 激情五月婷婷综合| 高清免费成人av| 99re成人在线| 欧美日韩成人在线一区| 欧美一卡2卡3卡4卡| 337p粉嫩大胆噜噜噜噜噜91av| 久久久青草青青国产亚洲免观| 久久人人97超碰com| 国产精品亲子伦对白| 亚洲女同女同女同女同女同69| 亚洲自拍欧美精品| 久久精品国产澳门| 福利91精品一区二区三区| 91影院在线观看| 91精品国产福利| 亚洲色图都市小说| 亚洲电影在线免费观看| 九一九一国产精品| 成人精品视频网站| 色丁香久综合在线久综合在线观看| 欧美色中文字幕| 日韩欧美亚洲国产另类| 久久九九久精品国产免费直播| 1000部国产精品成人观看| 亚洲国产日韩精品| 极品少妇xxxx精品少妇| 成人动漫一区二区三区| 欧美日韩久久一区二区| 精品99一区二区| 亚洲视频综合在线| 伦理电影国产精品| 99久久99久久精品免费看蜜桃| 欧美日韩视频一区二区| 国产偷v国产偷v亚洲高清| 一级中文字幕一区二区| 老汉av免费一区二区三区| 97久久精品人人爽人人爽蜜臀 | 国产色一区二区| 亚洲一本大道在线| 国产一区二区伦理| 欧美人与性动xxxx| 国产精品―色哟哟| 天天综合天天综合色| 成人av免费网站| 日韩美女一区二区三区| 亚洲欧美视频在线观看视频| 美女视频黄 久久| 色老综合老女人久久久| 精品免费国产一区二区三区四区| 亚洲精品中文在线观看| 国产精品538一区二区在线| 69久久夜色精品国产69蝌蚪网| 国产精品每日更新在线播放网址| 久久精品国产在热久久| 色综合一个色综合亚洲| 国产欧美日韩综合精品一区二区| 日韩av中文在线观看| 欧美在线观看你懂的| 国产精品午夜免费| 国产一区免费电影| 91精品视频网| 日韩电影免费在线观看网站| 在线观看日韩国产| 《视频一区视频二区| 国产99久久久国产精品潘金| 欧美成人精品高清在线播放 | 日韩欧美视频在线| 日韩精品一卡二卡三卡四卡无卡 | 一本一道久久a久久精品综合蜜臀| 欧美精品一区二区三区高清aⅴ | 欧美一区二区美女| 婷婷丁香久久五月婷婷| 欧美日韩三级在线| 亚洲一二三区在线观看| 欧美午夜片在线看| 亚洲国产精品久久久久婷婷884| 色激情天天射综合网| 亚洲激情男女视频| 欧美日韩午夜在线视频| 石原莉奈在线亚洲二区| 欧美精品第1页|