Some AP booting debug

上级 389f0bd5
...@@ -29,8 +29,15 @@ ...@@ -29,8 +29,15 @@
.code16 .code16
.globl start .globl start
start: start:
cli cli
cld wbinvd
mov $0, %ax
mov %ax, %ds
cld
# Announce we made it this far.
# Useful for debugging in bootothers.
movl $0x0a55face, start - 64
lgdt gdtdesc lgdt gdtdesc
movl %cr0, %eax movl %cr0, %eax
......
...@@ -84,6 +84,8 @@ bootothers(void) ...@@ -84,6 +84,8 @@ bootothers(void)
stack = (char*) ksalloc(slab_stack); stack = (char*) ksalloc(slab_stack);
*(u32*)(code-4) = (u32)v2p(&apstart); *(u32*)(code-4) = (u32)v2p(&apstart);
*(u64*)(code-12) = (u64)stack + KSTACKSIZE; *(u64*)(code-12) = (u64)stack + KSTACKSIZE;
// bootother.S sets this to 0x0a55face early on
*(u32*)(code-64) = 0;
bstate = 0; bstate = 0;
lapicstartap(c->hwid, v2p(code)); lapicstartap(c->hwid, v2p(code));
......
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论