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

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

?? 1btldr_pi.c

?? 針對德州儀器DM270開發板的bootloader,其實現了內核的下載以及文件系統的下載
?? C
?? 第 1 頁 / 共 3 頁
字號:
/* * 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> * *  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 "util.h"#include "srec.h"#include "rawbin.h"#include "osd.h"#include "linux.h"#include "usb.h"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.extern 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 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#define MAGIC_DEF 0xbeefface// This flash map works for DM270 (Intel F640 Chips).static const comp_flash_info_t comp_flash_info_640[c_END] = { // MAGIC     // Start     // End { MAGIC_DEF, 0x00000000,  0x0005ffff }, // i = c_BOOTLDR  ~384 KB (first sector of each chip). { MAGIC_DEF, 0x00060000,  0x0007ffff }, // i = c_PARAMS   ~128 KB (next one sector of each chip). { MAGIC_DEF, 0x00080000,  0x0027ffff }, // i = c_KERNEL    ~2 MB // start on (64*2)kbyte boundary. { MAGIC_DEF, 0x00280000,  0x007fffff }  // i = c_FILESYS     ~5.5 MB // start on (64*2)kbyte boundary.};static comp_flash_info_t *comp_flash_info; // always points to either                                           // comp_flash_info_160 or                                           // comp_flash_info_128 or ..etc..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];/* Some boards (such as the OMAP Innovator) have an Ethernet address  * stored in an EEPROM.  The Ethernet initialization function for these  * boards should retrieve the Ethernet address and store it in  * default_MAC.  The address in default_MAC will be used if and only if  * the device MAC address stored in the parameter flash is a null string. */char default_MAC[18] = "00:e0:be:ef:fa:ce";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();//  fat_format();  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.  }  // Setup the array that defines the start and stop  // addresses for the various components that can be  // stored in flash. The addresses in this array need  // to be carefully choosen to start on an erase  // boundary of the specific flash chips detected.   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.bootldr_path[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';  // 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].fheader.load_addr = start;  comp_info[c_BOOTLDR].fheader.num_bytes = bytes;  comp_info[c_BOOTLDR].fheader.entry_addr =(unsigned int) &main;  // Next, indicate that we at least have some default set of params.  comp_info[c_PARAMS].is_SRAM_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.  cmd_copy_comp(c_PARAMS,sd_FLASH,sd_SRAM,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 = FALSE; // 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;    }    // Next, Do we have a filesystem stored?    comp = c_FILESYS;    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;    }  }}/****************************** Routine: Description:   Call Back routine used when doing I/O port component loads ******************************/static void put_val_at_addr(unsigned short *vaddr, unsigned short val){

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
一区二区三区在线视频免费| 久久国产综合精品| 成人午夜av影视| 麻豆久久久久久| 精品国产凹凸成av人网站| 91性感美女视频| 人人狠狠综合久久亚洲| 国产香蕉久久精品综合网| 日韩欧美国产综合| 精品少妇一区二区| 色先锋久久av资源部| 99久久精品国产精品久久| 91尤物视频在线观看| 99久久免费视频.com| av资源网一区| 99久久精品免费精品国产| 亚洲综合色婷婷| 欧美日韩三级视频| 欧美影院精品一区| 日本成人在线看| 国产日韩亚洲欧美综合| 国产精品免费免费| 日韩欧美在线1卡| 国产农村妇女精品| 91精品国产综合久久精品app| 五月激情六月综合| 美国毛片一区二区| 久久av资源网| 奇米一区二区三区| 黄页视频在线91| 国产精品一级片| 国产成a人无v码亚洲福利| av电影在线观看一区| 欧美在线你懂得| 精品奇米国产一区二区三区| 亚洲国产精品99久久久久久久久| 7777精品伊人久久久大香线蕉的| 不卡视频一二三| 欧美日韩aaaaa| 91麻豆精品在线观看| 欧美放荡的少妇| 欧美日韩中文字幕一区| 精品免费国产一区二区三区四区| 99精品久久99久久久久| 国产成人午夜99999| 韩国av一区二区| 久久精品国产99| 麻豆精品在线看| 99久久久久久| 国产91色综合久久免费分享| 婷婷久久综合九色综合绿巨人| 欧美成人艳星乳罩| 国产精品高潮呻吟| 樱桃视频在线观看一区| 国产精品系列在线观看| 欧美色精品天天在线观看视频| 免费在线观看日韩欧美| 日韩成人一区二区三区在线观看| 国产精品久久久久久久久免费桃花| 激情综合色综合久久综合| 国产成人综合精品三级| 欧美一级一区二区| 综合婷婷亚洲小说| 狠狠色狠狠色综合| 成人ar影院免费观看视频| 欧美精选在线播放| 国产精品麻豆99久久久久久| 青青草国产成人99久久| 在线一区二区三区四区五区| 欧美人xxxx| 亚洲成人av资源| 国产一区二区剧情av在线| 欧美精品一卡二卡| 丝袜美腿一区二区三区| 欧美亚洲一区二区在线观看| 一区二区高清免费观看影视大全| 《视频一区视频二区| 艳妇臀荡乳欲伦亚洲一区| 一区二区三区日韩精品视频| 国产一区二区在线观看免费| 国产乱国产乱300精品| 日韩一区二区在线观看| 另类小说图片综合网| 在线成人高清不卡| 久久国产精品色| 精品国产一区二区亚洲人成毛片 | 日韩黄色一级片| 日本高清成人免费播放| 亚洲成人黄色影院| 国产成人精品亚洲777人妖 | 99riav一区二区三区| 欧美精品久久久久久久多人混战 | 成人h动漫精品一区二区| 91视频你懂的| 日韩一卡二卡三卡四卡| 爽好久久久欧美精品| 欧美高清视频一二三区| 亚洲欧美自拍偷拍色图| 精品一区二区三区香蕉蜜桃| 久久男人中文字幕资源站| 国产成人av电影在线播放| 欧美日韩精品一区二区| 美女在线观看视频一区二区| 精品国产一区二区精华| 成人av网站免费| 亚洲一区视频在线| 日韩欧美亚洲一区二区| 亚洲一区二区av在线| 精品剧情v国产在线观看在线| 一区二区免费看| 日韩精品一区二区三区视频播放 | 久久亚洲二区三区| gogogo免费视频观看亚洲一| 日韩欧美精品三级| caoporn国产一区二区| 久久久久国产一区二区三区四区| 亚洲国产精品自拍| 91一区在线观看| 免费观看久久久4p| 国产欧美日本一区二区三区| 久久精品72免费观看| 中文字幕一区二区三区在线观看 | 成人免费毛片aaaaa**| 亚洲尤物视频在线| 国产日本一区二区| 国产一区高清在线| 精品国产麻豆免费人成网站| 成人激情午夜影院| 蜜臀av一区二区| 午夜a成v人精品| 亚洲精品日日夜夜| 国产精品萝li| 91丨九色丨黑人外教| 亚洲品质自拍视频| 国产亚洲欧美一区在线观看| 国产成人丝袜美腿| 韩国女主播一区| 国产精品天美传媒| 精品日韩99亚洲| 3d动漫精品啪啪| 久久99国产乱子伦精品免费| 精品va天堂亚洲国产| 欧美美女一区二区在线观看| 色婷婷av一区| 色婷婷亚洲综合| 视频一区二区三区中文字幕| 中文字幕在线一区二区三区| 国产偷国产偷亚洲高清人白洁| 成人动漫视频在线| 成人h版在线观看| 国产91丝袜在线播放九色| 亚洲另类在线制服丝袜| 亚洲人成7777| 亚洲男人电影天堂| 亚洲欧洲国产日本综合| 国产精品福利一区二区| 成人欧美一区二区三区在线播放| 欧美视频一区在线| 色悠悠亚洲一区二区| 日本不卡一二三| 久久精品国产在热久久| 美女精品一区二区| 久99久精品视频免费观看| 狠狠色狠狠色综合日日91app| 3atv一区二区三区| 成人综合在线视频| 午夜亚洲福利老司机| 亚洲一区av在线| 国产日产亚洲精品系列| 国产欧美一区二区精品仙草咪| 欧美日韩一级二级三级| 国产高清亚洲一区| 国产成人av电影在线播放| 丝袜亚洲精品中文字幕一区| 久久成人免费电影| 国产成人超碰人人澡人人澡| 日韩中文字幕91| 亚洲免费在线观看视频| 亚洲尤物视频在线| 久久国产尿小便嘘嘘| av一区二区不卡| 国产一区二区三区在线观看免费视频| 一区二区三区欧美视频| 一区二区三区国产豹纹内裤在线| 欧洲精品中文字幕| 337p亚洲精品色噜噜噜| 91猫先生在线| 日韩欧美中文一区二区| 亚洲色图.com| 奇米色一区二区| 99久久精品国产精品久久| 国产精品1区二区.| 91久久线看在观草草青青| 精品久久久影院| 欧美一区二区精品久久911| 91国偷自产一区二区开放时间| 成人国产精品免费观看动漫| 欧美在线免费播放| 久久久久久久久久久电影| 亚洲综合精品自拍|