RTEMS 6.1-rc1
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
43extern "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
179ALT_STATUS_CODE alt_cache_system_invalidate(void * vaddress, size_t length);
180
213ALT_STATUS_CODE alt_cache_system_clean(void * vaddress, size_t length);
214
249ALT_STATUS_CODE alt_cache_system_purge(void * vaddress, size_t length);
250
292
306
316
324
333
348
359
370
379
399ALT_STATUS_CODE alt_cache_l1_data_invalidate(void * vaddress, size_t length);
400
414
434ALT_STATUS_CODE alt_cache_l1_data_clean(void * vaddress, size_t length);
435
443
468ALT_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
764
773
794ALT_STATUS_CODE alt_cache_l2_invalidate(void * paddress, size_t length);
795
809
829ALT_STATUS_CODE alt_cache_l2_clean(void * paddress, size_t length);
830
841
861ALT_STATUS_CODE alt_cache_l2_purge(void * paddress, size_t length);
862
873
879{
882
885
888
891
894
897
900
903
907typedef enum ALT_CACHE_L2_INTERRUPT_e ALT_CACHE_L2_INTERRUPT_t;
908
921
934
943
957
966#ifdef __cplusplus
967}
968#endif
969
970#endif /* __ALT_CACHE_H__ */
ALT_STATUS_CODE alt_cache_l1_prefetch_disable(void)
ALT_STATUS_CODE alt_cache_l1_disable_all(void)
bool alt_cache_l1_data_is_enabled(void)
bool alt_cache_l1_instruction_is_enabled(void)
bool alt_cache_l1_prefetch_is_enabled(void)
ALT_STATUS_CODE alt_cache_l1_instruction_enable(void)
ALT_STATUS_CODE alt_cache_l1_branch_enable(void)
ALT_STATUS_CODE alt_cache_l1_parity_enable(void)
ALT_STATUS_CODE alt_cache_l1_data_invalidate(void *vaddress, size_t length)
ALT_STATUS_CODE alt_cache_l1_parity_disable(void)
ALT_STATUS_CODE alt_cache_l1_data_invalidate_all(void)
ALT_STATUS_CODE alt_cache_l1_data_clean_all(void)
ALT_STATUS_CODE alt_cache_l1_instruction_disable(void)
ALT_STATUS_CODE alt_cache_l1_prefetch_enable(void)
ALT_STATUS_CODE alt_cache_l1_data_enable(void)
bool alt_cache_l1_branch_is_enabled(void)
ALT_STATUS_CODE alt_cache_l1_branch_invalidate(void)
ALT_STATUS_CODE alt_cache_l1_data_clean(void *vaddress, size_t length)
ALT_STATUS_CODE alt_cache_l1_data_purge_all(void)
bool alt_cache_l1_parity_is_enabled(void)
ALT_STATUS_CODE alt_cache_l1_instruction_invalidate(void)
ALT_STATUS_CODE alt_cache_l1_data_purge(void *vaddress, size_t length)
ALT_STATUS_CODE alt_cache_l1_data_disable(void)
ALT_STATUS_CODE alt_cache_l1_branch_disable(void)
ALT_STATUS_CODE alt_cache_l1_enable_all(void)
ALT_STATUS_CODE alt_cache_l2_parity_enable(void)
ALT_STATUS_CODE alt_cache_l2_clean_all(void)
ALT_STATUS_CODE alt_cache_l2_invalidate_all(void)
ALT_STATUS_CODE alt_cache_l2_prefetch_enable(void)
uint32_t alt_cache_l2_int_status_get(void)
ALT_STATUS_CODE alt_cache_l2_prefetch_disable(void)
ALT_STATUS_CODE alt_cache_l2_clean(void *paddress, size_t length)
bool alt_cache_l2_prefetch_is_enabled(void)
ALT_STATUS_CODE alt_cache_l2_purge(void *paddress, size_t length)
ALT_STATUS_CODE alt_cache_l2_purge_all(void)
ALT_STATUS_CODE alt_cache_l2_int_enable(uint32_t interrupt)
bool alt_cache_l2_is_enabled(void)
ALT_STATUS_CODE alt_cache_l2_uninit(void)
ALT_STATUS_CODE alt_cache_l2_parity_disable(void)
ALT_CACHE_L2_INTERRUPT_e
Definition: alt_cache.h:879
ALT_STATUS_CODE alt_cache_l2_invalidate(void *paddress, size_t length)
ALT_STATUS_CODE alt_cache_l2_init(void)
ALT_STATUS_CODE alt_cache_l2_enable(void)
ALT_STATUS_CODE alt_cache_l2_int_status_clear(uint32_t interrupt)
ALT_STATUS_CODE alt_cache_l2_disable(void)
ALT_STATUS_CODE alt_cache_l2_int_disable(uint32_t interrupt)
ALT_STATUS_CODE alt_cache_l2_sync(void)
bool alt_cache_l2_parity_is_enabled(void)
@ ALT_CACHE_L2_INTERRUPT_PARRD
Definition: alt_cache.h:899
@ ALT_CACHE_L2_INTERRUPT_ERRWD
Definition: alt_cache.h:893
@ ALT_CACHE_L2_INTERRUPT_ERRRD
Definition: alt_cache.h:887
@ ALT_CACHE_L2_INTERRUPT_ERRRT
Definition: alt_cache.h:890
@ ALT_CACHE_L2_INTERRUPT_PARRT
Definition: alt_cache.h:902
@ ALT_CACHE_L2_INTERRUPT_SLVERR
Definition: alt_cache.h:884
@ ALT_CACHE_L2_INTERRUPT_DECERR
Definition: alt_cache.h:881
@ ALT_CACHE_L2_INTERRUPT_ERRWT
Definition: alt_cache.h:896
@ ALT_CACHE_L2_INTERRUPT_ECNTR
Definition: alt_cache.h:905
ALT_STATUS_CODE alt_cache_system_disable(void)
ALT_STATUS_CODE alt_cache_system_invalidate(void *vaddress, size_t length)
ALT_STATUS_CODE alt_cache_system_enable(void)
ALT_STATUS_CODE alt_cache_system_purge(void *vaddress, size_t length)
ALT_STATUS_CODE alt_cache_system_clean(void *vaddress, size_t length)
int32_t ALT_STATUS_CODE
Definition: hwlib.h:60