根据mem_init()中的注释,剩余的代码需要完成的功能就是把操作系统中一些重要的地址范围映射到kern_pgdir上。 boot_map_region(kern_pgdir,UPAGES,PTSIZE,PADDR(pages),PTE_U|PTE_P); boot_map_region(kern_pgdir,KSTACKTOP-KSTKSIZE,KSTKSIZE,PADDR(bootstack),PTE_W|PTE_P); boot_map_region(kern_pgdir...
{ static char buf[1024]; va_list args; bust_spinlocks(1); va_start(args, fmt); vsnprintf(buf, sizeof(buf), fmt, args); va_end(args); printk(KERN_EMERG "Kernel panic - not syncing: %s/n",buf); bust_spinlocks(0); kernel/exit.c if (unlikely(in_interrupt())) panic("Aiee,...
vsnprintf(buf, sizeof(buf), fmt, args); va_end(args); printk(KERN_EMERG "Kernel panic - not syncing: %s/n",buf); bust_spinlocks(0); kernel/exit.c if (unlikely(in_interrupt())) panic("Aiee, killing interrupt handler!"); #中断处理 ...