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

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

?? btldr_pi.c~

?? 針對德州儀器DM270開發板的bootloader,其實現了內核的下載以及文件系統的下載
?? C~
?? 第 1 頁 / 共 4 頁
字號:
#define DCSR_ERROR  0x3#define DCCR_EN     (1 << 7)#define DFIFO_FLUSH (1 << 10)#define DEND_PROG   (1 << 11)#define DSYNC_SET   (1 << 6)#define DREPEAT     (1 << 9)#define DFRAME      (1 << 3)static void dma_flash_read(unsigned int offset_orig,  // Of flash.                           unsigned int dest_orig, // Destination buffer                           unsigned int num_bytes){        volatile dma_regs_t *regs = (dma_regs_t *)0xfffed800;    // channel 0        unsigned int remaining = num_bytes;        unsigned int offset = offset_orig;        unsigned int dest = dest_orig;        int error_count = 0;        // one-time setup:        regs->cicr = 0x2b;              // Show status on Block or Frame done, or on errors (timeout, drop)        regs->ccr = ((1 << 14) |        // source,destn auto increment, high priority, flush                     (1 << 12) |                     (1 << 10) |                     (1 << 6));        regs->csdp = ((3 << 14) |       // source EMIFS, destn EMIFF, burst 8 if possible, s32 bit transfers                      (3 << 7) |                      (1 << 2) |                      2);        regs->cfn = 1;        regs->cfi = 0;        regs->cei = 0;                        // Per-transfer setup:        while (remaining) {                int num_transferred;                int status;                // Arbitrary transfer size of 4000 elements (= 16K bytes)                if (error_count == 0) {                        if (remaining > 0x4000) {                                remaining -= 0x4000;                                num_transferred = 0x1000;                        }                        else {                                num_transferred = remaining;                                remaining = 0;                                regs->csdp &= ~0x3;    // switch to byte transfers for last packet                        }                }                               // Setup transfer                regs->cssa_l = offset;                regs->cssa_u = offset >> 16;                regs->cdsa_l = dest;                regs->cdsa_u = dest >> 16;                regs->cen = num_transferred;                // Clear status                status = regs->csr;                // Start transfer                regs->ccr |= DCCR_EN;                        // Check transfer status                status = regs->csr;                while ((regs->ccr & DCCR_EN) &&                       ((status & 0xb) == 0)) {                        status = regs->csr;                }#if 0                          if (regs->ccr & DCCR_EN) {                        util_printf("ccr is %X\n", regs->ccr);                        util_printf("status is %X\n", status);                }#endif                if (status & DCSR_ERROR) {                        util_printf("DMA error, status is %X\n", status);                        error_count++;                        util_printf("Retrying DMA count : %d\n", error_count);                }                else {                        error_count = 0;                }                                // Too many errors, go to normal copy.                if (error_count == 10) break;                // Go to next buffer                if (error_count == 0) {                        offset += num_transferred * 4;                        dest += num_transferred * 4;                }        }#if 0        // Data check.  Very slow.        {                unsigned char *source = offset_orig;                unsigned char *destn = dest_orig;                unsigned int count = 0;                for (remaining = 0; remaining < num_bytes; remaining++) {                        if (*source != *destn) {                                util_printf("source : 0x%x, source value : 0x%x\n", source, *source);                                util_printf("destn : 0x%x, destn value : 0x%x\n", destn, *destn);                                count++;                        }                        source++;                        destn++;                        while (count == 10);                }        }#endif        // DMA didn't work, try slow copy        if (error_count) {                util_printf("DMA copy had errors, trying slow copy\n");                flash_read(offset_orig,                           (unsigned short *)dest_orig,                           num_bytes,                           put_val_at_addr_2);                        }}// endif   OMAP1510// Any other platforms can use this Psuedo dma (it's faster than a byte copy).#elsestatic void dma_flash_read(unsigned int offset, // Of flash.                           unsigned int dest,   // Destination buffer                           unsigned int num_bytes){    //util_printf("\nin psuedo dma copy\n");    //util_printf("%X %X %X\n", offset, dest, num_bytes);    offset += BSPCONF_FLASH_BASE;    if ((offset & 3) || (dest & 3))    {        flash_read(offset, (unsigned short *)dest, num_bytes, NULL);                        return;    }    if (num_bytes >= 24)    {        // Note:        // Our objective below is to copy a chunk of bytes from a source        // memory address to a new destination location. We'll be moving        // 24 bytes at at time.        // first set reg r1 == destination memory address,        // next  set reg r2 == source memory address,        // then  set reg r12 == num bytes to move,        // lastly drop into a loop which copies 24 bytes at a time until        // all bytes are copied. This will take advantage of the        // "ldmia r2!,{r3-r8)" style assembly instruction which loads        // in one fell swoop the six registers (r3-r8) with a total of        // 24 continguous bytes read from the memory address reflected        // by register r2 (and r2 is then automatically incremented by 24).        // Now that the data registers are loaded, we can perform a        // "stmia r1!,{r3-r8}" style instruction to move all 24        // continuous bytes to the destination memory location reflected        // by register r1 (and r1 is then automatically incremented by 24).        // Finally, subtract our byte count by 24 and see if another pass        // through the loop is needed. (I stepped through the code with        // a debugger and that is how I know *all* the participating        // registers used by the compiler for the algorithm below).        num_bytes -= 24;        asm volatile ("loop: \                    \n ldmia   %0!,{r3 - r8} \                    \n stmia   %1!,{r3 - r8} \                    \n subs    %2, %2, #24 \                    \n bge     loop"                     : "+r" (offset), "+r" (dest), "+r" (num_bytes)                     : "r" (offset), "r" (dest), "r" (num_bytes)                     : "cc","r3","r4","r5","r6","r7","r8");    }    num_bytes +=24;    if (num_bytes)    {        unsigned char *p1,*p2;        p1 = (unsigned char *) offset;        p2 = (unsigned char *) dest;        while (num_bytes)        {            *p2++ = *p1++;            num_bytes--;        }    }}#endif/****************************** Routine: Description: ******************************/static void pull_from_flash(comp_t comp){  MAGIC_t magicn;  char *image_start_in_flash;  switch (comp) {    case 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) {        flash_read(comp_flash_info[comp].START_OFFSET + sizeof(MAGIC_t),                   (unsigned short *) &current_params,                   sizeof(current_params),                   NULL);#if defined(DSC24_OSD)        if (0 == util_strncmp("yes",current_params.OSD_enable,util_strlen("yes")))        {            unsigned char *optr;            flash_read(comp_flash_info[comp].START_OFFSET + sizeof(MAGIC_t) + sizeof(current_params),                       (unsigned short *) &(comp_info[comp].fheader),                       sizeof(FHEADER_t),                       NULL);            if (io_AddressIsInFlashSpace(comp_info[comp].fheader.load_addr)) {              // This component is intended to be used in-place. It              // has a load_addr that is in flash space which means              // that when the user originally "loaded" this component              // the srec or rrbin or ?? image indicated that it was to              // load into flash space. In this case there is no need              // to move it to SDRAM before using it.               return;            }            optr = (unsigned char *) comp_info[comp].fheader.load_addr;            osd_init();#if 1 //defined(DSC21) || defined(DSC24) || defined(DSC25) || defined(DM270) || defined(DM310) || defined(OMAP1510)            dma_flash_read(comp_flash_info[comp].START_OFFSET +			     sizeof(MAGIC_t) + sizeof(current_params) +			     sizeof(FHEADER_t),			   comp_info[comp].fheader.load_addr,			   comp_info[comp].fheader.num_bytes);        #else            flash_read(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,		       put_val_at_addr_2);#endif            osd_init_mem(*(optr + 8));            osd_load_logo((unsigned char *)(optr + 8),  // Start of data                           *((int *)(optr + 4)),        // Vertical size of logo                           *((int *) optr));            // Horizontal size            osd_display();        }#endif        comp_info[comp].is_SDRAM_resident = TRUE;      }      break;    case c_KERNEL:    case 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) {        flash_read(comp_flash_info[comp].START_OFFSET + sizeof(MAGIC_t),                   (unsigned short *) &(comp_info[comp].fheader),                   sizeof(FHEADER_t),                   NULL);        if (io_AddressIsInFlashSpace(comp_info[comp].fheader.load_addr)) {          // This component is intended to be used in-place. It          // has a load_addr that is in flash space which means          // that when the user originally "loaded" this component          // the srec or rrbin or ?? image indicated that it was to          // load into flash space. In this case there is no need          // to move it to SDRAM before using it.           return;        }	// Either a straight copy of a decompress and copy is required.	image_start_in_flash = (char *)comp_flash_info[comp].START_OFFSET +	                       BSPCONF_FLASH_BASE +	                       sizeof(MAGIC_t) + sizeof(FHEADER_t);#if ( BSPCONF_KERNEL_COMPRESSED == 1 ) ||  ( BSPCONF_FS_COMPRESSED == 1 )	if (image_is_compressed(image_start_in_flash)) {	  (void)decompress_comp((char *)comp_info[comp].fheader.load_addr,				free_memory_start,				free_memory_size,				image_start_in_flash,				comp_info[comp].fheader.num_bytes);	}	else#endif	  {        // Next, move the image to SDRAM as per the        // value of load_addr recorded with the image.#if 1 //defined(DSC21) || defined(DSC24) || defined(DSC25) || defined(DM270) || defined(DM310) || defined(OMAP1510)	  dma_flash_read(comp_flash_info[comp].START_OFFSET + 			 sizeof(MAGIC_t) + sizeof(FHEADER_t),			 comp_info[comp].fheader.load_addr,			 comp_info[comp].fheader.num_bytes);        #else	  flash_read(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,		     put_val_at_addr_2);#endif	  comp_info[comp].is_SDRAM_resident = TRUE;        // util_printf("retrieved -- load_addr 0x%X, entry_addr 0x%X, num_bytes 0x%X\n",        //             comp_info[comp].fheader.load_addr,        //             comp_info[comp].fheader.entry_addr,        //             comp_info[comp].fheader.num_bytes); // *debug* temp.	}      }      break;    case c_BOOTLDR:      // Pull this to SDRAM, why? Ignore this request since      // for the bootldr the very act of doing so would pull      // bytes down on top of the very program running now,      // presumably at that same SDRAM location. So, for this      // particular implementation of the btldr_pi.h      // programmer's interface, we will not support this type      // of flash -> SDRAM copy request.#ifdef REPLACE_VECTOR_TABLE    case c_VECTORS:#endif      break;    default:      SYSTEM_FATAL("Logic Error");      break;  }}/****************************** Routine: Description: ******************************/static int flash_area_has_content(comp_t comp){  unsigned short test_word;    return FALSE; // *debug* temp  // A Quick-and-Dirty test to see if the area of flash  // that normally holds component "comp" is already occupied  // with content.  switch (comp) {    case c_BOOTLDR:    case c_PARAMS:    case c_KERNEL:    case c_FILESYS:#ifdef REPLACE_VECTOR_TABLE    case c_VECTORS:#endif      // good it's one we recognize.      break;    default:      // what?, just return.     return TRUE;     break;  }  flash_read(comp_flash_info[comp].START_OFFSET,             (unsigned short *)&test_word,             sizeof(unsigned short),             NULL);  if (0xFFFF == test_word) {    // no content, this area of flash appears to be empty (erased).    return FALSE;  }  else {    // content found.     return TRUE;  }}/****************************** Routine: Description: returns non-zero if flash write error occurred ******************************/static int push_to_flash(comp_t comp){  int status;  int ret = 0;    if (TRUE == flash_area_has_content(comp)) {    util_printf("Warning: Can't overwrite existing one; Aborting\n");    util_printf("Press <Enter>....\n");    util_gets(cmd,CMDMAX);    return 0;  }  

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
午夜一区二区三区在线观看| 国产精品美女久久久久久久久久久 | 欧美国产乱子伦| 国产呦精品一区二区三区网站| 精品人在线二区三区| 美女尤物国产一区| 久久久亚洲国产美女国产盗摄| 成人伦理片在线| 亚洲欧美日韩国产一区二区三区| 色综合视频一区二区三区高清| 亚洲综合成人在线视频| 欧美精三区欧美精三区| 久久国产精品色| 国产午夜亚洲精品羞羞网站| 97久久超碰国产精品| 亚洲高清不卡在线| 久久综合九色综合欧美98| 高清久久久久久| 夜夜精品视频一区二区| 欧美一区二区在线视频| 粉嫩欧美一区二区三区高清影视| 1024成人网| 欧美一级欧美三级| 成人永久看片免费视频天堂| 亚洲国产欧美在线人成| 亚洲精品一区二区三区精华液| 成人午夜看片网址| 亚洲成人av一区二区三区| 日韩欧美国产精品| 色噜噜偷拍精品综合在线| 老司机午夜精品| 亚洲男人电影天堂| 日韩三级伦理片妻子的秘密按摩| 国产成人综合亚洲91猫咪| 亚洲国产精品一区二区尤物区| 精品国产乱码久久久久久牛牛| 91麻豆123| 狠狠色丁香久久婷婷综合丁香| 亚洲视频一区二区免费在线观看| 91精品国产丝袜白色高跟鞋| 国产91丝袜在线观看| 午夜激情久久久| 国产三级精品在线| 91精品国产色综合久久| 91麻豆国产精品久久| 国产一区二区三区电影在线观看 | 另类小说综合欧美亚洲| 久久激情五月婷婷| 亚洲久草在线视频| 国产午夜精品久久久久久免费视 | 国产mv日韩mv欧美| 亚洲国产欧美在线| 日韩理论片网站| 精品国产乱码久久久久久1区2区| 欧美中文字幕一二三区视频| 成人激情黄色小说| 国产一区美女在线| 青青草国产精品97视觉盛宴| 亚洲一区二区三区视频在线播放 | 亚洲图片欧美激情| 日本一区二区三区在线不卡| 精品久久久久av影院| 91精品欧美一区二区三区综合在| 91蜜桃传媒精品久久久一区二区 | 成人国产亚洲欧美成人综合网| 免费人成黄页网站在线一区二区 | 同产精品九九九| 亚洲免费色视频| 国产精品美女久久久久久2018 | 亚州成人在线电影| 亚洲人亚洲人成电影网站色| 欧美国产日韩精品免费观看| 国产日韩亚洲欧美综合| 久久女同性恋中文字幕| 欧美精品一区二区不卡| 日韩午夜av电影| 欧美成人官网二区| 欧美第一区第二区| 日韩视频一区在线观看| 日韩精品中文字幕在线不卡尤物 | 日韩欧美国产午夜精品| 欧美一级理论片| 亚洲综合色成人| 亚洲欧美偷拍卡通变态| 日韩毛片视频在线看| 一区二区三区四区在线播放 | 亚洲国产色一区| 亚洲国产毛片aaaaa无费看| 亚洲aⅴ怡春院| 免费在线观看一区二区三区| 韩国三级电影一区二区| 国产成人精品亚洲777人妖 | 亚洲精品va在线观看| 亚洲最新视频在线播放| 婷婷亚洲久悠悠色悠在线播放| 五月激情丁香一区二区三区| 奇米色777欧美一区二区| 国产综合久久久久久鬼色| 国产成人精品一区二| 色又黄又爽网站www久久| 欧美性一区二区| 91精品在线免费| 久久色成人在线| **性色生活片久久毛片| 亚洲国产精品久久久久秋霞影院| 免费成人你懂的| 成人激情免费电影网址| 欧美亚日韩国产aⅴ精品中极品| 日韩色视频在线观看| 欧美精彩视频一区二区三区| 一区二区三区欧美在线观看| 秋霞国产午夜精品免费视频| 春色校园综合激情亚洲| 欧美丝袜第三区| 久久精品亚洲乱码伦伦中文| 亚洲欧美区自拍先锋| 青青草视频一区| 99久久精品一区| 日韩午夜电影av| 亚洲图片你懂的| 精品一区二区免费看| 不卡的看片网站| 欧美一区二区三区免费在线看 | 国产精品国产三级国产有无不卡 | 中文字幕+乱码+中文字幕一区| 中文字幕日韩一区| 免费精品视频最新在线| 一道本成人在线| xnxx国产精品| 亚洲午夜精品17c| 成人免费毛片高清视频| 91精品国产综合久久蜜臀| 中文字幕中文字幕一区二区| 久久 天天综合| 欧美最猛性xxxxx直播| 国产人成亚洲第一网站在线播放| 亚洲愉拍自拍另类高清精品| 成人免费黄色大片| 欧美电影免费观看高清完整版在线| 亚洲女与黑人做爰| 国产不卡视频一区二区三区| 日韩欧美精品在线视频| 亚洲国产成人tv| 91原创在线视频| 日本一区二区三区dvd视频在线| www.在线成人| 久久久久9999亚洲精品| 丝袜美腿成人在线| 欧美在线一二三四区| 国产精品乱人伦一区二区| 精品亚洲成av人在线观看| 91精品麻豆日日躁夜夜躁| 亚洲乱码国产乱码精品精小说| 成人午夜在线免费| 久久久99久久| 国产一区二区不卡老阿姨| 日韩一区二区三区免费看| 天天综合网天天综合色| 欧美少妇bbb| 一区二区三区免费| 色综合咪咪久久| 中文字幕在线不卡| 成人免费毛片片v| 国产精品久久久久久久久晋中| 国产激情偷乱视频一区二区三区| 久久久亚洲精品石原莉奈| 精品一区二区久久久| 久久综合九色综合欧美98| 久久99精品国产| 久久蜜桃一区二区| 国产福利一区二区| 国产精品网曝门| 91视频在线观看| 一二三区精品视频| 欧美视频在线播放| 日韩成人一级大片| 欧美一二三区在线观看| 美美哒免费高清在线观看视频一区二区| 91精品综合久久久久久| 麻豆免费看一区二区三区| 亚洲精品在线观| 成人一区二区视频| 亚洲男人的天堂网| 欧美日韩国产精品成人| 蜜臀精品一区二区三区在线观看| 久久综合给合久久狠狠狠97色69| 国产精品主播直播| 中文字幕在线不卡视频| 欧美综合一区二区三区| 免费高清不卡av| 日本一区二区三区电影| 在线欧美一区二区| 琪琪久久久久日韩精品| 精品欧美一区二区在线观看| 国产盗摄精品一区二区三区在线| 亚洲男人都懂的| 日韩欧美国产成人一区二区| 成人97人人超碰人人99| 亚洲第一搞黄网站| 久久九九99视频|