/arch/arm/kernel/setip.c 函数setup_arch()分析

void __init setup_arch(char **cmdline_p)
{
	struct machine_desc *mdesc; //机器描述结构

	setup_processor();
	mdesc = setup_machine_fdt(__atags_pointer);
	if (!mdesc)
		mdesc = setup_machine_tags(machine_arch_type);
		/*
		    ->Mach_MINI2440.c machine_desc结构
		    找到
		*/
		
	machine_desc = mdesc;
	machine_name = mdesc->name;

#ifdef CONFIG_ZONE_DMA
	if (mdesc->dma_zone_size) {
		extern unsigned long arm_dma_zone_size;
		arm_dma_zone_size = mdesc->dma_zone_size;
	}
#endif
	if (mdesc->soft_reboot)
		reboot_setup("s");

	init_mm.start_code = (unsigned long) _text;
	init_mm.end_code   = (unsigned long) _etext;
	init_mm.end_data   = (unsigned long) _edata;
	init_mm.brk	       = (unsigned long) _end;

	/* populate cmd_line too for later use, preserving boot_command_line */
	strlcpy(cmd_line, boot_command_line, COMMAND_LINE_SIZE);
	*cmdline_p = cmd_line;

	parse_early_param();

	sanity_check_meminfo();
	arm_memblock_init(&meminfo, mdesc);

	paging_init(mdesc); //Go Mach_mini2440.c .map_io();
	request_standard_resources(mdesc);

	unflatten_device_tree();

#ifdef CONFIG_SMP
	if (is_smp())
		smp_init_cpus();
#endif
	reserve_crashkernel();

	tcm_init();

#ifdef CONFIG_MULTI_IRQ_HANDLER
	handle_arch_irq = mdesc->handle_irq;
#endif

#ifdef CONFIG_VT
#if defined(CONFIG_VGA_CONSOLE)
	conswitchp = &vga_con;
#elif defined(CONFIG_DUMMY_CONSOLE)
	conswitchp = &dummy_con;
#endif
#endif
	early_trap_init();

	if (mdesc->init_early)
		mdesc->init_early();
}



评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值