フォーク テストを実行すると、TLB ミス オン ロード エラーが発生します。これは、誤った stackptr を mips_usermode に渡すことが原因であることを理解しています。私の実装は、ここでいくつかの提案を中心に展開しているようです。以下のコードは、thread_fork のエントリ ポイント関数として提供されます。私は何かを見逃していますか?
void
enter_forked_process(void *junk,unsigned long num)
{
kprintf("\n entered enter_fork_process");
struct trapframe tf = (*((struct trapframe *) junk));
(void) num;
kprintf("\n 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);
}