LCEnableDMA

Syntax

#include <cafe/os.h>
    
BOOL LCEnableDMA( void );

Parameters

None.

Return Values

TRUE is return on success. FALSE on failure.

Description

Enables the calling thread to perform locked-cache DMA.

A thread doing DMA cannot migrate to another core. LCEnableDMA validates that the current thread has core affinity only for the core that it is currently executing on.

DMA transactions are not cache-coherent. Before performing DMAs, the data may need to be flushed or invalidated from the L1d-L2 cache hierarchy.

Test for a locked cache DMA completion by checking the locked-cache DMA queue length (for example, LCWaitDMAQueue). When there are multiple locked-cache DMA requests between different execution contexts (threads) is it difficult to track a context's lock-cache DMA completion. This function is an attempt to reduce this complexity with a somewhat stricter execution model.

Since the OS wants to use locked-cache DMA to optimize some core OS functions, a defined function helps to coordinate locked-cache DMA usage between the OS and an application.

Do Not Call From

Background, Cores 0 & 1 In applications, do not call this function from Core 0 or 1 when in the background.
Callbacks Do not call this function from any callback function.

See Also

LCAlloc
LCDealloc
LCDisableDMA
LCGetAllocatableSize
LCGetDMAQueueLength
LCGetMaxSize
LCGetUnallocated
LCHardwareIsAvailable
LCIsDMAEnabled
LCLoadDMABlocks
LCStoreDMABlocks
LCWaitDMAQueue

Revision History

2013-05-08 Automated cleanup pass.
2012-05-08 Updated LCAlloc and LCDealloc. Added LCGetAllocatableSize. Removed LCLoadDMAASync and LCStoreDMAASync.
2012-05-08 Added LCHardwareIsAvailable.
2011-03-15 Initial version.


CONFIDENTIAL