• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

C++ icache_disable函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了C++中icache_disable函数的典型用法代码示例。如果您正苦于以下问题:C++ icache_disable函数的具体用法?C++ icache_disable怎么用?C++ icache_disable使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。



在下文中一共展示了icache_disable函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。

示例1: do_bootm_linux

static int do_bootm_linux(struct image_data *idata)
{
	int (*appl)(char *cmdline);
	const char *cmdline = linux_bootargs_get();
	char *cmdlinedest = (char *) CMD_LINE_ADDR;
	int ret;

	ret = bootm_load_os(idata, idata->os_address);
	if (ret)
		return ret;

	appl = (void *)(idata->os_address + idata->os_entry);
	printf("Starting Kernel at 0x%p\n", appl);

	if (idata->dryrun)
		return 0;

	icache_disable();

	strncpy(cmdlinedest, cmdline, 0x1000);
	cmdlinedest[0xfff] = 0;

	*(volatile unsigned long *) IMASK = 0x1f;

	(*appl)(cmdlinedest);

	return -1;
}
开发者ID:MinimumLaw,项目名称:ravion-barebox,代码行数:28,代码来源:blackfin_linux.c


示例2: do_icache

int do_icache ( cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
{
	switch (argc) {
	case 2:			/* on / off	*/
		switch (on_off(argv[1])) {
#if 0	/* prevented by varargs handling; FALLTROUGH is harmless, too */
		default: printf ("Usage:\n%s\n", cmdtp->usage);
			return;
#endif
		case 0:	icache_disable();
			break;
		case 1:	icache_enable ();
			break;
		}
		/* FALL TROUGH */
	case 1:			/* get status */
		printf ("Instruction Cache is %s\n",
			icache_status() ? "ON" : "OFF");
		return 0;
	default:
		printf ("Usage:\n%s\n", cmdtp->usage);
		return 1;
	}
	return 0;
}
开发者ID:8devices,项目名称:Caraboot,代码行数:25,代码来源:cmd_cache.c


示例3: cleanup_before_linux

int cleanup_before_linux (void)
{
	/*
	 * this function is called just before we call linux
	 * it prepares the processor for linux
	 *
	 * we turn off caches etc ...
	 */

	disable_interrupts ();

	/*
	 * this function is called just before we call linux
	 * it prepares the processor for linux
	 */
#ifdef CONFIG_BOARD_CLEANUP_BEFORE_LINUX
	board_cleanup_before_linux();
#endif

	/* turn off I/D-cache */
	icache_disable();
	dcache_disable();
	/* flush I/D-cache */
	cache_flush();

	return 0;
}
开发者ID:digidotcom,项目名称:yocto-uboot,代码行数:27,代码来源:cpu.c


示例4: cleanup_before_linux

int cleanup_before_linux(void)
{
	unsigned int i;

	/*
	 * this function is called just before we call linux
	 * it prepares the processor for linux
	 *
	 * we turn off caches etc ...
	 */
	disable_interrupts();

	/* turn off I/D-cache */
	icache_disable();
	dcache_disable();

	/* invalidate I-cache */
	cache_flush();

#ifndef CONFIG_L2_OFF
	/* turn off L2 cache */
	l2_cache_disable();
	/* invalidate L2 cache also */
	v7_flush_dcache_all(get_device_type());
#endif
	i = 0;
	/* mem barrier to sync up things */
	asm("mcr p15, 0, %0, c7, c10, 4": :"r"(i));

#ifndef CONFIG_L2_OFF
	l2_cache_enable();
#endif

	return 0;
}
开发者ID:GlobalscaleTechnologiesInc,项目名称:D3-Firmware,代码行数:35,代码来源:cpu.c


示例5: sunxi_flush_allcaches

/*
************************************************************************************************************
*
*                                             function
*
*    name          :
*
*    parmeters     :
*
*    return        :
*
*    note          :
*
*
************************************************************************************************************
*/
void sunxi_flush_allcaches(void)
{
	icache_disable();

	flush_dcache_all();
	dcache_disable();
}
开发者ID:Ronchou,项目名称:OrangePI-Kernel,代码行数:23,代码来源:board_common.c


示例6: board_init

int
/**********************************************************/
board_init (void)
/**********************************************************/
{
	/* We have RAM, disable cache */
	dcache_disable();
	icache_disable();

	led_code (0xf, YELLOW);

	/* arch number of HHP Cradle */
	gd->bd->bi_arch_number = MACH_TYPE_HHP_CRADLE;

	/* adress of boot parameters */
	gd->bd->bi_boot_params = 0xa0000100;

	/* Init SIOs to enable SCC2 */
	udelay (100000);		/* delay makes it look neat */
	init_sio (0, CRADLE_SIO1_PHYS);
	udelay (100000);
	init_sio (1, CRADLE_SIO2_PHYS);
	udelay (100000);
	init_sio (2, CRADLE_SIO3_PHYS);
	udelay (100000);
	set_led (3, GREEN);

	return 1;
}
开发者ID:54shady,项目名称:uboot_tiny4412,代码行数:29,代码来源:cradle.c


示例7: cleanup_before_linux

int cleanup_before_linux (void)
{
	/*
	 * this function is called just before we call linux
	 * it prepares the processor for linux
	 *
	 * we turn off caches etc ...
	 * and we set the CPU-speed to 73 MHz - see start.S for details
	 */

#if defined(CONFIG_IMPA7) || defined(CONFIG_EP7312) || defined(CONFIG_ARMADILLO)
	disable_interrupts ();

	/* turn off I-cache */
	icache_disable();
	dcache_disable();

	/* flush I-cache */
	cache_flush();
#ifdef CONFIG_ARM7_REVD
	/* go to high speed */
	IO_SYSCON3 = (IO_SYSCON3 & ~CLKCTL) | CLKCTL_73;
#endif
#elif defined(CONFIG_NETARM) || defined(CONFIG_S3C4510B) || defined(CONFIG_LPC2292)
	disable_interrupts ();
	/* Nothing more needed */
#elif defined(CONFIG_INTEGRATOR) && defined(CONFIG_ARCH_INTEGRATOR)
	/* No cleanup before linux for IntegratorAP/CM720T as yet */
#else
#error No cleanup_before_linux() defined for this CPU type
#endif
	return 0;
}
开发者ID:ClashTheBunny,项目名称:w732_kernel_src,代码行数:33,代码来源:cpu.c


示例8: mach_cleanup

static bool_t mach_cleanup(void)
{
    /* stop timer 0 ~ 4 */
    writel(S5PV210_TCON, 0x0);

    /* stop system timer */
    writel(S5PV210_SYSTIMER_TCON, 0x0);

    /* disable irq */
    irq_disable();

    /* disable fiq */
    fiq_disable();

    /* disable icache */
    icache_disable();

    /* disable dcache */
    dcache_disable();

    /* disable mmu */
    mmu_disable();

    /* disable vic */
    vic_disable();

    return TRUE;
}
开发者ID:qioixiy,项目名称:xboot,代码行数:28,代码来源:mach-mpad.c


示例9: spr_post_test

int spr_post_test (int flags)
{
	int ret = 0;
	int ic = icache_status ();
	int i;

	unsigned long code[] = {
		0x7c6002a6,				/* mfspr r3,SPR */
		0x4e800020				/* blr          */
	};
	unsigned long (*get_spr) (void) = (void *) code;

	if (ic)
		icache_disable ();

	for (i = 0; i < spr_test_list_size; i++) {
		int num = spr_test_list[i].number;

		/* mfspr r3,num */
		code[0] = 0x7c6002a6 | ((num & 0x1F) << 16) | ((num & 0x3E0) << 6);

		if ((get_spr () & spr_test_list[i].mask) !=
			(spr_test_list[i].value & spr_test_list[i].mask)) {
			post_log ("The value of %s special register "
				  "is incorrect: 0x%08X\n",
					spr_test_list[i].name, get_spr ());
			ret = -1;
		}
	}

	if (ic)
		icache_enable ();

	return ret;
}
开发者ID:Medvedroid,项目名称:OT_903D-kernel-2.6.35.7,代码行数:35,代码来源:spr.c


示例10: do_bootldr

int do_bootldr(cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
{
	void *addr;
	uint32_t *data;

	/* Get the address */
	if (argc < 2)
		addr = (void *)load_addr;
	else
		addr = (void *)simple_strtoul(argv[1], NULL, 16);

	/* Check if it is a LDR file */
	data = addr;
#if defined(__ADSPBF54x__) || defined(__ADSPBF52x__)
	if ((*data & 0xFF000000) == 0xAD000000 && data[2] == 0x00000000) {
#else
	if (*data == 0xFF800060 || *data == 0xFF800040 || *data == 0xFF800020) {
#endif
		/* We want to boot from FLASH or SDRAM */
		printf("## Booting ldr image at 0x%p ...\n", addr);

		icache_disable();
		dcache_disable();

		__asm__(
			"jump (%1);"
			:
			: "q7" (addr), "a" (_BOOTROM_MEMBOOT));
	} else
开发者ID:AceecaNZ,项目名称:MEZ1500Rev2dLinuxUboot,代码行数:29,代码来源:cmd_bootldr.c


示例11: cleanup_before_linux

int cleanup_before_linux (void)
{
    /*
     * this function is called just before we call linux
     * it prepares the processor for linux
     *
     * we turn off caches etc ...
     */

    disable_interrupts ();

#ifdef CONFIG_LCD
    {
        extern void lcd_disable(void);
        extern void lcd_panel_disable(void);

        lcd_disable(); /* proper disable of lcd & panel */
        lcd_panel_disable();
    }
#endif

    /* turn off I/D-cache */
    icache_disable();
    dcache_disable();
    /* flush I/D-cache */
    cache_flush();
    /*Workaround to enable L2CC during kernel decompressing*/
#ifdef fixup_before_linux
    fixup_before_linux;
#endif
    return 0;
}
开发者ID:vickylinuxer,项目名称:i.mx25-uboot,代码行数:32,代码来源:cpu.c


示例12: cleanup_before_linux

int cleanup_before_linux(void)
{
	/*
	 * this function is called just before we call linux
	 * it prepares the processor for linux
	 *
	 * disable interrupt and turn off caches etc ...
	 */
	disable_interrupts();

	/*
	 * Turn off I-cache and invalidate it
	 */
	icache_disable();
	invalidate_icache_all();

	/*
	 * turn off D-cache
	 * dcache_disable() in turn flushes the d-cache and disables MMU
	 */
	dcache_disable();
	invalidate_dcache_all();

	return 0;
}
开发者ID:Digilent,项目名称:u-boot-digilent,代码行数:25,代码来源:cpu.c


示例13: cleanup_before_linux

int cleanup_before_linux(void)
{
	unsigned int i;

	/*
	 * this function is called just before we call linux
	 * it prepares the processor for linux
	 *
	 * we turn off caches etc ...
	 */	 
	 
	disable_interrupts();
#ifndef CONFIG_ICACHE_OFF
	/* turn off I/D-cache */
	icache_disable();
	icache_invalid();
	asm("isb");	
#endif
	
#ifndef CONFIG_DCACHE_OFF
	dcache_disable();
	asm("dsb");
#endif
		
//#ifndef CONFIG_ICAHCE_OFF
//	/* invalidate I-cache */
//	cache_flush();
//#else
//#ifndef CONFIG_DCACHE_OFF
//	cache_flush();
//#endif
//#endif

//#ifndef CONFIG_L2_OFF
//	/* turn off L2 cache */
//	l2_cache_disable();
//	/* invalidate L2 cache also */
//	invalidate_l2_cache();
//#endif
#ifndef CONFIG_L2_OFF
	l2_cache_disable();
	l2x0_clean_inv_all();
#endif
	
	i = 0;
	/* mem barrier to sync up things */
	asm("mcr p15, 0, %0, c7, c10, 4": :"r"(i));
	
/*#ifndef CONFIG_L2_OFF
	l2_cache_enable();
#endif
*/
	asm("dsb");
	asm("isb");	
	return 0;
}
开发者ID:InternetBowser,项目名称:plutos,代码行数:56,代码来源:cpu.c


示例14: kgdb_flush_cache_all

void kgdb_flush_cache_all(void)
{
	if (dcache_status()) {
		dcache_disable();
		dcache_enable();
	}
	if (icache_status()) {
		icache_disable();
		icache_enable();
	}
}
开发者ID:0xFelix,项目名称:u-boot-edminiv2,代码行数:11,代码来源:kgdb_stubs.c


示例15: board_init

int board_init (void)
{
    /* We have RAM, disable cache */
    dcache_disable();
    icache_disable();

    gd->bd->bi_arch_number = MACH_TYPE_INNOKOM;
    gd->bd->bi_boot_params = 0xa0000100;
    gd->bd->bi_baudrate = CONFIG_BAUDRATE;

    return 0;
}
开发者ID:zipob,项目名称:OrangePI-Kernel,代码行数:12,代码来源:innokom.c


示例16: cleanup_before_linux

int cleanup_before_linux(void)
{
	/*
	 * this function is called just before we call linux
	 * it prepares the processor for linux
	 *
	 * we turn off caches etc ...
	 */
#ifndef CONFIG_SPL_BUILD
	disable_interrupts();
#ifdef CONFIG_LCD
	{
		/* switch off LCD panel */
		lcd_panel_disable();
		/* disable LCD controller */
		lcd_disable();
	}
#endif /* CONFIG_LCD */
#endif /* CONFIG_SPL_BUILD */

	/*
	 * Turn off I-cache and invalidate it
	 */
	icache_disable();
	invalidate_icache_all();

	/*
	 * turn off D-cache
	 * dcache_disable() in turn flushes the d-cache and disables MMU
	 */
	dcache_disable();
	v7_outer_cache_disable();

	/*
	 * After D-cache is flushed and before it is disabled there may
	 * be some new valid entries brought into the cache. We are sure
	 * that these lines are not dirty and will not affect our execution.
	 * (because unwinding the call-stack and setting a bit in CP15 SCTRL
	 * is all we did during this. We have not pushed anything on to the
	 * stack. Neither have we affected any static data)
	 * So just invalidate the entire d-cache again to avoid coherency
	 * problems for kernel
	 */
	invalidate_dcache_all();

	/*
	 * Some CPU need more cache attention before starting the kernel.
	 */
	cpu_cache_initialization();

	return 0;
}
开发者ID:mbasharat,项目名称:kundogit_android,代码行数:52,代码来源:cpu.c


示例17: do_reset

/*
 * do_reset()
 *
 * Shell command to reset the board.
 */
void do_reset( cmd_tbl_t *cmdtp, int flag, int argc, char *argv[] )
{
	printf( "Resetting...\n" );

	/* Disabe and invalidate cache */
	icache_disable();
	dcache_disable();

	/* Jump to warm start (in RAM) */
	_start_warm();

	/* Should never get here */
	while(1);
}
开发者ID:Admetric,项目名称:android_u-boot_s5pv210,代码行数:19,代码来源:ppmc7xx.c


示例18: cleanup_before_linux

int cleanup_before_linux(void)
{
	unsigned int i;

#ifdef CONFIG_CMD_IMX_DOWNLOAD_MODE
	extern void clear_mfgmode_mem(void);

	clear_mfgmode_mem();
#endif

#ifdef CONFIG_VIDEO_MX5
	ipu_disable_channel(MEM_BG_SYNC);
	ipu_uninit_channel(MEM_BG_SYNC);
#endif

	/*
	 * this function is called just before we call linux
	 * it prepares the processor for linux
	 *
	 * we turn off caches etc ...
	 */
	disable_interrupts();

	/* flush cache */
	cache_flush();

	/* turn off I/D-cache */
	icache_disable();
	/* invalidate D-cache */
	dcache_disable();

#ifndef CONFIG_L2_OFF
	/* turn off L2 cache */
	l2_cache_disable();
	/* invalidate L2 cache also */
	v7_flush_dcache_all(get_device_type());
#endif
	i = 0;
	/* mem barrier to sync up things */
	asm("mcr p15, 0, %0, c7, c10, 4": :"r"(i));

	/* turn off MMU */
	MMU_OFF();

#ifndef CONFIG_L2_OFF
	l2_cache_enable();
#endif

	return 0;
}
开发者ID:Grommerin,项目名称:uboot-imx,代码行数:50,代码来源:cpu.c


示例19: board_init

/*
 * Miscelaneous platform dependent initialisations
 */
int board_init(void)
{
	/* We have RAM, disable cache */
	dcache_disable();
	icache_disable();

	/* memory and cpu-speed are setup before relocation */
	/* so we do _nothing_ here */

	/* adress of boot parameters */
	gd->bd->bi_boot_params = 0xa0000100;

	return 0;
}
开发者ID:0s4l,项目名称:u-boot-xlnx,代码行数:17,代码来源:lp8x4x.c


示例20: board_init

int board_init (void)
{
	/* We have RAM, disable cache */
	dcache_disable();
	icache_disable();

	/* arch number of Lubbock-Board */
	gd->bd->bi_arch_number = MACH_TYPE_LUBBOCK;

	/* adress of boot parameters */
	gd->bd->bi_boot_params = 0xa0000100;

	return 0;
}
开发者ID:54shady,项目名称:uboot_tiny4412,代码行数:14,代码来源:lubbock.c



注:本文中的icache_disable函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C++ icache_enable函数代码示例发布时间:2022-05-30
下一篇:
C++ ic函数代码示例发布时间:2022-05-30
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap