Index: sys/riscv/riscv/locore.S =================================================================== --- sys/riscv/riscv/locore.S +++ sys/riscv/riscv/locore.S @@ -69,12 +69,13 @@ la t0, hart_lottery li t1, 1 amoadd.w t0, t1, 0(t0) - bnez t0, mpentry + beqz t0, 1f + j mpentry /* * Page tables */ - +1: /* Add L1 entry for kernel */ la s1, pagetable_l1 la s2, pagetable_l2 /* Link to next level PN */