remove unused cache operations, we now use shared m68k/cacheops.c
This commit is contained in:
parent
856e0a920e
commit
1e812ee6cf
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: locore.s,v 1.28 2000/11/26 11:47:26 jdolecek Exp $ */
|
||||
/* $NetBSD: locore.s,v 1.29 2001/04/05 04:23:56 dbj Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1998 Darrin B. Jewell
|
||||
@ -1352,307 +1352,6 @@ Lsldone:
|
||||
rts
|
||||
#endif
|
||||
|
||||
#if 0 /* @@@{ use m68k/cacheops.c */
|
||||
/*
|
||||
* Invalidate entire TLB.
|
||||
*/
|
||||
ENTRY(TBIA)
|
||||
_C_LABEL(_TBIA):
|
||||
#if defined(M68040)
|
||||
cmpl #MMU_68040,_C_LABEL(mmutype) | 68040?
|
||||
jne Lmotommu3 | no, skip
|
||||
.word 0xf518 | yes, pflusha
|
||||
rts
|
||||
Lmotommu3:
|
||||
#endif
|
||||
#if defined(M68K_MMU_MOTOROLA)
|
||||
tstl _C_LABEL(mmutype) | HP MMU?
|
||||
jeq Lhpmmu6 | yes, skip
|
||||
pflusha | flush entire TLB
|
||||
jpl Lmc68851a | 68851 implies no d-cache
|
||||
movl #DC_CLEAR,%d0
|
||||
movc %d0,%cacr | invalidate on-chip d-cache
|
||||
Lmc68851a:
|
||||
rts
|
||||
Lhpmmu6:
|
||||
#endif
|
||||
#if defined(M68K_MMU_HP)
|
||||
MMUADDR(%a0)
|
||||
movl %a0@(MMUTBINVAL),%sp@- | do not ask me, this
|
||||
addql #4,%sp | is how hpux does it
|
||||
#ifdef DEBUG
|
||||
tstl _ASM_LABEL(fullcflush)
|
||||
jne _C_LABEL(_DCIA) | XXX: invalidate entire cache
|
||||
#endif
|
||||
#endif
|
||||
rts
|
||||
|
||||
/*
|
||||
* Invalidate any TLB entry for given VA (TB Invalidate Single)
|
||||
*/
|
||||
ENTRY(TBIS)
|
||||
#ifdef DEBUG
|
||||
tstl _ASM_LABEL(fulltflush) | being conservative?
|
||||
jne _C_LABEL(_TBIA) | yes, flush entire TLB
|
||||
#endif
|
||||
#if defined(M68040)
|
||||
cmpl #MMU_68040,_C_LABEL(mmutype) | 68040?
|
||||
jne Lmotommu4 | no, skip
|
||||
movl %sp@(4),%a0
|
||||
movc dfc,%d1
|
||||
moveq #1,%d0 | user space
|
||||
movc %d0,dfc
|
||||
.word 0xf508 | pflush %a0@
|
||||
moveq #5,%d0 | super space
|
||||
movc %d0,dfc
|
||||
.word 0xf508 | pflush %a0@
|
||||
movc %d1,dfc
|
||||
rts
|
||||
Lmotommu4:
|
||||
#endif
|
||||
#if defined(M68K_MMU_MOTOROLA)
|
||||
tstl _C_LABEL(mmutype) | HP MMU?
|
||||
jeq Lhpmmu5 | yes, skip
|
||||
movl %sp@(4),%a0 | get addr to flush
|
||||
jpl Lmc68851b | is 68851?
|
||||
pflush #0,#0,%a0@ | flush address from both sides
|
||||
movl #DC_CLEAR,%d0
|
||||
movc %d0,%cacr | invalidate on-chip data cache
|
||||
rts
|
||||
Lmc68851b:
|
||||
pflushs #0,#0,%a0@ | flush address from both sides
|
||||
rts
|
||||
Lhpmmu5:
|
||||
#endif
|
||||
#if defined(M68K_MMU_HP)
|
||||
movl %sp@(4),%d0 | VA to invalidate
|
||||
bclr #0,%d0 | ensure even
|
||||
movl %d0,%a0
|
||||
movw %sr,%d1 | go critical
|
||||
movw #PSL_HIGHIPL,%sr | while in purge space
|
||||
moveq #FC_PURGE,%d0 | change address space
|
||||
movc %d0,dfc | for destination
|
||||
moveq #0,%d0 | zero to invalidate?
|
||||
movsl %d0,%a0@ | hit it
|
||||
moveq #FC_USERD,%d0 | back to old
|
||||
movc %d0,dfc | address space
|
||||
movw %d1,%sr | restore IPL
|
||||
#endif
|
||||
rts
|
||||
|
||||
/*
|
||||
* Invalidate supervisor side of TLB
|
||||
*/
|
||||
ENTRY(TBIAS)
|
||||
#ifdef DEBUG
|
||||
tstl _ASM_LABEL(fulltflush) | being conservative?
|
||||
jne _C_LABEL(_TBIA) | yes, flush everything
|
||||
#endif
|
||||
#if defined(M68040)
|
||||
cmpl #MMU_68040,_C_LABEL(mmutype) | 68040?
|
||||
jne Lmotommu5 | no, skip
|
||||
.word 0xf518 | yes, pflusha (for now) XXX
|
||||
rts
|
||||
Lmotommu5:
|
||||
#endif
|
||||
#if defined(M68K_MMU_MOTOROLA)
|
||||
tstl _C_LABEL(mmutype) | HP MMU?
|
||||
jeq Lhpmmu7 | yes, skip
|
||||
jpl Lmc68851c | 68851?
|
||||
pflush #4,#4 | flush supervisor TLB entries
|
||||
movl #DC_CLEAR,%d0
|
||||
movc %d0,%cacr | invalidate on-chip d-cache
|
||||
rts
|
||||
Lmc68851c:
|
||||
pflushs #4,#4 | flush supervisor TLB entries
|
||||
rts
|
||||
Lhpmmu7:
|
||||
#endif
|
||||
#if defined(M68K_MMU_HP)
|
||||
MMUADDR(%a0)
|
||||
movl #0x8000,%d0 | more
|
||||
movl %d0,%a0@(MMUTBINVAL) | HP magic
|
||||
#ifdef DEBUG
|
||||
tstl _ASM_LABEL(fullcflush)
|
||||
jne _C_LABEL(_DCIS) | XXX: invalidate entire sup. cache
|
||||
#endif
|
||||
#endif
|
||||
rts
|
||||
|
||||
/*
|
||||
* Invalidate user side of TLB
|
||||
*/
|
||||
ENTRY(TBIAU)
|
||||
#ifdef DEBUG
|
||||
tstl _ASM_LABEL(fulltflush) | being conservative?
|
||||
jne _C_LABEL(_TBIA) | yes, flush everything
|
||||
#endif
|
||||
#if defined(M68040)
|
||||
cmpl #MMU_68040,_C_LABEL(mmutype) | 68040?
|
||||
jne Lmotommu6 | no, skip
|
||||
.word 0xf518 | yes, pflusha (for now) XXX
|
||||
rts
|
||||
Lmotommu6:
|
||||
#endif
|
||||
#if defined(M68K_MMU_MOTOROLA)
|
||||
tstl _C_LABEL(mmutype) | HP MMU?
|
||||
jeq Lhpmmu8 | yes, skip
|
||||
jpl Lmc68851d | 68851?
|
||||
pflush #0,#4 | flush user TLB entries
|
||||
movl #DC_CLEAR,%d0
|
||||
movc %d0,%cacr | invalidate on-chip d-cache
|
||||
rts
|
||||
Lmc68851d:
|
||||
pflushs #0,#4 | flush user TLB entries
|
||||
rts
|
||||
Lhpmmu8:
|
||||
#endif
|
||||
#if defined(M68K_MMU_HP)
|
||||
MMUADDR(%a0)
|
||||
moveq #0,%d0 | more
|
||||
movl %d0,%a0@(MMUTBINVAL) | HP magic
|
||||
#ifdef DEBUG
|
||||
tstl _ASM_LABEL(fullcflush)
|
||||
jne _C_LABEL(_DCIU) | XXX: invalidate entire user cache
|
||||
#endif
|
||||
#endif
|
||||
rts
|
||||
|
||||
/*
|
||||
* Invalidate instruction cache
|
||||
*/
|
||||
ENTRY(ICIA)
|
||||
#if defined(M68040)
|
||||
ENTRY(ICPA)
|
||||
cmpl #MMU_68040,_C_LABEL(mmutype) | 68040
|
||||
jne Lmotommu7 | no, skip
|
||||
.word 0xf498 | cinva ic
|
||||
rts
|
||||
Lmotommu7:
|
||||
#endif
|
||||
movl #IC_CLEAR,%d0
|
||||
movc %d0,%cacr | invalidate i-cache
|
||||
rts
|
||||
|
||||
/*
|
||||
* Invalidate data cache.
|
||||
* HP external cache allows for invalidation of user/supervisor portions.
|
||||
* NOTE: we do not flush 68030 on-chip cache as there are no aliasing
|
||||
* problems with DC_WA. The only cases we have to worry about are context
|
||||
* switch and TLB changes, both of which are handled "in-line" in resume
|
||||
* and TBI*.
|
||||
*/
|
||||
ENTRY(DCIA)
|
||||
__DCIA:
|
||||
#if defined(M68040)
|
||||
cmpl #MMU_68040,_C_LABEL(mmutype) | 68040
|
||||
jne Lmotommu8 | no, skip
|
||||
/* XXX implement */
|
||||
rts
|
||||
Lmotommu8:
|
||||
#endif
|
||||
#if defined(M68K_MMU_HP)
|
||||
tstl _C_LABEL(ectype) | got external VAC?
|
||||
jle Lnocache2 | no, all done
|
||||
MMUADDR(%a0)
|
||||
andl #~MMU_CEN,%a0@(MMUCMD) | disable cache in MMU control reg
|
||||
orl #MMU_CEN,%a0@(MMUCMD) | reenable cache in MMU control reg
|
||||
Lnocache2:
|
||||
#endif
|
||||
rts
|
||||
|
||||
ENTRY(DCIS)
|
||||
_C_LABEL(_DCIS):
|
||||
#if defined(M68040)
|
||||
cmpl #MMU_68040,_C_LABEL(mmutype) | 68040
|
||||
jne Lmotommu9 | no, skip
|
||||
/* XXX implement */
|
||||
rts
|
||||
Lmotommu9:
|
||||
#endif
|
||||
#if defined(M68K_MMU_HP)
|
||||
tstl _C_LABEL(ectype) | got external VAC?
|
||||
jle Lnocache3 | no, all done
|
||||
MMUADDR(%a0)
|
||||
movl %a0@(MMUSSTP),%d0 | read the supervisor STP
|
||||
movl %d0,%a0@(MMUSSTP) | write it back
|
||||
Lnocache3:
|
||||
#endif
|
||||
rts
|
||||
|
||||
ENTRY(DCIU)
|
||||
_C_LABEL(_DCIU):
|
||||
#if defined(M68040)
|
||||
cmpl #MMU_68040,_C_LABEL(mmutype) | 68040
|
||||
jne LmotommuA | no, skip
|
||||
/* XXX implement */
|
||||
rts
|
||||
LmotommuA:
|
||||
#endif
|
||||
#if defined(M68K_MMU_HP)
|
||||
tstl _C_LABEL(ectype) | got external VAC?
|
||||
jle Lnocache4 | no, all done
|
||||
MMUADDR(%a0)
|
||||
movl %a0@(MMUUSTP),%d0 | read the user STP
|
||||
movl %d0,%a0@(MMUUSTP) | write it back
|
||||
Lnocache4:
|
||||
#endif
|
||||
rts
|
||||
|
||||
#if defined(M68040)
|
||||
ENTRY(ICPL)
|
||||
movl %sp@(4),%a0 | address
|
||||
.word 0xf488 | cinvl ic,%a0@
|
||||
rts
|
||||
ENTRY(ICPP)
|
||||
movl %sp@(4),%a0 | address
|
||||
.word 0xf490 | cinvp ic,%a0@
|
||||
rts
|
||||
ENTRY(DCPL)
|
||||
movl %sp@(4),%a0 | address
|
||||
.word 0xf448 | cinvl dc,%a0@
|
||||
rts
|
||||
ENTRY(DCPP)
|
||||
movl %sp@(4),%a0 | address
|
||||
.word 0xf450 | cinvp dc,%a0@
|
||||
rts
|
||||
ENTRY(DCPA)
|
||||
.word 0xf458 | cinva dc
|
||||
rts
|
||||
ENTRY(DCFL)
|
||||
movl %sp@(4),%a0 | address
|
||||
.word 0xf468 | cpushl dc,%a0@
|
||||
rts
|
||||
ENTRY(DCFP)
|
||||
movl %sp@(4),%a0 | address
|
||||
.word 0xf470 | cpushp dc,%a0@
|
||||
rts
|
||||
#endif
|
||||
|
||||
ENTRY(PCIA)
|
||||
#if defined(M68040)
|
||||
ENTRY(DCFA)
|
||||
cmpl #MMU_68040,_C_LABEL(mmutype) | 68040
|
||||
jne LmotommuB | no, skip
|
||||
.word 0xf478 | cpusha dc
|
||||
rts
|
||||
LmotommuB:
|
||||
#endif
|
||||
#if defined(M68K_MMU_MOTOROLA)
|
||||
movl #DC_CLEAR,%d0
|
||||
movc %d0,%cacr | invalidate on-chip d-cache
|
||||
#if defined(ENABLE_HP_CODE)
|
||||
tstl _C_LABEL(ectype) | got external PAC?
|
||||
jge Lnocache6 | no, all done
|
||||
MMUADDR(%a0)
|
||||
andl #~MMU_CEN,%a0@(MMUCMD) | disable cache in MMU control reg
|
||||
orl #MMU_CEN,%a0@(MMUCMD) | reenable cache in MMU control reg
|
||||
Lnocache6:
|
||||
#endif
|
||||
#endif
|
||||
rts
|
||||
|
||||
#endif /* }@@@ use m68k/cacheops.c */
|
||||
#if defined(ENABLE_HP_CODE)
|
||||
ENTRY(ecacheon)
|
||||
tstl _C_LABEL(ectype)
|
||||
|
Loading…
Reference in New Issue
Block a user