3.2.5. cache_find_set

Returns the set index associated with a specified address in the cache.

Syntax:

int cache_find_set (isInstruction, cacheLevel, addr)
int isInstruction;
int cacheLevel;
ADDRESS addr;

where:

isInstruction

Identifies the type of cache to be searched:

1

Search the instruction cache.

0

Search the data cache.

cacheLevel

The cache level to search.

On the ARM1136 and ARM1156, only level 1 cache is accessible.

On the Cortex-A8, both level 1 and 2 caches are accessible.

addr

The address to find.

Description

Returns the set index associated with a specified address in the cache. This macro is supported on the following processors:

  • ARM1136 (only when the MMU is disabled)

  • ARM1156

  • Cortex-A8.

Return value

The return value is one of the following:

  • The set index, starting at zero.

  • -1 if the given address is not found.

  • -2 if the operation is not possible.

Example

To search the level 1 data cache on the Cortex-A8 for the set index associated with address S:0x00032F48, enter:

> ce cache_find_set(0, 1, S:0x00032F48)
  Result is: 61  0x0000003D  '='

See also

Copyright © 2002-2011 ARM. All rights reserved.ARM DUI 0175N
Non-ConfidentialID052111