OpenCores
URL https://opencores.org/ocsvn/openrisc_me/openrisc_me/trunk

Subversion Repositories openrisc_me

[/] [openrisc/] [trunk/] [rtos/] [ecos-2.0/] [packages/] [hal/] [m68k/] [mcf52xx/] [var/] [v2_0/] [include/] [var_cache.h] - Blame information for rev 174

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 27 unneback
#ifndef CYGONCE_VAR_CACHE_H
2
#define CYGONCE_VAR_CACHE_H
3
//=============================================================================
4
//
5
//      var_cache.h
6
//
7
//      Variant HAL cache control API
8
//
9
//=============================================================================
10
//####ECOSGPLCOPYRIGHTBEGIN####
11
// -------------------------------------------
12
// This file is part of eCos, the Embedded Configurable Operating System.
13
// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
14
//
15
// eCos is free software; you can redistribute it and/or modify it under
16
// the terms of the GNU General Public License as published by the Free
17
// Software Foundation; either version 2 or (at your option) any later version.
18
//
19
// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
20
// WARRANTY; without even the implied warranty of MERCHANTABILITY or
21
// FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
22
// for more details.
23
//
24
// You should have received a copy of the GNU General Public License along
25
// with eCos; if not, write to the Free Software Foundation, Inc.,
26
// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
27
//
28
// As a special exception, if other files instantiate templates or use macros
29
// or inline functions from this file, or you compile this file and link it
30
// with other works to produce a work based on this file, this file does not
31
// by itself cause the resulting work to be covered by the GNU General Public
32
// License. However the source code for this file must still be made available
33
// in accordance with section (3) of the GNU General Public License.
34
//
35
// This exception does not invalidate any other reasons why a work based on
36
// this file might be covered by the GNU General Public License.
37
//
38
// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
39
// at http://sources.redhat.com/ecos/ecos-license/
40
// -------------------------------------------
41
//####ECOSGPLCOPYRIGHTEND####
42
//=============================================================================
43
 
44
#include <pkgconf/hal.h>
45
#include <cyg/infra/cyg_type.h>
46
 
47
//      We currently just enable the  instruction cache on startup.  There  is
48
// no data cache.
49
 
50
//-----------------------------------------------------------------------------
51
// Cache dimensions - these vary between the 8xx sub-models
52
 
53
// Data cache
54
#define HAL_DCACHE_SIZE                 0       // Size of data cache in bytes
55
#define HAL_DCACHE_LINE_SIZE            0       // Size of a data cache line
56
#define HAL_DCACHE_WAYS                 1       // Associativity of the cache
57
 
58
// Instruction cache
59
#define HAL_ICACHE_SIZE                 0       // Size of cache in bytes
60
#define HAL_ICACHE_LINE_SIZE            0       // Size of a cache line
61
#define HAL_ICACHE_WAYS                 1       // Associativity of the cache
62
 
63
#define HAL_DCACHE_SETS (HAL_DCACHE_SIZE/(HAL_DCACHE_LINE_SIZE*HAL_DCACHE_WAYS))
64
#define HAL_ICACHE_SETS (HAL_ICACHE_SIZE/(HAL_ICACHE_LINE_SIZE*HAL_ICACHE_WAYS))
65
 
66
//-----------------------------------------------------------------------------
67
// Global control of data cache
68
 
69
// Enable the data cache
70
#define HAL_DCACHE_ENABLE()
71
 
72
// Disable the data cache
73
#define HAL_DCACHE_DISABLE()
74
 
75
// Invalidate the entire cache
76
// Note: Any locked lines will not be invalidated.
77
#define HAL_DCACHE_INVALIDATE_ALL()
78
 
79
// Synchronize the contents of the cache with memory.
80
#define HAL_DCACHE_SYNC()
81
 
82
// Query the state of the data cache
83
#define HAL_DCACHE_IS_ENABLED(_state_)
84
 
85
// Set the data cache refill burst size
86
//#define HAL_DCACHE_BURST_SIZE(_size_)
87
 
88
// Set the data cache write mode
89
//#define HAL_DCACHE_WRITE_MODE( _mode_ )
90
 
91
//#define HAL_DCACHE_WRITETHRU_MODE       0
92
//#define HAL_DCACHE_WRITEBACK_MODE       1
93
 
94
 
95
// Load the contents of the given address range into the data cache
96
// and then lock the cache so that it stays there.
97
#define HAL_DCACHE_LOCK(_base_, _size_)
98
 
99
// Undo a previous lock operation
100
#define HAL_DCACHE_UNLOCK(_base_, _size_)
101
 
102
// Unlock entire cache
103
#define HAL_DCACHE_UNLOCK_ALL()
104
 
105
//-----------------------------------------------------------------------------
106
// Data cache line control
107
 
108
// Allocate cache lines for the given address range without reading its
109
// contents from memory.
110
//#define HAL_DCACHE_ALLOCATE( _base_ , _size_ )
111
 
112
// Write dirty cache lines to memory and invalidate the cache entries
113
// for the given address range.
114
#define HAL_DCACHE_FLUSH( _base_ , _size_ )
115
 
116
// Invalidate cache lines in the given range without writing to memory.
117
#define HAL_DCACHE_INVALIDATE( _base_ , _size_ )
118
 
119
// Write dirty cache lines to memory for the given address range.
120
#define HAL_DCACHE_STORE( _base_ , _size_ )
121
 
122
// Preread the given range into the cache with the intention of reading
123
// from it later.
124
#define HAL_DCACHE_READ_HINT( _base_ , _size_ )
125
 
126
// Preread the given range into the cache with the intention of writing
127
// to it later.
128
#define HAL_DCACHE_WRITE_HINT( _base_ , _size_ )
129
 
130
// Allocate and zero the cache lines associated with the given range.
131
#define HAL_DCACHE_ZERO( _base_ , _size_ )
132
 
133
//-----------------------------------------------------------------------------
134
// Global control of Instruction cache
135
 
136
// Enable the instruction cache
137
#define HAL_ICACHE_ENABLE()
138
 
139
// Disable the instruction cache
140
#define HAL_ICACHE_DISABLE()
141
 
142
// Invalidate the entire cache
143
#define HAL_ICACHE_INVALIDATE_ALL()
144
 
145
// Synchronize the contents of the cache with memory.
146
#define HAL_ICACHE_SYNC()
147
 
148
// Query the state of the instruction cache
149
#define HAL_ICACHE_IS_ENABLED(_state_)
150
 
151
// Set the instruction cache refill burst size
152
//#define HAL_ICACHE_BURST_SIZE(_size_)
153
 
154
 
155
// Load the contents of the given address range into the instruction cache
156
// and then lock the cache so that it stays there.
157
#define HAL_ICACHE_LOCK(_base_, _size_)
158
 
159
// Undo a previous lock operation
160
#define HAL_ICACHE_UNLOCK(_base_, _size_)
161
 
162
// Unlock entire cache
163
#define HAL_ICACHE_UNLOCK_ALL()
164
 
165
//-----------------------------------------------------------------------------
166
// Instruction cache line control
167
 
168
// Invalidate cache lines in the given range without writing to memory.
169
//#define HAL_ICACHE_INVALIDATE( _base_ , _size_ )
170
 
171
//-----------------------------------------------------------------------------
172
#endif // ifndef CYGONCE_VAR_CACHE_H
173
// End of var_cache.h
174
 

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.