![]() |
![]() |
![]() |
![]() |
![]() |
|||||||||||||||||||||||||
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]()
|
![]() |
OS_DCACHE_ROUNDUP_ADDR OS_DCACHE_ROUNDUP_SIZESyntax#include <ultra64.h> void *OS_DCACHE_ROUNDUP_ADDR(void *vaddr); u32 OS_DCACHE_ROUNDUP_SIZE(u32 nbytes); Explanation OS_DCACHE_ROUNDUP_ADDR is a cpp(1) macro that rounds up an address to an alignment matching that of the R4300 data-cache line size (16 bytes). Similarly, the OS_DCACHE_ROUNDUP_SIZE macro rounds up an integer value to the data-cache line size. You can apply these macros on an address range given to an agent external to the CPU (such as the PI, SP, or DP) that modifies physical memory directly. If the affected memory region is not cache-aligned, there exists the possibility that a CPU program variable may also share the data-cache line. During normal operation of the CPU cache, the data cache line may be written back and overwrite the data written by the external agent. See Also osPiRawStartDma osPiStartDma osSpTaskLoad osDpSetNextBuffer
|