When doing the cacheflush for MIPS1, adjust the length to account for
an unaligned buffer. The last word of the buffer was not getting flushed if the buffer was unaligned and fit in a single DMA segment. Now dump(8) works on both MIPS1 and MIPS3 DECstations.
This commit is contained in:
parent
392621627b
commit
d458239a94
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: asc_ioasic.c,v 1.22 2000/09/28 03:11:29 mhitch Exp $ */
|
||||
/* $NetBSD: asc_ioasic.c,v 1.23 2000/11/05 21:02:13 mhitch Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright 1996 The Board of Trustees of The Leland Stanford
|
||||
|
@ -174,7 +174,8 @@ asic_dma_start(asc, state, cp, flag, len, off)
|
|||
/* If not R4K, need to invalidate cache lines for both physical segments */
|
||||
if (!CPUISMIPS3 && flag == ASCDMA_READ) {
|
||||
MachFlushDCache(MIPS_PHYS_TO_KSEG0(phys),
|
||||
nphys == 0xffffffff ? len : NBPG - (phys & (NBPG - 1)));
|
||||
nphys == 0xffffffff ? len + ((vaddr_t)cp & 7) :
|
||||
NBPG - (phys & (NBPG - 1)));
|
||||
if (nphys != 0xffffffff)
|
||||
MachFlushDCache(MIPS_PHYS_TO_KSEG0(nphys),
|
||||
NBPG); /* XXX */
|
||||
|
|
Loading…
Reference in New Issue