some changes for new style cachectl. remains compat for <= 030
This commit is contained in:
parent
ce5210ad7d
commit
6a0e2061ce
@ -9,7 +9,9 @@ struct relocation_info *r;
|
||||
long relocation;
|
||||
char *addr;
|
||||
{
|
||||
if (r->r_relative)
|
||||
if (r->r_relative) {
|
||||
*(long *)addr += relocation;
|
||||
_cachectl (addr, 4); /* maintain cache coherency */
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -27,7 +27,7 @@
|
||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
|
||||
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
* $Id: md.c,v 1.5 1994/06/10 15:17:07 pk Exp $
|
||||
* $Id: md.c,v 1.6 1994/06/13 05:28:41 chopps Exp $
|
||||
*/
|
||||
|
||||
#include <sys/param.h>
|
||||
@ -86,6 +86,9 @@ unsigned char *addr;
|
||||
errx(1, "Unsupported relocation size: %x",
|
||||
RELOC_TARGET_SIZE(rp));
|
||||
}
|
||||
#ifdef RTLD
|
||||
_cachectl (addr, RELOC_TARGET_SIZE(rp)); /* maintain cache coherency */
|
||||
#endif
|
||||
}
|
||||
|
||||
/*
|
||||
@ -132,6 +135,9 @@ long index;
|
||||
sp->addr[0] = fudge >> 16;
|
||||
sp->addr[1] = fudge;
|
||||
sp->reloc_index = index;
|
||||
#ifdef RTLD
|
||||
_cachectl (sp, 6); /* maintain cache coherency */
|
||||
#endif
|
||||
}
|
||||
|
||||
/*
|
||||
@ -153,6 +159,9 @@ u_long addr;
|
||||
sp->addr[0] = fudge >> 16;
|
||||
sp->addr[1] = fudge;
|
||||
sp->reloc_index = 0;
|
||||
#ifdef RTLD
|
||||
_cachectl (sp, 6); /* maintain cache coherency */
|
||||
#endif
|
||||
}
|
||||
|
||||
/*
|
||||
|
@ -27,7 +27,7 @@
|
||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
|
||||
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
* $Id: mdprologue.S,v 1.4 1994/03/08 23:50:14 chopps Exp $
|
||||
* $Id: mdprologue.S,v 1.5 1994/06/13 05:28:43 chopps Exp $
|
||||
*/
|
||||
|
||||
/*
|
||||
@ -49,8 +49,8 @@ _rtl:
|
||||
movel a6@(8),sp@- | version
|
||||
addl a5@(_rtld:w),a1 | relocate _rtld function
|
||||
jsr a1@ | call it
|
||||
movel #0x80000004,d0 | CC_EXTPURGE | CC_IPURGE
|
||||
trap #12 | cachectl
|
||||
| movel #0x80000004,d0 | CC_EXTPURGE | CC_IPURGE
|
||||
| trap #12 | cachectl
|
||||
movel a6@(-4),a5
|
||||
unlk a6
|
||||
rts
|
||||
@ -66,6 +66,14 @@ _binder_entry:
|
||||
jbsr _binder,a1 | relocate function address
|
||||
addql #8,sp
|
||||
movel d0,sp@- | push function address on stack
|
||||
movel #0x80000004,d0 | CC_EXTPURGE | CC_IPURGE
|
||||
trap #12 | cachectl
|
||||
| movel #0x80000004,d0 | CC_EXTPURGE | CC_IPURGE
|
||||
| trap #12 | cachectl
|
||||
rts | jump into function (via address on stack)
|
||||
|
||||
.globl __cachectl
|
||||
__cachectl:
|
||||
movel sp@(4),a1 | address
|
||||
movel sp@(8),d1 | length
|
||||
movel #0x80000004,d0 | function = CC_EXTPURGE | CC_IPURGE
|
||||
trap #12 | cachectl "syscall"
|
||||
rts
|
||||
|
@ -9,7 +9,9 @@ struct relocation_info *r;
|
||||
long relocation;
|
||||
char *addr;
|
||||
{
|
||||
if (r->r_relative)
|
||||
if (r->r_relative) {
|
||||
*(long *)addr += relocation;
|
||||
_cachectl (addr, 4); /* maintain cache coherency */
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -27,7 +27,7 @@
|
||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
|
||||
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
* $Id: md.c,v 1.5 1994/06/10 15:17:07 pk Exp $
|
||||
* $Id: md.c,v 1.6 1994/06/13 05:28:41 chopps Exp $
|
||||
*/
|
||||
|
||||
#include <sys/param.h>
|
||||
@ -86,6 +86,9 @@ unsigned char *addr;
|
||||
errx(1, "Unsupported relocation size: %x",
|
||||
RELOC_TARGET_SIZE(rp));
|
||||
}
|
||||
#ifdef RTLD
|
||||
_cachectl (addr, RELOC_TARGET_SIZE(rp)); /* maintain cache coherency */
|
||||
#endif
|
||||
}
|
||||
|
||||
/*
|
||||
@ -132,6 +135,9 @@ long index;
|
||||
sp->addr[0] = fudge >> 16;
|
||||
sp->addr[1] = fudge;
|
||||
sp->reloc_index = index;
|
||||
#ifdef RTLD
|
||||
_cachectl (sp, 6); /* maintain cache coherency */
|
||||
#endif
|
||||
}
|
||||
|
||||
/*
|
||||
@ -153,6 +159,9 @@ u_long addr;
|
||||
sp->addr[0] = fudge >> 16;
|
||||
sp->addr[1] = fudge;
|
||||
sp->reloc_index = 0;
|
||||
#ifdef RTLD
|
||||
_cachectl (sp, 6); /* maintain cache coherency */
|
||||
#endif
|
||||
}
|
||||
|
||||
/*
|
||||
|
@ -27,7 +27,7 @@
|
||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
|
||||
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
* $Id: mdprologue.S,v 1.4 1994/03/08 23:50:14 chopps Exp $
|
||||
* $Id: mdprologue.S,v 1.5 1994/06/13 05:28:43 chopps Exp $
|
||||
*/
|
||||
|
||||
/*
|
||||
@ -49,8 +49,8 @@ _rtl:
|
||||
movel a6@(8),sp@- | version
|
||||
addl a5@(_rtld:w),a1 | relocate _rtld function
|
||||
jsr a1@ | call it
|
||||
movel #0x80000004,d0 | CC_EXTPURGE | CC_IPURGE
|
||||
trap #12 | cachectl
|
||||
| movel #0x80000004,d0 | CC_EXTPURGE | CC_IPURGE
|
||||
| trap #12 | cachectl
|
||||
movel a6@(-4),a5
|
||||
unlk a6
|
||||
rts
|
||||
@ -66,6 +66,14 @@ _binder_entry:
|
||||
jbsr _binder,a1 | relocate function address
|
||||
addql #8,sp
|
||||
movel d0,sp@- | push function address on stack
|
||||
movel #0x80000004,d0 | CC_EXTPURGE | CC_IPURGE
|
||||
trap #12 | cachectl
|
||||
| movel #0x80000004,d0 | CC_EXTPURGE | CC_IPURGE
|
||||
| trap #12 | cachectl
|
||||
rts | jump into function (via address on stack)
|
||||
|
||||
.globl __cachectl
|
||||
__cachectl:
|
||||
movel sp@(4),a1 | address
|
||||
movel sp@(8),d1 | length
|
||||
movel #0x80000004,d0 | function = CC_EXTPURGE | CC_IPURGE
|
||||
trap #12 | cachectl "syscall"
|
||||
rts
|
||||
|
@ -9,7 +9,9 @@ struct relocation_info *r;
|
||||
long relocation;
|
||||
char *addr;
|
||||
{
|
||||
if (r->r_relative)
|
||||
if (r->r_relative) {
|
||||
*(long *)addr += relocation;
|
||||
_cachectl (addr, 4); /* maintain cache coherency */
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -27,7 +27,7 @@
|
||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
|
||||
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
* $Id: md.c,v 1.5 1994/06/10 15:17:07 pk Exp $
|
||||
* $Id: md.c,v 1.6 1994/06/13 05:28:41 chopps Exp $
|
||||
*/
|
||||
|
||||
#include <sys/param.h>
|
||||
@ -86,6 +86,9 @@ unsigned char *addr;
|
||||
errx(1, "Unsupported relocation size: %x",
|
||||
RELOC_TARGET_SIZE(rp));
|
||||
}
|
||||
#ifdef RTLD
|
||||
_cachectl (addr, RELOC_TARGET_SIZE(rp)); /* maintain cache coherency */
|
||||
#endif
|
||||
}
|
||||
|
||||
/*
|
||||
@ -132,6 +135,9 @@ long index;
|
||||
sp->addr[0] = fudge >> 16;
|
||||
sp->addr[1] = fudge;
|
||||
sp->reloc_index = index;
|
||||
#ifdef RTLD
|
||||
_cachectl (sp, 6); /* maintain cache coherency */
|
||||
#endif
|
||||
}
|
||||
|
||||
/*
|
||||
@ -153,6 +159,9 @@ u_long addr;
|
||||
sp->addr[0] = fudge >> 16;
|
||||
sp->addr[1] = fudge;
|
||||
sp->reloc_index = 0;
|
||||
#ifdef RTLD
|
||||
_cachectl (sp, 6); /* maintain cache coherency */
|
||||
#endif
|
||||
}
|
||||
|
||||
/*
|
||||
|
@ -27,7 +27,7 @@
|
||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
|
||||
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
* $Id: mdprologue.S,v 1.4 1994/03/08 23:50:14 chopps Exp $
|
||||
* $Id: mdprologue.S,v 1.5 1994/06/13 05:28:43 chopps Exp $
|
||||
*/
|
||||
|
||||
/*
|
||||
@ -49,8 +49,8 @@ _rtl:
|
||||
movel a6@(8),sp@- | version
|
||||
addl a5@(_rtld:w),a1 | relocate _rtld function
|
||||
jsr a1@ | call it
|
||||
movel #0x80000004,d0 | CC_EXTPURGE | CC_IPURGE
|
||||
trap #12 | cachectl
|
||||
| movel #0x80000004,d0 | CC_EXTPURGE | CC_IPURGE
|
||||
| trap #12 | cachectl
|
||||
movel a6@(-4),a5
|
||||
unlk a6
|
||||
rts
|
||||
@ -66,6 +66,14 @@ _binder_entry:
|
||||
jbsr _binder,a1 | relocate function address
|
||||
addql #8,sp
|
||||
movel d0,sp@- | push function address on stack
|
||||
movel #0x80000004,d0 | CC_EXTPURGE | CC_IPURGE
|
||||
trap #12 | cachectl
|
||||
| movel #0x80000004,d0 | CC_EXTPURGE | CC_IPURGE
|
||||
| trap #12 | cachectl
|
||||
rts | jump into function (via address on stack)
|
||||
|
||||
.globl __cachectl
|
||||
__cachectl:
|
||||
movel sp@(4),a1 | address
|
||||
movel sp@(8),d1 | length
|
||||
movel #0x80000004,d0 | function = CC_EXTPURGE | CC_IPURGE
|
||||
trap #12 | cachectl "syscall"
|
||||
rts
|
||||
|
Loading…
Reference in New Issue
Block a user