# IC_LockdownRange

## Syntax

      #include <nitro/os.h>

      void IC_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 2 KB)

## Return Values

None.

## Description

This function locks the contents of the instruction cache that is hit by the specified region so that the cache won't be discarded.

However, because the cache is locked in blocks of 2KB, each time this function is called, the area that can be used as cache is reduced by 2KB, boosting the miss rate. The function can lock down a maximum of three blocks of instruction cache.

startAddr is rounded down to the closest 32-byte boundary. The sum of `startAddr` plus `nBytes` is rounded up to the closest 32-byte boundary.

## Internal Operation

This function operates registers 7 and 9 of the system control coprocessor.

While the specified data is being loaded into the cache, interrupts are disabled internally.

If this function is used, it will be assigned to ITCM.

## See Also

`IC_PrefetchRange
IC_Unlockdown
IC_UnlockdownAll`

## Revision History

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

CONFIDENTIAL