1 /* 高半核入口点 - 0xC0000000 */
11 # This stack was too small that corrupt the ambient kernel structures.
12 # (took me days to figure this out!)
13 # We should spent more time to implement a good strategy to detect such
14 # run-over (we can check these invariants when we trapped in some non-recoverable
15 # state and provide good feedback to user)
23 movl $__kinit_stack_top, %esp
24 andl $stack_alignment, %esp
27 最终还是决定将IDT&GDT的初始化和安装放在这里
28 注意:由于已开启分页,GDTR与IDTR里面放的不是物理地址,是线性地址!
32 P.s. 虽然GDT在分页后已变得不重要,甚至可以忽略不作。但为了保持完整性,还是选择加载他
33 这主要是为了保险起见,让GDTR有一个合法的值,否则多咱的粗心大意,容易出#GP
64 # perform arch-specific initialization before diving into kernel
71 movl $bhctx_buffer, (%esp) # mb_parser.c