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

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

?? btldr_pi.c~

?? 針對德州儀器DM270開發板的bootloader,其實現了內核的下載以及文件系統的下載
?? C~
?? 第 1 頁 / 共 4 頁
字號:
  switch (comp) {#ifdef REPLACE_VECTOR_TABLE  case c_VECTORS:      if (TRUE == comp_info[comp].is_SDRAM_resident) {        ret |= flash_write(comp_flash_info[comp].START_OFFSET,                    (unsigned short *) (comp_info[comp].fheader.load_addr),                    comp_info[comp].fheader.num_bytes, NULL);        if (ret == 0) {                comp_info[comp].is_FLASH_resident = TRUE;        }      }      break;#endif    case c_BOOTLDR:       if (TRUE == comp_info[comp].is_SRAM_resident) {//      if (TRUE == comp_info[comp].is_SDRAM_resident) {        ret |= flash_write(comp_flash_info[comp].START_OFFSET,                    (unsigned short *) (comp_info[comp].fheader.load_addr),                    comp_info[comp].fheader.num_bytes,                    get_val_from_addr);        if (ret == 0) {                comp_info[comp].is_FLASH_resident = TRUE;        }      }      break;    case c_PARAMS:        if (TRUE == comp_info[comp].is_SRAM_resident) {//      if (TRUE == comp_info[comp].is_SDRAM_resident) {        ret |= flash_write(comp_flash_info[comp].START_OFFSET,                    (unsigned short *) &(comp_flash_info[comp].MAGIC_NUM),                    sizeof(MAGIC_t),NULL);        ret |= flash_write(comp_flash_info[comp].START_OFFSET + sizeof(MAGIC_t),                    (unsigned short *) &current_params,                    sizeof(current_params),NULL);#if defined(DSC24_OSD)        ret |= flash_write(comp_flash_info[comp].START_OFFSET + sizeof(MAGIC_t) + sizeof(current_params),                    (unsigned short *) &(comp_info[comp].fheader),                    sizeof(FHEADER_t),                    NULL);        ret |= flash_write(comp_flash_info[comp].START_OFFSET + sizeof(MAGIC_t) + sizeof(current_params) + sizeof(FHEADER_t),                    (unsigned short *) (comp_info[comp].fheader.load_addr),                    comp_info[comp].fheader.num_bytes,                    get_val_from_addr);#endif        if (ret == 0) {                comp_info[comp].is_FLASH_resident = TRUE;        }      }      break;    case c_KERNEL:       if (TRUE == comp_info[comp].is_SDRAM_resident) {        ret |= flash_write(comp_flash_info[comp].START_OFFSET,                    (unsigned short *) &(comp_flash_info[comp].MAGIC_NUM),                    sizeof(MAGIC_t),                    NULL);        ret |= flash_write(comp_flash_info[comp].START_OFFSET + sizeof(MAGIC_t),                    (unsigned short *) &(comp_info[comp].fheader),                    sizeof(FHEADER_t),                    NULL);        ret |= flash_write(comp_flash_info[comp].START_OFFSET + sizeof(MAGIC_t) + sizeof(FHEADER_t),                    (unsigned short *) (comp_info[comp].fheader.load_addr),                    comp_info[comp].fheader.num_bytes,                    get_val_from_addr);        if (ret == 0) {                comp_info[comp].is_FLASH_resident = TRUE;        }	/* If the kernel is compressed, then "remove" the 	   compressed kernel from RAM, so rrload boot	   logic will store the decompressed image there */#if ( BSPCONF_KERNEL_COMPRESSED == 1 ) ||  ( BSPCONF_FS_COMPRESSED == 1 )	if (image_is_compressed((char *)comp_info[comp].fheader.load_addr)) {	  comp_info[comp].is_SDRAM_resident = FALSE;	}#endif      }      break;    case c_FILESYS:      // util_printf("flashing -- load_addr 0x%X, entry_addr 0x%X, num_bytes 0x%X, offset 0x%X\n",      //              comp_info[comp].fheader.load_addr,      //              comp_info[comp].fheader.entry_addr,      //              comp_info[comp].fheader.num_bytes,      //              comp_flash_info[comp].START_OFFSET); // *debug* temp.      if (TRUE == comp_info[comp].is_SDRAM_resident) {#if !defined(OMAP1510)        ret |= flash_write(comp_flash_info[comp].START_OFFSET,                    (unsigned short *) &(comp_flash_info[comp].MAGIC_NUM),                    sizeof(MAGIC_t),                    NULL);        ret |= flash_write(comp_flash_info[comp].START_OFFSET + sizeof(MAGIC_t),                    (unsigned short *) &(comp_info[comp].fheader),                    sizeof(FHEADER_t),                    NULL);        ret |= flash_write(comp_flash_info[comp].START_OFFSET + sizeof(MAGIC_t) + sizeof(FHEADER_t),                    (unsigned short *) (comp_info[comp].fheader.load_addr),                    comp_info[comp].fheader.num_bytes,                    get_val_from_addr);#else        // JFFS2 cannot handle the header info.         // REVISIT - DG: Now that we are leaving out the header, what bad things happen?        ret |= flash_write(comp_flash_info[comp].START_OFFSET,                    (unsigned short *) (comp_info[comp].fheader.load_addr),                    comp_info[comp].fheader.num_bytes,                    get_val_from_addr);#endif        if (ret == 0) {                comp_info[comp].is_FLASH_resident = TRUE;        }	/* If the file system is compressed, then "remove" the 	   compressed file system from RAM, so rrload boot	   logic will store the decompressed image there */#if ( BSPCONF_KERNEL_COMPRESSED == 1 ) ||  ( BSPCONF_FS_COMPRESSED == 1 )	if (image_is_compressed((char *)comp_info[comp].fheader.load_addr)) {	  comp_info[comp].is_SDRAM_resident = FALSE;	}#endif      }      break;    default:      SYSTEM_FATAL("Logic Error");      break;  }  status = flash_flush();  if (status >= 0) {    util_printf("Flash Write error at offset %d\n",status);    return -1;  }  return ret;}/****************************** Routine: Description:   Note: See btldr_pi.h for description. ******************************/int cmd_copy_comp(comp_t c,        //component                   src_dest_t s,    //src                   src_dest_t d,    //dest                   port_format_t f, //format                   progress_meter_CBack_t CBack,                   int strobe_interval){  int ret = 0;   // !!!!!!!!!!!  // Note:  // Of all the possible combinations of s and d parameters  // only the following are currently supported by this particular  // bootloader. Other bootloaders implementing the btldr_pi.h  // interface may chose to support more combinations.  //   //   1. copy from port to sdram  //   2. copy from flash to sdram  //   3. copy from sdram to flash  //   4. copy from sram to flash  // !!!!!!!!!!!      prog_strobe = CBack;  strobe_delta = strobe_interval;  strobe_cnt = 0;  switch (d) {    default:      // The d parameter is totally ignored since all      // the currently supported modes can be deduced by      // testing the s param only.      break;  }  switch (s) {    // Note: | Again, with the specified source (s) we'll assume the    //       | destination -- independent of the dest (d) parameter.    case sd_SDRAM:      ret |= push_to_flash(c);      break;    case sd_SRAM:      ret |= push_to_flash(c);      break;    case sd_FLASH:      pull_from_flash(c);      break;    case sd_TFTP:      if (c_KERNEL == c) {        connect_tftp(current_params.device_IP,                     current_params.server_IP,                     current_params.device_MAC,                     current_params.server_MAC,                     current_params.kernel_path);      }      else if (c_FILESYS == c) {        connect_tftp(current_params.device_IP,                     current_params.server_IP,                     current_params.device_MAC,                     current_params.server_MAC,                     current_params.filesys_path);              } #if defined(DSC24_OSD)      else if (c_PARAMS == c) {        connect_tftp(current_params.device_IP,                     current_params.server_IP,                     current_params.device_MAC,                     current_params.server_MAC,                     current_params.OSD_path);              } #endif      ret |= load(c,s,f);      disconnect_tftp();      break;    case sd_PARPORT:    case sd_SERPORT:      ret |= load(c,s,f);      break;    default:      SYSTEM_FATAL("Logic Error");      break;  }  return ret;}/****************************** Routine: Description:   Note: See btldr_pi.h for description. ******************************/params_t *cmd_get_params(void){  return &current_params;}/****************************** Routine: Description:   Note: See btldr_pi.h for description. ******************************/void cmd_boot_kernel(int auto_xfer, // TRUE or FALSE,                     progress_meter_CBack_t CBack,                     int strobe_interval){//  struct tag *params = (struct tag *)0x000000FC; if (auto_xfer) {    // Next, Check to see if the components needed for a    // kernel boot are already in RAM. If not there    // already then move the image to RAM *if* it needs    // to go there before use. Data recorded with the    // image indicates our course of action. If the    // image is intended to be used *directly* from flash    // then the following calls have no effect.    if ((comp_info[c_KERNEL].is_FLASH_resident)&(!comp_info[c_KERNEL].is_SDRAM_resident)) {      cmd_copy_comp(c_KERNEL,sd_FLASH,sd_SDRAM,f_NA,CBack,strobe_interval);    }    if ((comp_info[c_FILESYS].is_FLASH_resident)&(!comp_info[c_FILESYS].is_SDRAM_resident)) {      cmd_copy_comp(c_FILESYS,sd_FLASH,sd_SDRAM,f_NA,CBack,strobe_interval);    }  }    if (comp_info[c_KERNEL].is_SDRAM_resident ) {//  if (comp_info[c_KERNEL].is_SDRAM_resident) {//      comp_info[c_KERNEL].is_FLASH_resident) {    // Next, Put our device ethernet MAC in the special memory location    //       which the kernel will reference when initializing its    //       ethernet driver.    // First write a magic string that gives validity to this area of SDRAM.    // The kernel will test validity prior to using the command line we are    // going to deposit.//    util_strcpy((unsigned char *)&__EtherMACMagicStr,"etherMAC-->");//    *((unsigned char *)&__EtherMAC) = (unsigned char) 0;//    util_strcpy((unsigned char *)&__EtherMAC,current_params.device_MAC);     // Next, Put our kernel command line overrides in the special    //       memory location which the kernel will reference on boot.    // First write a magic string that gives validity to this area of SDRAM.    // The kernel will test validity prior to using the command line we are    // going to deposit.//    util_strcpy((unsigned char *)&__KernCommandLineMagicStr,"kcmdline-->");//    *((unsigned char *)&__KernCommandLineOverride) = (unsigned char) 0;//    util_strcpy((unsigned char *)&__KernCommandLineOverride,current_params.kernel_cmdline);//    util_printf("\nCommand line overrides = %s\n",(unsigned char *)&__KernCommandLineOverride);    util_printf("Jumping to 0x%X\n",comp_info[c_KERNEL].fheader.entry_addr);    io_delay(100); // kill some time to allow printf chars to get out                   // the i/o port before we jump to the kernel.#if 0    *((unsigned int*)0xffff2800) = 0;	// turn off power/status LED#endif    lock_flash(); // We'll keep flash unlocked the whole                  // time the bootloader is running until                  // it is time to transfer control to the                   // kernel at which time we first lock                  // flash. Hopefully this will prevent                  // corrupted flash that might otherwise                  // result in a run-away program randomly                  // jumping into the flash logic of the                  // bootloader image still laying around                  // in ram from a prior run.    // Make sure the cache doesn't have any bad data    icache_disable();    icache_clear();//    params->hdr.tag = ATAG_CORE;//    params->hdr.size = tag_size(tag_core);//    params->u.core.flags = 0;//    params->u.core.pagesize = PAGE_SIZE;//    params->u.core.rootdev = RAMDISK_MAJOR << 8 | 0;//    params = tag_next(params);//    params->hdr.tag = ATAG_MEM;//    params->hdr.size = tag_size(tag_mem32);//    params->u.mem.start = 0x00900000;//    params->u.mem.size  = 64 * 1024 * 1024;//    params = tag_next(params);//    if (util_strlen(current_params.kernel_cmdline)) {//        params->hdr.tag = ATAG_CMDLINE;//        params->hdr.size = (sizeof(struct tag_header) +//                           util_strlen(current_params.kernel_cmdline) +//                           3) >> 2;//        util_strcpy(params->u.cmdline.cmdline, current_params.kernel_cmdline);//        util_printf("\nCommand line overrides = %s\n",//                    params->u.cmdline.cmdline);//        params = tag_next(params);//    }//    params->hdr.tag = ATAG_NONE;//    params->hdr.size = 0;    // Next, jump to it...#if defined(OMAP1510)    // Note we set r0=0 and r1=171 on entry to kernel.     (*((KERN_SIG)(comp_info[c_KERNEL].fheader.entry_addr)))(0,171);#elif defined(DM310)    // Invalidate the DM310 instruction cache    invalidate_cache();    // Note we set r0=0 and r1=172 on entry to kernel.     (*((KERN_SIG)(comp_info[c_KERNEL].fheader.entry_addr)))(0,172);/*#elif defined(DM270)     // Note r0 and r1 values don't matter on entry.    (*((KERN_SIG)(comp_info[c_KERNEL].fheader.entry_addr)))(0,621);*/#else     (*((KERN_SIG)(comp_info[c_KERNEL].fheader.entry_addr)))(0,0);#endif    }}/****************************** Routine: Description:   Note: See btldr_pi.h for description. ******************************/void erase_comp(comp_t c){  flash_erase_range((comp_flash_info[c].START_OFFSET)+BSPCONF_FLASH_BASE,                    (comp_flash_info[c].END_OFFSET)+BSPCONF_FLASH_BASE);  comp_info[c].is_FLASH_resident = FALSE;}/****************************** Routine: Description:   Note: See btldr_pi.h for description. ******************************/void lock_flash(void){  FlashLockMode = 0x00000000;}/****************************** Routine: Description:   Note: See btldr_pi.h for description. ******************************/void unlock_flash(void){  // Place a special pattern in a special  // memory location. The idea here is that  // stray program code running amock from  // the kernel or a kernel driver that happens  // to run itself into the flash logic of  // bootloader (still left over in memory)  // will not succeed in corrupting flash  // since the low level routines will test  // for this special pattern before modifying  // any flash contents. In normal bootloader  // operation the flash will remain unlocked  // and then locked whenever it transfers  // control to another program (e.g. the kernel)  FlashLockMode = 0xBEEFFEED;}

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
天天综合天天做天天综合| 久久麻豆一区二区| 日产国产高清一区二区三区| 56国语精品自产拍在线观看| 麻豆精品一区二区综合av| 欧美成人激情免费网| 国产乱人伦偷精品视频免下载| 久久综合狠狠综合| 国产成人超碰人人澡人人澡| √…a在线天堂一区| 欧美色爱综合网| 精彩视频一区二区三区| 久久久99免费| 色婷婷综合视频在线观看| 五月婷婷激情综合网| 日韩免费视频一区二区| 成人免费高清在线观看| 亚洲黄色av一区| 日韩视频永久免费| 成人高清免费观看| 亚洲成a人片在线不卡一二三区| 日韩一二三四区| 国产成人精品免费看| 一区二区激情视频| 精品入口麻豆88视频| 91在线porny国产在线看| 日韩福利电影在线| 日本一区二区三区在线观看| 欧美视频精品在线| 国产风韵犹存在线视精品| 一区二区三区av电影| 久久天堂av综合合色蜜桃网| 一本到三区不卡视频| 精品一区二区三区影院在线午夜| 亚洲欧洲在线观看av| 欧美精品第1页| 波多野结衣一区二区三区| 午夜电影网一区| 中文字幕亚洲视频| 欧美成人三级电影在线| 在线观看视频一区二区| 激情综合色播五月| 亚洲国产另类av| 国产精品久久久久久久久免费丝袜| 欧美日韩精品一区二区三区蜜桃 | 午夜av区久久| 亚洲国产高清在线观看视频| 欧美一区二区三区视频| av一本久道久久综合久久鬼色| www.在线欧美| 日欧美一区二区| 亚洲欧洲综合另类在线| 国产欧美精品区一区二区三区| 91精品国产一区二区三区| 欧美又粗又大又爽| 不卡欧美aaaaa| 国产精品资源站在线| 蜜桃av一区二区| 三级欧美韩日大片在线看| 亚洲乱码国产乱码精品精可以看| 国产拍揄自揄精品视频麻豆| 欧美成人在线直播| 日韩一二三四区| 日韩一卡二卡三卡四卡| 欧美浪妇xxxx高跟鞋交| 在线观看视频一区| 在线亚洲一区二区| 97超碰欧美中文字幕| 成人av网址在线观看| 成人午夜在线播放| 国产91精品入口| 国产成人精品三级| 成人在线视频首页| 成人性生交大合| 处破女av一区二区| 不卡的av中国片| 不卡视频免费播放| 色偷偷一区二区三区| 欧美性高清videossexo| 欧美视频一区二区三区在线观看| 欧美系列在线观看| 欧美精品一二三四| 8v天堂国产在线一区二区| 欧美一区二区三区视频在线观看| 91精品国产综合久久精品麻豆| 在线播放日韩导航| 欧美老女人在线| 日韩欧美亚洲国产另类| 久久综合999| 国产日韩精品一区二区三区| 中文在线资源观看网站视频免费不卡| 国产欧美一区二区精品性色超碰| 国产色综合久久| 亚洲欧洲日本在线| 亚洲一区在线观看免费观看电影高清| 亚洲高清中文字幕| 久久精品国产99国产精品| 国产一区二区久久| 91香蕉视频污在线| 欧美精品v日韩精品v韩国精品v| 欧美一区二区三区思思人| 精品国产欧美一区二区| 欧美国产成人精品| 亚洲一级二级三级在线免费观看| 日韩精品久久理论片| 国产精品1区二区.| 蜜乳av一区二区三区| 国产精品一区二区三区四区| 一区二区三区在线看| 日韩精品福利网| 国产一区二区三区在线观看免费视频 | 伊人开心综合网| 人禽交欧美网站| 懂色av噜噜一区二区三区av| 色婷婷综合久久久久中文| 欧美一区二区三区啪啪| 精品久久国产字幕高潮| 国产精品久久久久天堂| 视频一区中文字幕国产| 国产福利视频一区二区三区| 91久久线看在观草草青青| 日韩午夜小视频| 亚洲欧美色一区| 奇米888四色在线精品| 99久久婷婷国产| 精品三级在线观看| 一区二区免费看| 国产成人综合网站| 制服丝袜中文字幕一区| 国产精品灌醉下药二区| 精品综合免费视频观看| 91丨九色porny丨蝌蚪| 337p亚洲精品色噜噜| 中文字幕一区二区三区不卡| 久久不见久久见免费视频1| 91黄色小视频| 国产精品视频免费看| 黑人巨大精品欧美黑白配亚洲| 欧美在线制服丝袜| 国产精品青草综合久久久久99| 美女视频一区二区| 91精品91久久久中77777| 久久久久久免费毛片精品| 五月激情综合色| av电影在线观看一区| 久久毛片高清国产| 欧美aa在线视频| 欧美日韩中文字幕一区二区| 国产精品久久久久久久午夜片| 国产美女在线精品| 日韩美女视频在线| 日一区二区三区| 欧美四级电影网| 亚洲六月丁香色婷婷综合久久| 国产丶欧美丶日本不卡视频| 欧美一区二区三区色| 午夜欧美一区二区三区在线播放| 色综合久久中文字幕| 亚洲三级视频在线观看| 99国产麻豆精品| 18欧美亚洲精品| 99久久精品情趣| 中文字幕在线观看不卡视频| 国产一区二区调教| 久久综合狠狠综合久久激情| 激情五月激情综合网| 精品久久久久久无| 久久电影网站中文字幕| 欧美xxxx在线观看| 九一久久久久久| 久久久精品国产免费观看同学| 国产精品一区二区在线看| 久久九九全国免费| 成人免费高清在线观看| 国产精品视频在线看| 成人av在线播放网站| 亚洲人成精品久久久久| 色噜噜久久综合| 亚欧色一区w666天堂| 日韩欧美综合在线| 韩国成人精品a∨在线观看| 久久综合九色综合97婷婷| 国产乱子伦视频一区二区三区 | 久久免费视频色| 岛国一区二区三区| 亚洲丝袜自拍清纯另类| 欧美在线观看一二区| 日韩经典中文字幕一区| 欧美日韩久久一区二区| 久久福利资源站| 国产精品免费久久| 色婷婷久久久综合中文字幕| 日韩精品视频网站| 国产亚洲精品超碰| 色综合久久久网| 久久精品噜噜噜成人av农村| 国产女人水真多18毛片18精品视频| 不卡的av在线| 亚洲主播在线播放| 欧美成人精品福利|