diff options
Diffstat (limited to 'arch')
| -rw-r--r-- | arch/riscv64/kernel/vmem.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/arch/riscv64/kernel/vmem.c b/arch/riscv64/kernel/vmem.c index bd7906b..4556593 100644 --- a/arch/riscv64/kernel/vmem.c +++ b/arch/riscv64/kernel/vmem.c @@ -605,6 +605,10 @@ stat_t setup_rpc_stack(struct tcb *t) vmflags_t flags = VM_V | VM_R | VM_W; /* note how VM_U is missing, userspace messing about will be done later */ + /* don't generate interrupt on first access, since it'll come from + * inside the kernel and we can't handle that */ + flags |= VM_A | VM_D; + pm_t page = alloc_page(MM_O1); if (!page) return ERR_OOMEM; @@ -751,7 +755,7 @@ void destroy_rpc(struct tcb *t) set_bits(*pte, vp_flags(VM_U)); } - t->arch.rpc_idx = ctx - 1; + t->arch.rpc_idx = ctx - 2; } void grow_rpc(struct tcb *t, vm_t top) |
