RTEMS
cache.h
Go to the documentation of this file.
1 /* SPDX-License-Identifier: BSD-2-Clause */
2 
11 /*
12  * Copyright (C) 2014, 2020 embedded brains GmbH (http://www.embedded-brains.de)
13  * Copyright (C) 1988, 2008 On-Line Applications Research Corporation (OAR)
14  *
15  * Redistribution and use in source and binary forms, with or without
16  * modification, are permitted provided that the following conditions
17  * are met:
18  * 1. Redistributions of source code must retain the above copyright
19  * notice, this list of conditions and the following disclaimer.
20  * 2. Redistributions in binary form must reproduce the above copyright
21  * notice, this list of conditions and the following disclaimer in the
22  * documentation and/or other materials provided with the distribution.
23  *
24  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
25  * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
26  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
27  * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
28  * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
29  * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
30  * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
31  * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
32  * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
33  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
34  * POSSIBILITY OF SUCH DAMAGE.
35  */
36 
37 /*
38  * Do not manually edit this file. It is part of the RTEMS quality process
39  * and was automatically generated.
40  *
41  * If you find something that needs to be fixed or worded better please
42  * post a report to an RTEMS mailing list or raise a bug report:
43  *
44  * https://docs.rtems.org/branches/master/user/support/bugs.html
45  *
46  * For information on updating and regenerating please refer to:
47  *
48  * https://docs.rtems.org/branches/master/eng/req/howto.html
49  */
50 
51 /* Generated from spec:/rtems/cache/if/header */
52 
53 #ifndef _RTEMS_RTEMS_CACHE_H
54 #define _RTEMS_RTEMS_CACHE_H
55 
56 #include <stddef.h>
57 #include <stdint.h>
58 
59 #ifdef __cplusplus
60 extern "C" {
61 #endif
62 
63 /* Generated from spec:/rtems/cache/if/group */
64 
74 /* Generated from spec:/rtems/cache/if/aligned-malloc */
75 
83 void *rtems_cache_aligned_malloc( size_t nbytes );
84 
85 /* Generated from spec:/rtems/cache/if/coherent-add-area */
86 
96 void rtems_cache_coherent_add_area( void *area_begin, uintptr_t area_size );
97 
98 /* Generated from spec:/rtems/cache/if/coherent-allocate */
99 
112  size_t size,
113  uintptr_t alignment,
114  uintptr_t boundary
115 );
116 
117 /* Generated from spec:/rtems/cache/if/coherent-free */
118 
126 void rtems_cache_coherent_free( void *ptr );
127 
128 /* Generated from spec:/rtems/cache/if/disable-data */
129 
135 void rtems_cache_disable_data( void );
136 
137 /* Generated from spec:/rtems/cache/if/disable-instruction */
138 
145 
146 /* Generated from spec:/rtems/cache/if/enable-data */
147 
153 void rtems_cache_enable_data( void );
154 
155 /* Generated from spec:/rtems/cache/if/enable-instruction */
156 
162 void rtems_cache_enable_instruction( void );
163 
164 /* Generated from spec:/rtems/cache/if/flush-entire-data */
165 
171 void rtems_cache_flush_entire_data( void );
172 
173 /* Generated from spec:/rtems/cache/if/flush-multiple-data-lines */
174 
184 void rtems_cache_flush_multiple_data_lines( const void *addr, size_t size );
185 
186 /* Generated from spec:/rtems/cache/if/freeze-data */
187 
193 void rtems_cache_freeze_data( void );
194 
195 /* Generated from spec:/rtems/cache/if/freeze-instruction */
196 
202 void rtems_cache_freeze_instruction( void );
203 
204 /* Generated from spec:/rtems/cache/if/get-data-line-size */
205 
211 size_t rtems_cache_get_data_line_size( void );
212 
213 /* Generated from spec:/rtems/cache/if/get-data-size */
214 
222 size_t rtems_cache_get_data_cache_size( uint32_t level );
223 
224 /* Generated from spec:/rtems/cache/if/get-instruction-line-size */
225 
232 
233 /* Generated from spec:/rtems/cache/if/get-instruction-size */
234 
242 size_t rtems_cache_get_instruction_cache_size( uint32_t level );
243 
244 /* Generated from spec:/rtems/cache/if/get-maximal-line-size */
245 
251 size_t rtems_cache_get_maximal_line_size( void );
252 
253 /* Generated from spec:/rtems/cache/if/instruction-sync-after-code-change */
254 
265  const void *code_addr,
266  size_t n_bytes
267 );
268 
269 /* Generated from spec:/rtems/cache/if/invalidate-entire-data */
270 
277 
278 /* Generated from spec:/rtems/cache/if/invalidate-entire-instruction */
279 
286 
287 /* Generated from spec:/rtems/cache/if/invalidate-multiple-data-lines */
288 
299  const void *addr,
300  size_t size
301 );
302 
303 /* Generated from spec:/rtems/cache/if/invalidate-multiple-instruction-lines */
304 
315  const void *addr,
316  size_t size
317 );
318 
319 /* Generated from spec:/rtems/cache/if/unfreeze-data */
320 
326 void rtems_cache_unfreeze_data( void );
327 
328 /* Generated from spec:/rtems/cache/if/unfreeze-instruction */
329 
336 
337 #ifdef __cplusplus
338 }
339 #endif
340 
341 #endif /* _RTEMS_RTEMS_CACHE_H */
void rtems_cache_invalidate_multiple_instruction_lines(const void *addr, size_t size)
%
Definition: cacheimpl.h:344
void rtems_cache_coherent_add_area(void *area_begin, uintptr_t area_size)
%
size_t rtems_cache_get_data_cache_size(uint32_t level)
%
Definition: cacheimpl.h:216
size_t rtems_cache_get_maximal_line_size(void)
%
Definition: cacheimpl.h:435
size_t rtems_cache_get_instruction_line_size(void)
%
Definition: cacheimpl.h:380
void rtems_cache_instruction_sync_after_code_change(const void *code_addr, size_t n_bytes)
%
Definition: cacheimpl.h:465
void rtems_cache_disable_instruction(void)
%
Definition: cacheimpl.h:427
void rtems_cache_unfreeze_data(void)
%
Definition: cacheimpl.h:237
size_t rtems_cache_get_instruction_cache_size(uint32_t level)
%
Definition: cacheimpl.h:390
void rtems_cache_flush_entire_data(void)
%
Definition: cacheimpl.h:176
void rtems_cache_freeze_data(void)
%
Definition: cacheimpl.h:230
void rtems_cache_enable_data(void)
%
Definition: cacheimpl.h:245
void rtems_cache_invalidate_entire_data(void)
%
Definition: cacheimpl.h:191
void * rtems_cache_aligned_malloc(size_t nbytes)
%
void rtems_cache_invalidate_multiple_data_lines(const void *addr, size_t size)
%
Definition: cacheimpl.h:143
void rtems_cache_coherent_free(void *ptr)
%
size_t rtems_cache_get_data_line_size(void)
%
Definition: cacheimpl.h:206
void * rtems_cache_coherent_allocate(size_t size, uintptr_t alignment, uintptr_t boundary)
%
void rtems_cache_unfreeze_instruction(void)
%
Definition: cacheimpl.h:411
void rtems_cache_freeze_instruction(void)
%
Definition: cacheimpl.h:404
void rtems_cache_invalidate_entire_instruction(void)
%
Definition: cacheimpl.h:365
void rtems_cache_disable_data(void)
%
Definition: cacheimpl.h:254
void rtems_cache_enable_instruction(void)
%
Definition: cacheimpl.h:419
void rtems_cache_flush_multiple_data_lines(const void *addr, size_t size)
%
Definition: cacheimpl.h:109