| #ifndef _H_CACHE_OPS_H_ |
| #define _H_CACHE_OPS_H_ |
| |
| #include "predefines.h" |
| |
| /** |
| * Function: l1_icache_invalidate_all |
| * Description: Invalidate entire L1 I cache to point of unification |
| * This has an effect only on the processor that performs the operation. |
| * Argument: None |
| * Return: None |
| **/ |
| extern void l1_icache_invalidate_all(void); |
| |
| /** |
| * Function: l1_dcache_clean_range |
| * Description: Clean L1 D cache line range by MVA to point of coherency |
| * Argument: start_mva: start address, byteNum: range length |
| * Return: None |
| **/ |
| void l1_dcache_clean_range(UINT_T start_mva, UINT_T byteNum); |
| |
| /** |
| * Function: l1_dcache_invalidate_range |
| * Description: Invalidate L1 D cache line range by MVA to point of coherency |
| * Argument: start_mva: start address, byteNum: range length |
| * Return: None |
| **/ |
| void l1_dcache_invalidate_range(UINT_T start_mva, UINT_T byteNum); |
| |
| /** |
| * Function: l1_dcache_clean_invalidate_range |
| * Description: Flush (clean and invalidate) L1 D cache line range by MVA to point of coherency |
| * Argument: start_mva: start address, byteNum: range length |
| * Return: None |
| **/ |
| void l1_dcache_clean_invalidate_range(UINT_T start_mva, UINT_T byteNum); |
| |
| |
| /** |
| * Function: dcache_clean_invalidate_all |
| * Description: Flush(clean and invalidate) entire L1 D cache and L2 cache |
| * Argument: set_way: set index |
| * Return: None |
| **/ |
| extern void dcache_clean_invalidate_all(void); |
| |
| /** |
| * Function: dcache_clean_all |
| * Description: Clean entire L1 D cache and L2 cache |
| * Argument: set_way: set index |
| * Return: None |
| **/ |
| extern void dcache_clean_all(void); |
| |
| /** |
| * Function: dcache_invalidate_all |
| * Description: Invalidate entire L1 D cache and L2 cache |
| * Argument: set_way: set index |
| * Return: None |
| **/ |
| extern void dcache_invalidate_all(void); |
| |
| /** |
| * Function: dcache_clean_invalidate_range |
| * Description: Flush (clean and invalidate) L1 D cache & L2 cache line range by MVA |
| * Argument: start_mva: start address, byteNum: range length |
| * Return: None |
| **/ |
| #define dcache_clean_invalidate_range l1_dcache_clean_invalidate_range |
| |
| /** |
| * Function: dcache_clean_range |
| * Description: Clean L1 D cache & L2 cache line range by MVA |
| * Argument: start_mva: start address, byteNum: range length |
| * Return: None |
| **/ |
| #define dcache_clean_range l1_dcache_clean_range |
| |
| /** |
| * Function: dcache_invalidate_range |
| * Description: Invalidate L1 D cache & L2 cache line range by MVA |
| * Argument: start_mva: start address, byteNum: range length |
| * Return: None |
| **/ |
| #define dcache_invalidate_range l1_dcache_invalidate_range |
| |
| /** |
| * Function: l1_icache_enable |
| * Description: Enable L1 D Cache |
| * Argument: None |
| * Return: None |
| **/ |
| extern void l1_icache_enable(void); |
| |
| /** |
| * Function: l1_dcache_enable |
| * Description: Enable L1 I Cache |
| * Argument: None |
| * Return: None |
| **/ |
| extern void l1_dcache_enable(void); |
| |
| /** |
| * Function: enable_caches |
| * Description: Enable L1 I & D cache |
| * Argument: None |
| * Return: None |
| **/ |
| extern void enable_caches(void); |
| |
| |
| /** |
| * Function: dcache_disable |
| * Description: Disable D cache |
| * Argument: None |
| * Return: None |
| **/ |
| extern void dcache_disable(void); |
| |
| /** |
| * Function: l1_icache_disable |
| * Description: Disable L1 I cache |
| * Argument: None |
| * Return: None |
| **/ |
| extern void l1_icache_disable(void); |
| |
| #endif |