rtems: Add cache size functions

Add rtems_cache_get_data_cache_size() and
rtems_cache_get_instruction_cache_size().
This commit is contained in:
Sebastian Huber
2014-02-26 11:08:31 +01:00
parent e7549ff4a1
commit e1d7bf002e
4 changed files with 81 additions and 4 deletions

View File

@@ -160,6 +160,16 @@ rtems_cache_get_data_line_size( void )
}
size_t
rtems_cache_get_data_cache_size( uint32_t level )
{
#if defined(CPU_CACHE_SUPPORT_PROVIDES_CACHE_SIZE_FUNCTIONS)
return _CPU_cache_get_data_cache_size( level );
#else
return 0;
#endif
}
/*
* This function freezes the data cache; cache lines
* are not replaced.
@@ -275,6 +285,17 @@ rtems_cache_get_instruction_line_size( void )
}
size_t
rtems_cache_get_instruction_cache_size( uint32_t level )
{
#if defined(CPU_CACHE_SUPPORT_PROVIDES_CACHE_SIZE_FUNCTIONS)
return _CPU_cache_get_instruction_cache_size( level );
#else
return 0;
#endif
}
/*
* This function freezes the instruction cache; cache lines
* are not replaced.