hp300 part of the fix for pr 6152
This commit is contained in:
parent
fde637530e
commit
75469a775e
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: locore.s,v 1.91 1998/11/11 06:41:25 thorpej Exp $ */
|
||||
/* $NetBSD: locore.s,v 1.92 1999/02/25 22:34:41 is Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1994, 1995 Gordon W. Ross
|
||||
@ -845,11 +845,12 @@ Ltrap1:
|
||||
* command in d0, addr in a1, length in d1
|
||||
*/
|
||||
ENTRY_NOPROFILE(trap12)
|
||||
movl _curproc,sp@- | push current proc pointer
|
||||
movl d1,sp@- | push length
|
||||
movl a1,sp@- | push addr
|
||||
movl d0,sp@- | push command
|
||||
jbsr _C_LABEL(cachectl) | do it
|
||||
lea sp@(12),sp | pop args
|
||||
jbsr _C_LABEL(cachectl1) | do it
|
||||
lea sp@(16),sp | pop args
|
||||
jra _ASM_LABEL(rei) | all done
|
||||
|
||||
/*
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: pmap.c,v 1.64 1999/02/02 21:06:55 thorpej Exp $ */
|
||||
/* $NetBSD: pmap.c,v 1.65 1999/02/25 22:34:41 is Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1991, 1993
|
||||
@ -318,6 +318,21 @@ pmap_virtual_space(vstartp, vendp)
|
||||
*vendp = virtual_end;
|
||||
}
|
||||
|
||||
/*
|
||||
* Routine: pmap_procwr
|
||||
*
|
||||
* Function:
|
||||
* Synchronize caches corresponding to [addr, addr+len) in p.
|
||||
*/
|
||||
void
|
||||
pmap_procwr(p, va, len)
|
||||
struct proc *p;
|
||||
vaddr_t va;
|
||||
u_long len;
|
||||
{
|
||||
(void)cachectl1(0x80000004, va, len, p);
|
||||
}
|
||||
|
||||
/*
|
||||
* pmap_init: [ INTERFACE ]
|
||||
*
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: sys_machdep.c,v 1.23 1999/01/19 18:18:41 thorpej Exp $ */
|
||||
/* $NetBSD: sys_machdep.c,v 1.24 1999/02/25 22:34:41 is Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1982, 1986, 1993
|
||||
@ -134,10 +134,11 @@ vdoualarm(arg)
|
||||
*/
|
||||
/*ARGSUSED1*/
|
||||
int
|
||||
cachectl(req, addr, len)
|
||||
cachectl1(req, addr, len, p)
|
||||
int req;
|
||||
caddr_t addr;
|
||||
vaddr_t addr;
|
||||
int len;
|
||||
struct proc *p;
|
||||
{
|
||||
int error = 0;
|
||||
|
||||
@ -146,7 +147,7 @@ cachectl(req, addr, len)
|
||||
int inc = 0;
|
||||
int doall = 0;
|
||||
paddr_t pa = 0;
|
||||
caddr_t end = 0;
|
||||
vaddr_t end = 0;
|
||||
#ifdef COMPAT_HPUX
|
||||
extern struct emul emul_hpux;
|
||||
|
||||
@ -162,10 +163,10 @@ cachectl(req, addr, len)
|
||||
if (!doall) {
|
||||
end = addr + len;
|
||||
if (len <= 1024) {
|
||||
addr = (caddr_t)((int)addr & ~0xF);
|
||||
addr = addr & ~0xF;
|
||||
inc = 16;
|
||||
} else {
|
||||
addr = (caddr_t)((int)addr & ~PGOFSET);
|
||||
addr = addr & ~PGOFSET;
|
||||
inc = NBPG;
|
||||
}
|
||||
}
|
||||
@ -177,8 +178,8 @@ cachectl(req, addr, len)
|
||||
*/
|
||||
if (!doall &&
|
||||
(pa == 0 || ((int)addr & PGOFSET) == 0)) {
|
||||
pa = pmap_extract(curproc->p_vmspace->vm_map.pmap,
|
||||
(vaddr_t)addr);
|
||||
pa = pmap_extract(p->p_vmspace->vm_map.pmap,
|
||||
addr);
|
||||
if (pa == 0)
|
||||
doall = 1;
|
||||
}
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: pmap.h,v 1.24 1999/02/02 21:06:55 thorpej Exp $ */
|
||||
/* $NetBSD: pmap.h,v 1.25 1999/02/25 22:34:41 is Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1987 Carnegie-Mellon University
|
||||
@ -151,6 +151,8 @@ extern pt_entry_t *Sysmap;
|
||||
extern char *vmmap; /* map for mem, dumps, etc. */
|
||||
|
||||
vaddr_t pmap_map __P((vaddr_t, paddr_t, paddr_t, int));
|
||||
void pmap_procwr __P((struct proc *, vaddr_t, u_long));
|
||||
#define PMAP_NEED_PROCWR
|
||||
|
||||
#ifdef M68K_MMU_HP
|
||||
void pmap_prefer __P((vaddr_t, vaddr_t *));
|
||||
|
Loading…
Reference in New Issue
Block a user