al - Audio Library Functions gDP - DP GBI Macros gdSP - General GBI Macros gSP - SP GBI Macros gt - Turbo Microcode RDP gu - Graphics Utilities Math - Math Functions nuSys - NuSystem os - N64 Operating System sp - Sprite Library Functions uh - Host to Target IO 64DD - N64 Disk Drive
|
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
|