ABS Tech Note: AWS25 Flushing the 68040 Cache From UNIX (6/94)

This Technical Note describes an interface which can be used for flushing data and instruction caches from a UNIX process.

The following interface ONLY works on 68040 platform and supported on A/UX 3.1 and earlier versions.

_sysm68k(command, vaddr, scope, caches, size)
command = 105
vaddr = beginning address of lines or pages to be flushed
(if the address is not aligned on the appropriate
boundary, the entire line or page that encompasses the
address will be flushed).
scope = 1,2,3
1 = flush 'count' lines
2 = flush 'count' pages
3 = flush all (count and vaddr not meaningful)
caches = 1,2,3
1 = flush the data cache
2 = flush the instruction cache
3 = flush both caches
size = number of bytes to flush

In the following code fragment, the programmer is flushing both the data and instruction caches at the specified address with the specific length.

void cache_flush (addr, len)
caddr_t addr;
size_t len;
{
_sysm68k(105,addr,3,3,len);
}


Support Information Services


Published Date: Feb 19, 2012