summaryrefslogtreecommitdiff
path: root/sys/arch
diff options
context:
space:
mode:
Diffstat (limited to 'sys/arch')
-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.