I have a TLB miss on load error when I run the fork test , I understand this is due to passing wrong stackptr to mips_usermode , my implementation seems to revolve around few suggestions over here, would be grateful if I get corrected her.
(我在运行fork测试时遇到TLB加载错误,我理解这是由于将错误的stackptr传递给mips_usermode造成的,我的实现似乎围绕着此处的一些建议,如果我纠正了她,将不胜感激。)
My code below is provided as entry point function in thread_fork. (我的以下代码在thread_fork中作为入口点函数提供。)
Am i missin any thing ? (我想念什么吗?)
void
enter_forked_process(void *junk,unsigned long num)
{
kprintf("
entered enter_fork_process");
struct trapframe tf = (*((struct trapframe *) junk));
(void) num;
kprintf("
copied tf from from parent to child");
tf.tf_v0 = 0;
tf.tf_a3 = 0;
tf.tf_epc += 4;
kprintf("abt to enter mips_ usermode");
mips_usermode(&tf);
}
ask by gsb translate from so 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…