RTEMS 6.1-rc2
Loading...
Searching...
No Matches
xil_cache.h
Go to the documentation of this file.
1/******************************************************************************
2* Copyright (c) 2009 - 2021 Xilinx, Inc. All rights reserved.
3* SPDX-License-Identifier: MIT
4******************************************************************************/
5
6/*****************************************************************************/
44#ifndef XIL_CACHE_H
45#define XIL_CACHE_H
46
47#if defined XENV_VXWORKS
48/* VxWorks environment */
49#error "Unknown processor / architecture. Must be PPC for VxWorks."
50#else
51/* standalone environment */
52
53#include "mb_interface.h"
54#include "xil_types.h"
55#include "xparameters.h"
56
57#ifdef __cplusplus
58extern "C" {
59#endif
60
61/****************************************************************************/
72#define Xil_L1DCacheInvalidate() microblaze_invalidate_dcache()
73
74/****************************************************************************/
84#define Xil_L2CacheInvalidate() microblaze_invalidate_cache_ext()
85
86/****************************************************************************/
101#define Xil_L1DCacheInvalidateRange(Addr, Len) \
102 microblaze_invalidate_dcache_range((Addr), (Len))
103
104/****************************************************************************/
119#define Xil_L2CacheInvalidateRange(Addr, Len) \
120 microblaze_invalidate_cache_ext_range((Addr), (Len))
121
122/****************************************************************************/
135#if (XPAR_MICROBLAZE_DCACHE_USE_WRITEBACK == 1)
136# define Xil_L1DCacheFlushRange(Addr, Len) \
137 microblaze_flush_dcache_range((Addr), (Len))
138#else
139# define Xil_L1DCacheFlushRange(Addr, Len) \
140 microblaze_invalidate_dcache_range((Addr), (Len))
141#endif /* XPAR_MICROBLAZE_DCACHE_USE_WRITEBACK */
142
143/****************************************************************************/
156#define Xil_L2CacheFlushRange(Addr, Len) \
157 microblaze_flush_cache_ext_range((Addr), (Len))
158
159/****************************************************************************/
168#if (XPAR_MICROBLAZE_DCACHE_USE_WRITEBACK == 1)
169# define Xil_L1DCacheFlush() microblaze_flush_dcache()
170#else
171# define Xil_L1DCacheFlush() microblaze_invalidate_dcache()
172#endif /* XPAR_MICROBLAZE_DCACHE_USE_WRITEBACK */
173
174/****************************************************************************/
183#define Xil_L2CacheFlush() microblaze_flush_cache_ext()
184
185/****************************************************************************/
196#define Xil_L1ICacheInvalidateRange(Addr, Len) \
197 microblaze_invalidate_icache_range((Addr), (Len))
198
199/****************************************************************************/
207#define Xil_L1ICacheInvalidate() \
208 microblaze_invalidate_icache()
209
210
211/****************************************************************************/
221#define Xil_L1DCacheEnable() \
222 microblaze_enable_dcache()
223
224/****************************************************************************/
234#define Xil_L1DCacheDisable() \
235 microblaze_disable_dcache()
236
237/****************************************************************************/
247#define Xil_L1ICacheEnable() \
248 microblaze_enable_icache()
249
250/****************************************************************************/
260#define Xil_L1ICacheDisable() \
261 microblaze_disable_icache()
262
263/****************************************************************************/
271#define Xil_DCacheEnable() Xil_L1DCacheEnable()
272
273/****************************************************************************/
282#define Xil_ICacheEnable() Xil_L1ICacheEnable()
283
284/****************************************************************************/
292#define Xil_DCacheInvalidate() \
293 Xil_L2CacheInvalidate(); \
294 Xil_L1DCacheInvalidate();
295
296
297/****************************************************************************/
313#define Xil_DCacheInvalidateRange(Addr, Len) \
314 Xil_L2CacheInvalidateRange((Addr), (Len)); \
315 Xil_L1DCacheInvalidateRange((Addr), (Len));
316
317
318/****************************************************************************/
326#define Xil_DCacheFlush() \
327 Xil_L2CacheFlush(); \
328 Xil_L1DCacheFlush();
329
330/****************************************************************************/
344#define Xil_DCacheFlushRange(Addr, Len) \
345 Xil_L2CacheFlushRange((Addr), (Len)); \
346 Xil_L1DCacheFlushRange((Addr), (Len));
347
348
349/****************************************************************************/
356#define Xil_ICacheInvalidate() \
357 Xil_L2CacheInvalidate(); \
358 Xil_L1ICacheInvalidate();
359
360
361/****************************************************************************/
376#define Xil_ICacheInvalidateRange(Addr, Len) \
377 Xil_L2CacheInvalidateRange((Addr), (Len)); \
378 Xil_L1ICacheInvalidateRange((Addr), (Len));
379
380void Xil_DCacheDisable(void);
381void Xil_ICacheDisable(void);
382
383#ifdef __cplusplus
384}
385#endif
386
387#endif
388
389#endif
void Xil_ICacheDisable(void)
Disable the instruction cache.
Definition: xil_cache.c:594
void Xil_DCacheDisable(void)
Disable the Data cache.
Definition: xil_cache.c:127