dcache_sync(D3DK) —
.IX \f4dcache_sync\fP(D3DK)
NAME
dcache_sync − sync the data cache
SYNOPSIS
#include <sys/types.h>
#include <sys/buf.h>
#include <sys/iosystm.h>
void dcache_sync(paddr_t paddr int len);
ARGUMENTS
paddrthe physical address of the first location
lenthe number of bytes to be synced
DESCRIPTION
When the standard driver support routines that automatically sync the cache (for example, bp_iosetup) are not used, dcache_sync should be called to perform explicit cache sync operations if the target memory is not cache-inhibited.
If data is being written to a device, the data cache must be synced after a kernel write to device memory or before a write DMA transfer is initiated to ensure that the device will receive the non-stale data. Note that no other reads or writes should occur until the DMA transfer is completed.
If data is being read from a device, the data cache must be synced if any transferred data might be in the cache rather than in memory (that is, if the driver copied the data into the destination rather than using DMA).
On systems that implement bus snooping, dcache_sync has no effect.
RETURN VALUE
None.
LEVEL
Base, interrupt.
SEE ALSO
dcache_inval(D3DK)
DDI/DKI