summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNiklas Hallqvist <niklas@cvs.openbsd.org>1995-11-28 20:44:55 +0000
committerNiklas Hallqvist <niklas@cvs.openbsd.org>1995-11-28 20:44:55 +0000
commitcda78a541426b318e93543cb257d2952503118ba (patch)
tree5a99033c16cdc6f357ead098aff802eab66bedb6
parenta67d67c718075c9d54dbc516591f1e0dac57b670 (diff)
Fix SunOS emulation on 040
-rw-r--r--sys/arch/m68k/m68k/sunos_machdep.c16
1 files changed, 16 insertions, 0 deletions
diff --git a/sys/arch/m68k/m68k/sunos_machdep.c b/sys/arch/m68k/m68k/sunos_machdep.c
index a7c4df1f6e9..25e3ed7694f 100644
--- a/sys/arch/m68k/m68k/sunos_machdep.c
+++ b/sys/arch/m68k/m68k/sunos_machdep.c
@@ -86,6 +86,22 @@ struct sunos_sigframe {
struct sunos_sigcontext sf_sc; /* I don't know if that's what
comes here */
};
+
+/*
+ * SunOS' ld.so does self-modifying code without knowing about the 040's
+ * cache purging needs. So we need to uncache writeable executable pages.
+ */
+void
+sunos_setregs(p, pack, stack, retval)
+ register struct proc *p;
+ struct exec_package *pack;
+ u_long stack;
+ register_t *retval;
+{
+ setregs(p, pack, stack, retval);
+ p->p_md.md_flags |= MDP_UNCACHE_WX;
+}
+
/*
* much simpler sendsig() for SunOS processes, as SunOS does the whole
* context-saving in usermode. For now, no hardware information (ie.