N64® Functions Menu

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

Nintendo® Confidential

   

OS_DCACHE_ROUNDUP_ADDR OS_DCACHE_ROUNDUP_SIZE

Format
#include <ultra64.h>
void *OS_DCACHE_ROUNDUP_ADDR(void *vaddr);
u32 OS_DCACHE_ROUNDUP_SIZE(u32 nbytes);


What This Function Does
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



Nintendo® Confidential

Warning: all information in this document is confidential and covered by a non-disclosure agreement. You are responsible for keeping this information confidential and protected. Nintendo will vigorously enforce this responsibility.


Copyright © 1998
Nintendo of America Inc. All rights reserved
Nintendo and N64 are registered trademarks of Nintendo
Last updated January 1998