# DC_LockdownRange

## C Specification

      #include <nitro/os.h>

      void DC_LockdownRange( const void* startAddr, u32 nBytes );

## Arguments

startAddr | Lowest address in the region to be locked down
nBytes | Number of bytes of the region to be locked down (maximum is 1 KB)

## Return Values

None.

## Description

Locks the contents of the data cache that is hit by the specified region so that it won't be discarded. However, because the cache is locked in blocks of 1 KB, each time this function is called, the area that can be used as cache is reduced by 1 KB, boosting the miss rate. The function can lock down a maximum of three blocks of data cache. `startAddr` is rounded down to the closest 32-byte boundary. `startAddr` + `nBytes` is rounded up to the closest 32-byte boundary.

## Internal Operation

Operates registers 7 and 9 of the system control coprocessor. While the specified data is being loaded into the cache, interrupts are disabled internally.

## See Also

`DC_TouchRange, DC_Unlockdown, DC_UnlockdownAll`

## Revision History

2005/11/14 Changed the type of startAddr to const void*
2005/01/21 Added a description the lockdown block.
2003/12/22 Initial release.

CONFIDENTIAL