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

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

?? btldr_pi.c127

?? 針對德州儀器DM270開發板的bootloader,其實現了內核的下載以及文件系統的下載
?? C127
?? 第 1 頁 / 共 4 頁
字號:
        // 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;  }    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) {

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
国产伦精品一区二区三区视频青涩| 欧美日韩亚洲综合在线 欧美亚洲特黄一级| 粉嫩av一区二区三区在线播放| 91极品美女在线| 久久免费的精品国产v∧| 亚洲成av人片在线| 一本色道亚洲精品aⅴ| 国产亚洲欧美中文| 麻豆极品一区二区三区| 7777精品伊人久久久大香线蕉完整版| 欧美国产精品中文字幕| 久久99热99| 91麻豆精品国产自产在线| 亚洲欧美视频在线观看视频| 国产成人精品综合在线观看| 精品福利一区二区三区免费视频| 午夜久久久久久久久| 一本久道中文字幕精品亚洲嫩| 亚洲国产精品t66y| 精品无人码麻豆乱码1区2区| 欧美日韩国产另类一区| 亚洲精品成人悠悠色影视| 成人av一区二区三区| 国产人成一区二区三区影院| 久久99国产精品免费网站| 欧美日本在线观看| 亚洲午夜免费电影| jlzzjlzz亚洲女人18| 国产欧美精品一区| 国产999精品久久久久久| 久久影院午夜论| 国产一区二区三区综合| 久久亚洲免费视频| 国产高清亚洲一区| 欧美精彩视频一区二区三区| 成+人+亚洲+综合天堂| 国产欧美日韩在线| 菠萝蜜视频在线观看一区| 国产精品丝袜久久久久久app| 国产91精品入口| 国产精品高潮呻吟| 91免费看片在线观看| 一区二区三区日韩| 欧美精品久久久久久久多人混战| 调教+趴+乳夹+国产+精品| 91麻豆精品国产自产在线观看一区| 日韩电影网1区2区| 久久伊人中文字幕| 色综合一个色综合| 奇米精品一区二区三区四区| 久久午夜电影网| av一区二区久久| 亚洲在线观看免费视频| 日韩你懂的在线观看| 国产成人h网站| 亚洲精品高清在线观看| 精品视频一区二区不卡| 久久精品国产99国产精品| 久久久久久久国产精品影院| 成人天堂资源www在线| 一区二区三区美女视频| 欧美高清你懂得| 极品少妇一区二区| 中国色在线观看另类| 欧美日韩综合不卡| 国产美女主播视频一区| 夜夜嗨av一区二区三区中文字幕| 日韩一级完整毛片| 99久久精品一区二区| 日本亚洲最大的色成网站www| 久久婷婷国产综合精品青草| 97国产一区二区| 奇米精品一区二区三区在线观看| 中文字幕av不卡| 在线综合+亚洲+欧美中文字幕| 丁香六月综合激情| 亚洲成av人片在线| 国产精品免费av| 日韩精品中文字幕一区二区三区| 高清国产一区二区| 天天av天天翘天天综合网| 久久精品一区二区三区不卡牛牛 | 欧美日韩免费电影| 国产美女视频一区| 一区二区三区中文免费| 26uuu精品一区二区| 91精品福利视频| 国产成人精品免费| 美女一区二区久久| 亚洲亚洲人成综合网络| 国产精品欧美极品| 欧美大片顶级少妇| 91精品国产高清一区二区三区 | 日韩一区二区免费电影| 色综合久久六月婷婷中文字幕| 国内精品免费**视频| 亚洲国产精品影院| 国产精品不卡一区二区三区| 久久综合国产精品| 欧美大片拔萝卜| 91精品国产综合久久小美女| 色综合中文综合网| 国产综合色产在线精品| 日韩中文欧美在线| 亚洲一区二区三区爽爽爽爽爽 | 亚洲国产成人91porn| 中文字幕亚洲欧美在线不卡| 久久久精品国产免大香伊| 日韩欧美视频在线| 日韩精品在线一区二区| 欧美电影在线免费观看| 欧美色图激情小说| 欧美综合在线视频| 日本大香伊一区二区三区| 99国产欧美久久久精品| av电影在线不卡| 93久久精品日日躁夜夜躁欧美| 成人性生交大片免费| 国产风韵犹存在线视精品| 国产黑丝在线一区二区三区| 国产成人综合亚洲91猫咪| 成人久久视频在线观看| 91亚洲永久精品| 色天使色偷偷av一区二区| 欧美色中文字幕| 欧美一区二区三区在线| 欧美第一区第二区| 国产视频一区在线观看| 中文字幕佐山爱一区二区免费| 亚洲人成精品久久久久| 一区二区三区在线免费| 一区二区欧美国产| 免费观看一级特黄欧美大片| 国产乱码字幕精品高清av | 国产乱码精品一品二品| 国产黄色精品网站| 日本韩国欧美在线| 666欧美在线视频| 精品电影一区二区三区| 国产清纯在线一区二区www| 亚洲欧洲成人av每日更新| 亚洲成人午夜电影| 国产又粗又猛又爽又黄91精品| 成人黄色网址在线观看| 欧美偷拍一区二区| 久久亚洲欧美国产精品乐播 | 视频一区在线视频| 国产一区二区不卡| 一本色道亚洲精品aⅴ| 日韩一级片网址| 成人欧美一区二区三区在线播放| 午夜国产精品一区| 国产成人啪午夜精品网站男同| 91黄色在线观看| 久久天天做天天爱综合色| 亚洲精品老司机| 国产精品一品视频| 欧美日韩一级二级| 国产精品丝袜在线| 久久 天天综合| 在线观看91精品国产入口| 精品成人a区在线观看| 亚洲乱码国产乱码精品精98午夜| 久久激五月天综合精品| 日本韩国精品一区二区在线观看| 欧美一激情一区二区三区| 国产精品免费视频网站| 久久精品国产久精国产爱| 色激情天天射综合网| 久久午夜羞羞影院免费观看| 五月婷婷综合网| 91亚洲国产成人精品一区二三| 日韩一区二区中文字幕| 亚洲免费观看高清完整版在线观看熊| 久久www免费人成看片高清| 欧美日韩国产美| 亚洲精品你懂的| 成人av免费观看| 欧美国产国产综合| 九九热在线视频观看这里只有精品| 欧美亚洲高清一区| 亚洲视频在线一区| 99精品国产91久久久久久| 国产欧美一二三区| 国产乱码精品一品二品| 欧美一区二区三区色| 午夜精品影院在线观看| 91福利在线导航| 亚洲另类中文字| 91丨porny丨户外露出| 中文字幕欧美三区| 成人综合在线网站| 日本一二三四高清不卡| 国产一区91精品张津瑜| 久久婷婷一区二区三区| 国产美女精品在线| 国产欧美日韩亚州综合| 国产a精品视频| 中文字幕亚洲区| 91丨porny丨国产入口|