*参照元 [#j026636d]
#backlinks

*説明 [#va4bfff1]
-パス: [[linux-2.6.33/init/main.c]]

-FIXME: これは何?
--説明


**引数 [#s90e3ca5]
-
--

**返り値 [#nef67915]
-
--

**参考 [#z779abc2]


*実装 [#pd00c22e]
 asmlinkage void __init start_kernel(void)
 {
 	char * command_line;
 	extern struct kernel_param __start___param[], __stop___param[];
 
-
--[[linux-2.6.33/kernel_param]]
-
--[[linux-2.6.33/__start__param(global)]]
-
--[[linux-2.6.33/__stop__param(global)]]

 	smp_setup_processor_id();
 
-
--[[linux-2.6.33/smp_setup_processor_id()]]

 	/*
 	 * Need to run as early as possible, to initialize the
 	 * lockdep hash:
 	 */
 	lockdep_init();
 	debug_objects_early_init();
 
-
--[[linux-2.6.33/lockdep_init()]]
-
--[[linux-2.6.33/debug_objects_early_init()]]

 	/*
 	 * Set up the the initial canary ASAP:
 	 */
 	boot_init_stack_canary();
 
-
--[[linux-2.6.33/boot_init_stack_canary()]]

 	cgroup_init_early();
 
-
--[[linux-2.6.33/cgroup_init_early()]]

 	local_irq_disable();
 	early_boot_irqs_off();
 	early_init_irq_lock_class();
 
-
--[[linux-2.6.33/local_irq_disable()]]
-
--[[linux-2.6.33/early_boot_irqs_off()]]
-
--[[linux-2.6.33/early_init_irq_lock_class()]]

 /*
  * Interrupts are still disabled. Do necessary setups, then
  * enable them
  */
 	lock_kernel();
-
--[[linux-2.6.33/lock_kernel()]]

 	tick_init();
 	boot_cpu_init();
 	page_address_init();
 	printk(KERN_NOTICE "%s", linux_banner);
-
--[[linux-2.6.33/tick_init()]]
-
--[[linux-2.6.33/boot_cpu_init()]]
-
--[[linux-2.6.33/page_address_init()]]
-
--[[linux-2.6.33/printk()]]
-
--[[linux-2.6.33/linux_banner(global)]]

 	setup_arch(&command_line);
 	mm_init_owner(&init_mm, &init_task);
 	setup_command_line(command_line);
 	setup_nr_cpu_ids();
 	setup_per_cpu_areas();
 	smp_prepare_boot_cpu();	/* arch-specific boot-cpu hooks */
 
-
--[[linux-2.6.33/setup_arch()]]
-
--[[linux-2.6.33/mm_init_owner()]]
-
--[[linux-2.6.33/init_mm(global)]]
-
--[[linux-2.6.33/init_task(global)]]
-
--[[linux-2.6.33/setup_command_line()]]
-
--[[linux-2.6.33/setup_nr_cpu_ids()]]
-
--[[linux-2.6.33/setup_per_cpu_areas()]]
-
--[[linux-2.6.33/smp_prepare_boot_cpu()]]

 	build_all_zonelists();
 	page_alloc_init();
 
-
--[[linux-2.6.33/build_all_zonelists()]]
-
--[[linux-2.6.33/page_alloc_init()]]

 	printk(KERN_NOTICE "Kernel command line: %s\n", boot_command_line);
 	parse_early_param();
 	parse_args("Booting kernel", static_command_line, __start___param,
 		   __stop___param - __start___param,
 		   &unknown_bootoption);
-
--[[linux-2.6.33/boot_command_line(global)]]
-
--[[linux-2.6.33/parse_early_param()]]
-
--[[linux-2.6.33/parse_args()]]
-
--[[linux-2.6.33/static_command_line(global)]]
-
--[[linux-2.6.33/unknown_boot_option(global)]]

 	/*
 	 * These use large bootmem allocations and must precede
 	 * kmem_cache_init()
 	 */
 	pidhash_init();
 	vfs_caches_init_early();
 	sort_main_extable();
 	trap_init();
 	mm_init();
-
--[[linux-2.6.33/pidhash_init()]]
-
--[[linux-2.6.33/vfs_caches_init_early()]]
-
--[[linux-2.6.33/sort_main_extable()]]
-
--[[linux-2.6.33/trap_init()]]
-
--[[linux-2.6.33/mm_init()]]

 	/*
 	 * Set up the scheduler prior starting any interrupts (such as the
 	 * timer interrupt). Full topology setup happens at smp_init()
 	 * time - but meanwhile we still have a functioning scheduler.
 	 */
 	sched_init();
-
--[[linux-2.6.33/sched_init()]]

 	/*
 	 * Disable preemption - early bootup scheduling is extremely
 	 * fragile until we cpu_idle() for the first time.
 	 */
 	preempt_disable();
-
--[[linux-2.6.33/preempt_disable()]]

 	if (!irqs_disabled()) {
-
--[[linux-2.6.33/irqs_disabled()]]

 		printk(KERN_WARNING "start_kernel(): bug: interrupts were "
 				"enabled *very* early, fixing it\n");
 		local_irq_disable();
 	}
 	rcu_init();
-
--[[linux-2.6.33/rcu_init()]]

 	/* init some links before init_ISA_irqs() */
 	early_irq_init();
 	init_IRQ();
-
--[[linux-2.6.33/early_irq_init()]]
-
--[[linux-2.6.33/init_IRQ()]]

 	prio_tree_init();
 	init_timers();
 	hrtimers_init();
 	softirq_init();
-
--[[linux-2.6.33/prio_tree_init()]]
-
--[[linux-2.6.33/init_timers()]]
-
--[[linux-2.6.33/hrtimers_init()]]
-
--[[linux-2.6.33/softirq_init()]]

 	timekeeping_init();
 	time_init();
 	profile_init();
-
--[[linux-2.6.33/timekeeping_init()]]
-
--[[linux-2.6.33/time_init()]]
-
--[[linux-2.6.33/profile_init()]]

 	if (!irqs_disabled())
 		printk(KERN_CRIT "start_kernel(): bug: interrupts were "
 				 "enabled early\n");
 	early_boot_irqs_on();
 	local_irq_enable();
 
-
--[[linux-2.6.33/early_boot_irqs_on()]]
-
--[[linux-2.6.33/local_irq_enable()]]

 	/* Interrupts are enabled now so all GFP allocations are safe. */
 	set_gfp_allowed_mask(__GFP_BITS_MASK);
 
-
--[[linux-2.6.33/set_gfp_allowed_mask()]]
-
--[[linux-2.6.33/__GFP_BITS_MASK]]

 	kmem_cache_init_late();
 
-
--[[linux-2.6.33/kmem_cache_init_late()]]

 	/*
 	 * HACK ALERT! This is early. We're enabling the console before
 	 * we've done PCI setups etc, and console_init() must be aware of
 	 * this. But we do want output early, in case something goes wrong.
 	 */
 	console_init();
-
--[[linux-2.6.33/console_init()]]

 	if (panic_later)
 		panic(panic_later, panic_param);
 
-
--[[linux-2.6.33/panic()]]
-
--[[linux-2.6.33/panic_later(global)]]
-
--[[linux-2.6.33/panic_param(global)]]


 	lockdep_info();
 
-
--[[linux-2.6.33/lockdep_info()]]

 	/*
 	 * Need to run this when irqs are enabled, because it wants
 	 * to self-test [hard/soft]-irqs on/off lock inversion bugs
 	 * too:
 	 */
 	locking_selftest();
 
-
--[[linux-2.6.33/locking_selftest()]]

 #ifdef CONFIG_BLK_DEV_INITRD
-
--[[linux-2.6.33/CONFIG_BLK_DEV_INITRD]]

 	if (initrd_start && !initrd_below_start_ok &&
 	    page_to_pfn(virt_to_page((void *)initrd_start)) < min_low_pfn) {
-
--[[linux-2.6.33/initrd_start(global)]]
-
--[[linux-2.6.33/initrd_below_start_ok(global)]]
-
--[[linux-2.6.33/page_to_pfn()]]
-
--[[linux-2.6.33/virt_to_page()]]
-
--[[linux-2.6.33/min_low_pfn(global)]]

 		printk(KERN_CRIT "initrd overwritten (0x%08lx < 0x%08lx) - "
 		    "disabling it.\n",
 		    page_to_pfn(virt_to_page((void *)initrd_start)),
 		    min_low_pfn);
 		initrd_start = 0;
 	}
 #endif
 	page_cgroup_init();
 	enable_debug_pagealloc();
-
--[[linux-2.6.33/page_cgroup_init()]]
-
--[[linux-2.6.33/enable_debug_pagealloc()]]

 	kmemtrace_init();
 	kmemleak_init();
-
--[[linux-2.6.33/kmemtrace_init()]]
-
--[[linux-2.6.33/kmemleak_init()]]

 	debug_objects_mem_init();
 	idr_init_cache();
 	setup_per_cpu_pageset();
-
--[[linux-2.6.33/debug_objects_mem_init()]]
-
--[[linux-2.6.33/idr_init_cache()]]
-
--[[linux-2.6.33/setup_per_cpu_pageset()]]

 	numa_policy_init();
-
--[[linux-2.6.33/numa_policy_init()]]

 	if (late_time_init)
 		late_time_init();
-
--[[linux-2.6.33/late_time_init()]]

 	sched_clock_init();
 	calibrate_delay();
 	pidmap_init();
 	anon_vma_init();
-
--[[linux-2.6.33/sched_clock_init()]]
-
--[[linux-2.6.33/calibrate_delay()]]
-
--[[linux-2.6.33/pidmap_init()]]
-
--[[linux-2.6.33/anon_vma_inir()]]

 #ifdef CONFIG_X86
-
--[[linux-2.6.33/CONFIG_X86]]

 	if (efi_enabled)
 		efi_enter_virtual_mode();
-
--[[linux-2.6.33/efi_enabled(global)]
-
--[[linux-2.6.33/efi_enter_virtual_mode()]]

 #endif
 	thread_info_cache_init();
 	cred_init();
 	fork_init(totalram_pages);
-
--[[linux-2.6.33/thread_info_cache_init()]]
-
--[[linux-2.6.33/cred_init()]]
-
--[[linux-2.6.33/fork_inir()]]
-
--[[linux-2.6.33/totalram_pages(global)]]

 	proc_caches_init();
 	buffer_init();
 	key_init();
 	radix_tree_init();
-
--[[linux-2.6.33/proc_caches_init()]]
-
--[[linux-2.6.33/buffer_init()]]
-
--[[linux-2.6.33/key_init()]]
-
--[[linux-2.6.33/radix_tree_init()]]

 	security_init();
-
--[[linux-2.6.33/security_init()]]

 	vfs_caches_init(totalram_pages);
-
--[[linux-2.6.33/vfs_caches_init()]]

 	signals_init();
-
--[[linux-2.6.33/signals_init()]]

 	/* rootfs populating might need page-writeback */
 	page_writeback_init();
-
--[[linux-2.6.33/]]
--[[linux-2.6.33/page_writeback_init()]]

 #ifdef CONFIG_PROC_FS
-
--[[linux-2.6.33/]]
--[[linux-2.6.33/CONFIG_PROC_FS]]

 	proc_root_init();
-
--[[linux-2.6.33/]]
--[[linux-2.6.33/proc_root_init()]]

 #endif
 	cgroup_init();
 	cpuset_init();
 	taskstats_init_early();
 	delayacct_init();
 
-
--[[linux-2.6.33/cgroup_init()]]
-
--[[linux-2.6.33/cpuset_init()]]
-
--[[linux-2.6.33/taskstats_init_early()]]
-
--[[linux-2.6.33/delayacct_init()]]

 	check_bugs();
 
-
--[[linux-2.6.33/check_bugs()]]

 	acpi_early_init(); /* before LAPIC and SMP init */
 	sfi_init_late();
 
-
--[[linux-2.6.33/acpi_early_init()]]
-
--[[linux-2.6.33/sfi_init_late()]]

 	ftrace_init();
 
-
--[[linux-2.6.33/ftrace_init()]]

 	/* Do the rest non-__init'ed, we're now alive */
 	rest_init();
-
--[[linux-2.6.33/rest_init()]]

 }


*コメント [#t89122f3]

トップ   編集 差分 履歴 添付 複製 名前変更 リロード   新規 一覧 検索 最終更新   ヘルプ   最終更新のRSS