summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMark Kettenis <kettenis@cvs.openbsd.org>2020-06-22 16:09:34 +0000
committerMark Kettenis <kettenis@cvs.openbsd.org>2020-06-22 16:09:34 +0000
commit08ae37b1d620dd29780244c5d951a718d7da2aef (patch)
tree23372eccaf9a2585bd9d7af6cd17625a41ff5448
parent654c0bbf48cd0861c9430359a3cdce4f4d126fa2 (diff)
Implement setregs().
-rw-r--r--sys/arch/powerpc64/powerpc64/machdep.c11
1 files changed, 9 insertions, 2 deletions
diff --git a/sys/arch/powerpc64/powerpc64/machdep.c b/sys/arch/powerpc64/powerpc64/machdep.c
index 79ebada20b6..b06d55de12c 100644
--- a/sys/arch/powerpc64/powerpc64/machdep.c
+++ b/sys/arch/powerpc64/powerpc64/machdep.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: machdep.c,v 1.28 2020/06/21 18:39:38 kettenis Exp $ */
+/* $OpenBSD: machdep.c,v 1.29 2020/06/22 16:09:33 kettenis Exp $ */
/*
* Copyright (c) 2020 Mark Kettenis <kettenis@openbsd.org>
@@ -605,7 +605,14 @@ void
setregs(struct proc *p, struct exec_package *pack, u_long stack,
register_t *retval)
{
- panic("%s", __func__);
+ struct trapframe *frame = p->p_md.md_regs;
+
+ frame->fixreg[1] = stack;
+ frame->srr0 = pack->ep_entry;
+ frame->srr1 = PSL_SF | PSL_HV | PSL_EE | PSL_PR | PSL_ME |
+ PSL_IR | PSL_DR | PSL_RI;
+
+ retval[1] = 0;
}
void