From cda78a541426b318e93543cb257d2952503118ba Mon Sep 17 00:00:00 2001 From: Niklas Hallqvist Date: Tue, 28 Nov 1995 20:44:55 +0000 Subject: Fix SunOS emulation on 040 --- sys/arch/m68k/m68k/sunos_machdep.c | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) 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. -- cgit v1.2.3