2013年1月9日
摘要: start_kernel函数的最后调用rest_init函数来创建并启动内核线程 1 static noinline void __init_refok rest_init(void) 2 { 3 int pid; 4 5 rcu_scheduler_starting(); 6 /* 7 * We need to spawn init first so that it obtains pid 1, however 8 * the init task will end up wanting to create ... 阅读全文
posted @ 2013-01-09 15:08 冈萨雷斯 阅读(216) 评论(0) 推荐(0) 编辑
摘要: start_kernel调用setup_arch()函数作为执行的第一步,在其中完成特定于体系结构的设置 1 void __init 2 setup_arch(char **cmdline_p) 3 { 4 extern char _end[]; 5 6 struct alpha_machine_vector *vec = NULL; 7 struct percpu_struct *cpu; 8 char *type_name, *var_name, *p; 9 void *kernel_end... 阅读全文
posted @ 2013-01-09 15:02 冈萨雷斯 阅读(524) 评论(0) 推荐(0) 编辑
摘要: 分析kernel运行的过程(mark) 1.smp_setup_processor_id():多CPU架构的初始化,空函数 2.lockdep_init():lockdep哈希表初始化,lockdep是linux内核的一个调试模块,用来检查内核互斥机制尤其是自旋锁潜在的死锁问题 3. debug_objects_early_init():空函数 4. boot_init_stack_canary():初始化栈canary值,canary值用于防止栈溢出攻击的堆栈的保护字 5. cgoup_init_early():空函数 6. local_irq_disable():关闭系统总中断 7. ea 阅读全文
posted @ 2013-01-09 14:12 冈萨雷斯 阅读(782) 评论(0) 推荐(0) 编辑