forked from Imagelibrary/rtems
rtems: Add cache size functions
Add rtems_cache_get_data_cache_size() and rtems_cache_get_instruction_cache_size().
This commit is contained in:
@@ -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.
|
||||
|
||||
Reference in New Issue
Block a user