bsps: Rework cache manager implementation

The previous cache manager support used a single souce file
(cache_manager.c) which included an implementation header (cache_.h).
This required the use of specialized include paths to find the right
header file.  Change this to include a generic implementation header
(cacheimpl.h) in specialized source files.

Use the following directories and files:

* bsps/shared/cache

* bsps/@RTEMS_CPU@/shared/cache

* bsps/@RTEMS_CPU@/@RTEMS_BSP_FAMILY/start/cache.c

Update #3285.
This commit is contained in:
Sebastian Huber
2018-01-27 14:37:51 +01:00
parent d8d6a08d46
commit 4cf93658ef
133 changed files with 382 additions and 1032 deletions

View File

@@ -1,43 +0,0 @@
/*
* COPYRIGHT (c) 2014 Hesham ALMatary <heshamelmatary@gmail.com>
*
* The license and distribution terms for this file may be
* found in the file LICENSE in this distribution or at
* http://www.rtems.org/license/LICENSE.
*/
#ifndef LIBBSP_OR1K_SHARED_CACHE_H
#define LIBBSP_OR1K_SHARED_CACHE_H
#include <assert.h>
#include <bsp.h>
#include <rtems/rtems/intr.h>
#ifdef __cplusplus
extern "C" {
#endif /* __cplusplus */
/* These two defines also ensure that the rtems_cache_* functions have bodies */
#define CPU_DATA_CACHE_ALIGNMENT 32
#define CPU_INSTRUCTION_CACHE_ALIGNMENT 32
#define CPU_CACHE_SUPPORT_PROVIDES_CACHE_SIZE_FUNCTIONS 1
static inline size_t
_CPU_cache_get_data_cache_size( const uint32_t level )
{
return (level == 0 || level == 1)? 8192 : 0;
}
static inline size_t
_CPU_cache_get_instruction_cache_size( const uint32_t level )
{
return (level == 0 || level == 1)? 8192 : 0;
}
#ifdef __cplusplus
}
#endif /* __cplusplus */
#endif /* LIBBSP_OR1K_SHARED_CACHE_H */