source: rtems/cpukit/rtems/include/rtems/rtems/cache.h @ 61b8e9f

4.115
Last change on this file since 61b8e9f was 61b8e9f, checked in by Ayush Awasthi <kolaveridi87@…>, on 01/04/13 at 15:29:06

rtems: Doxygen Clean Up Task #1

  • Property mode set to 100644
File size: 4.2 KB
Line 
1/**
2 * @file rtems/rtems/cache.h
3 *
4 * @defgroup ClassicCache Cache
5 *
6 * @ingroup ClassicRTEMS
7 * @brief Cache Manager
8 *
9 * Functionality Associated with the Cache Manager
10 */
11
12/* COPYRIGHT (c) 1989-2008.
13 * On-Line Applications Research Corporation (OAR).
14 *
15 * The license and distribution terms for this file may be
16 * found in the file LICENSE in this distribution or at
17 * http://www.rtems.com/license/LICENSE.
18 *
19 *
20 * The functions in this file define the API to the RTEMS Cache Manager and
21 * are divided into data cache and instruction cache functions. Data cache
22 * functions are only meaningful if a data cache is supported. Instruction
23 * cache functions are only meaningful if an instruction cache is supported.
24 *
25 * The functions below are implemented with CPU dependent support routines
26 * implemented as part of libcpu. In the event that a CPU does not support a
27 * specific function, the CPU dependent routine does nothing (but does exist).
28 *
29 * At this point, the Cache Manager makes no considerations, and provides no
30 * support for BSP specific issues such as a secondary cache. In such a system,
31 * the CPU dependent routines would have to be modified, or a BSP layer added
32 * to this Manager.
33 */
34
35#ifndef _RTEMS_RTEMS_CACHE_H
36#define _RTEMS_RTEMS_CACHE_H
37
38#ifdef __cplusplus
39extern "C" {
40#endif
41
42#include <rtems/system.h>
43#include <sys/types.h>
44
45/**
46 *  @defgroup ClassicCache Cache
47 *
48 *  @ingroup ClassicRTEMS
49 *
50 *  This encapsulates functionality which XXX
51 */
52/**@{*/
53
54/*
55 *  These functions will ONLY do something if the
56 *  libcpu support includes data cache routines AND
57 *  the CPU model supports data caching.
58 */
59
60/**
61 * This function is called to flush the data cache by performing cache
62 * copybacks. It must determine how many cache lines need to be copied
63 * back and then perform the copybacks.
64 */
65void rtems_cache_flush_multiple_data_lines( const void *, size_t );
66
67/**
68 * This function is responsible for performing a data cache invalidate.
69 * It must determine how many cache lines need to be invalidated and then
70 * perform the invalidations.
71 */
72void rtems_cache_invalidate_multiple_data_lines( const void *, size_t );
73
74/**
75 * This function is responsible for performing a data cache flush.
76 * It flushes the entire cache.
77 */
78void rtems_cache_flush_entire_data( void );
79
80/**
81 * This function is responsible for performing a data cache
82 * invalidate. It invalidates the entire cache.
83 */
84void rtems_cache_invalidate_entire_data( void );
85
86/**
87 * This function returns the data cache granularity.
88 */
89int rtems_cache_get_data_line_size( void );
90
91/**
92 * This function freezes the data cache.
93 */
94void rtems_cache_freeze_data( void );
95
96/**
97 * This function unfreezes the data cache.
98 */
99void rtems_cache_unfreeze_data( void );
100
101/**
102 * This function enables the data cache.
103 */
104void rtems_cache_enable_data( void );
105
106/**
107 * This function disables the data cache.
108 */
109void rtems_cache_disable_data( void );
110
111/**
112 *  These functions will ONLY do something if the
113 *  libcpu support includes instruction cache routines AND
114 *  the CPU model supports instruction caching.
115 */
116
117/**
118 * This function is responsible for performing an instruction cache
119 * invalidate. It must determine how many cache lines need to be invalidated
120 * and then perform the invalidations.
121 */
122void rtems_cache_invalidate_multiple_instruction_lines( const void *, size_t );
123
124/**
125 * This function is responsible for performing an instruction cache
126 * invalidate. It invalidates the entire cache.
127 */
128void rtems_cache_invalidate_entire_instruction( void );
129
130/**
131 * This function returns the instruction cache granularity.
132 */
133int rtems_cache_get_instruction_line_size( void );
134
135/**
136 * This function freezes the instruction cache.
137 */
138void rtems_cache_freeze_instruction( void );
139
140/**
141 * This function unfreezes the instruction cache.
142 */
143void rtems_cache_unfreeze_instruction( void );
144
145/**
146 * This function enables the instruction cache.
147 */
148void rtems_cache_enable_instruction( void );
149
150/**
151 * This function disables the instruction cache.
152 */
153void rtems_cache_disable_instruction( void );
154
155/**
156 *  This function is used to allocate storage that spans an
157 *  integral number of cache blocks.
158 */
159void *rtems_cache_aligned_malloc ( size_t nbytes );
160
161#ifdef __cplusplus
162}
163#endif
164
165/**@}*/
166
167#endif
168/* end of include file */
Note: See TracBrowser for help on using the repository browser.