RTEMS  5.1
alt_cache.h
Go to the documentation of this file.
1 
7 /******************************************************************************
8  *
9  * Copyright 2013 Altera Corporation. All Rights Reserved.
10  *
11  * Redistribution and use in source and binary forms, with or without
12  * modification, are permitted provided that the following conditions are met:
13  *
14  * 1. Redistributions of source code must retain the above copyright notice,
15  * this list of conditions and the following disclaimer.
16  *
17  * 2. Redistributions in binary form must reproduce the above copyright notice,
18  * this list of conditions and the following disclaimer in the documentation
19  * and/or other materials provided with the distribution.
20  *
21  * 3. The name of the author may not be used to endorse or promote products
22  * derived from this software without specific prior written permission.
23  *
24  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDER "AS IS" AND ANY EXPRESS OR
25  * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
26  * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE DISCLAIMED. IN NO
27  * EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
28  * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
29  * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
30  * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
31  * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
32  * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY
33  * OF SUCH DAMAGE.
34  *
35  ******************************************************************************/
36 
37 #ifndef __ALT_CACHE_H__
38 #define __ALT_CACHE_H__
39 
40 #include "hwlib.h"
41 
42 #ifdef __cplusplus
43 extern "C"
44 {
45 #endif
46 
115 #ifndef ALT_CACHE_SUPPORT_NON_FLAT_VIRTUAL_MEMORY
116 #define ALT_CACHE_SUPPORT_NON_FLAT_VIRTUAL_MEMORY (0)
117 #endif
118 
122 #define ALT_CACHE_LINE_SIZE 32
123 
135 
146 
179 ALT_STATUS_CODE alt_cache_system_invalidate(void * vaddress, size_t length);
180 
213 ALT_STATUS_CODE alt_cache_system_clean(void * vaddress, size_t length);
214 
249 ALT_STATUS_CODE alt_cache_system_purge(void * vaddress, size_t length);
250 
292 
306 
316 
324 
333 
348 
359 
370 
379 
399 ALT_STATUS_CODE alt_cache_l1_data_invalidate(void * vaddress, size_t length);
400 
414 
434 ALT_STATUS_CODE alt_cache_l1_data_clean(void * vaddress, size_t length);
435 
443 
468 ALT_STATUS_CODE alt_cache_l1_data_purge(void * vaddress, size_t length);
469 
477 
511 
519 
530 
542 
553 
563 
572 
585 
593 
602 
642 
650 
663 
676 
687 
714 
722 
733 
744 
755 
763 bool alt_cache_l2_is_enabled(void);
764 
773 
794 ALT_STATUS_CODE alt_cache_l2_invalidate(void * paddress, size_t length);
795 
809 
829 ALT_STATUS_CODE alt_cache_l2_clean(void * paddress, size_t length);
830 
841 
861 ALT_STATUS_CODE alt_cache_l2_purge(void * paddress, size_t length);
862 
873 
879 {
882 
885 
888 
891 
894 
897 
900 
903 
906 };
907 typedef enum ALT_CACHE_L2_INTERRUPT_e ALT_CACHE_L2_INTERRUPT_t;
908 
920 ALT_STATUS_CODE alt_cache_l2_int_enable(uint32_t interrupt);
921 
933 ALT_STATUS_CODE alt_cache_l2_int_disable(uint32_t interrupt);
934 
942 uint32_t alt_cache_l2_int_status_get(void);
943 
957 
966 #ifdef __cplusplus
967 }
968 #endif
969 
970 #endif /* __ALT_CACHE_H__ */
bool alt_cache_l1_data_is_enabled(void)
ALT_STATUS_CODE alt_cache_system_disable(void)
Definition: alt_cache.h:893
ALT_STATUS_CODE alt_cache_l1_disable_all(void)
ALT_STATUS_CODE alt_cache_system_enable(void)
ALT_STATUS_CODE alt_cache_l2_int_disable(uint32_t interrupt)
ALT_STATUS_CODE alt_cache_l2_enable(void)
ALT_STATUS_CODE alt_cache_system_purge(void *vaddress, size_t length)
ALT_STATUS_CODE alt_cache_l2_init(void)
ALT_STATUS_CODE alt_cache_l2_int_enable(uint32_t interrupt)
Definition: alt_cache.h:896
bool alt_cache_l1_prefetch_is_enabled(void)
ALT_STATUS_CODE alt_cache_l2_uninit(void)
ALT_STATUS_CODE alt_cache_l1_parity_enable(void)
Definition: alt_cache.h:884
ALT_STATUS_CODE alt_cache_l2_parity_enable(void)
ALT_STATUS_CODE alt_cache_l1_data_clean(void *vaddress, size_t length)
ALT_STATUS_CODE alt_cache_system_clean(void *vaddress, size_t length)
ALT_STATUS_CODE alt_cache_l1_branch_invalidate(void)
bool alt_cache_l2_prefetch_is_enabled(void)
ALT_STATUS_CODE alt_cache_l1_data_disable(void)
Definition: alt_cache.h:899
Definition: alt_cache.h:902
ALT_STATUS_CODE alt_cache_l2_disable(void)
ALT_STATUS_CODE alt_cache_l1_data_invalidate_all(void)
ALT_STATUS_CODE alt_cache_l1_instruction_enable(void)
ALT_STATUS_CODE alt_cache_l2_int_status_clear(uint32_t interrupt)
ALT_STATUS_CODE alt_cache_l1_branch_enable(void)
bool alt_cache_l2_is_enabled(void)
ALT_STATUS_CODE alt_cache_l2_clean_all(void)
ALT_STATUS_CODE alt_cache_l2_parity_disable(void)
ALT_STATUS_CODE alt_cache_l2_prefetch_disable(void)
ALT_STATUS_CODE alt_cache_l2_sync(void)
ALT_STATUS_CODE alt_cache_l1_branch_disable(void)
Definition: alt_cache.h:881
ALT_STATUS_CODE alt_cache_l1_prefetch_enable(void)
ALT_STATUS_CODE alt_cache_l1_data_purge_all(void)
Definition: alt_cache.h:890
Definition: alt_cache.h:887
bool alt_cache_l1_branch_is_enabled(void)
ALT_STATUS_CODE alt_cache_l1_prefetch_disable(void)
ALT_STATUS_CODE alt_cache_l2_clean(void *paddress, size_t length)
ALT_STATUS_CODE alt_cache_l1_data_enable(void)
ALT_STATUS_CODE alt_cache_l1_enable_all(void)
ALT_STATUS_CODE alt_cache_l2_purge_all(void)
ALT_STATUS_CODE alt_cache_l1_instruction_invalidate(void)
int32_t ALT_STATUS_CODE
Definition: hwlib.h:60
ALT_STATUS_CODE alt_cache_l1_data_clean_all(void)
ALT_STATUS_CODE alt_cache_l2_invalidate_all(void)
ALT_CACHE_L2_INTERRUPT_e
Definition: alt_cache.h:878
ALT_STATUS_CODE alt_cache_l1_instruction_disable(void)
bool alt_cache_l2_parity_is_enabled(void)
ALT_STATUS_CODE alt_cache_l2_invalidate(void *paddress, size_t length)
ALT_STATUS_CODE alt_cache_l1_data_purge(void *vaddress, size_t length)
bool alt_cache_l1_instruction_is_enabled(void)
ALT_STATUS_CODE alt_cache_l2_purge(void *paddress, size_t length)
ALT_STATUS_CODE alt_cache_system_invalidate(void *vaddress, size_t length)
bool alt_cache_l1_parity_is_enabled(void)
uint32_t alt_cache_l2_int_status_get(void)
ALT_STATUS_CODE alt_cache_l2_prefetch_enable(void)
ALT_STATUS_CODE alt_cache_l1_data_invalidate(void *vaddress, size_t length)
Definition: alt_cache.h:905
ALT_STATUS_CODE alt_cache_l1_parity_disable(void)