LCLoadBlocks

Syntax

#include <revolution/os.h>

void LCLoadBlocks(void* destTag, void* srcAddr, u32 numBlocks);

Arguments

destTag Start address for the locked cache region to be copied to. Must be 32-byte aligned.
srcAddr Start address for data in main memory to be copied to destAddr. Must be 32-byte aligned.
numBlocks Transfer size. (Number of cache blocks.) Must be specified as a value between 0 to 127. If 0 is specified, the transaction size used is 128 blocks (4KB).

Return Values

None.

Description

Enqueues a single DMA transaction to transfer data to locked cache at destTag from main memory at srcAddr. This function is more efficient than calling the LCLoadData function, but has a maximum transaction limit of 128 cache blocks (4 KB) and performs no error checking. Addresses are assumed to be 32-byte aligned, and numBlocks takes a value from 0 to 127. Note that a value of zero for numBlocks indicates a transaction size of 128 blocks.The range of valid transfer addresses is the 16KB region starting at the value returned by the LCGetBase function.

The only methods to determine whether the transaction has completed is to poll the length of the DMA queue with the LCQueueLength function or to wait until the queue length reaches a fixed value with the LCQueueWait function. See the example in LCStoreBlocks in the Function Reference.

Note that a maximum of 15 DMA transactions can be issued in the DMA queue. If the queue overflows, a machine check exception occurs.

The locked cache must be enabled, or else a machine check exception will occur during the DMA.

If DMA detects a destination address in normal cache, a machine check exception will occur.

See Also

Cache Functions, LCEnable, LCStoreBlocks, LCLoadData, LCQueueLength, LCQueueWait

Revision History

2006/03/01 Initial version.


CONFIDENTIAL