1 |
786 |
skrzyp |
#ifndef CYGONCE_HAL_PLATFORM_EXTRAS_H
|
2 |
|
|
#define CYGONCE_HAL_PLATFORM_EXTRAS_H
|
3 |
|
|
|
4 |
|
|
/*=============================================================================
|
5 |
|
|
//
|
6 |
|
|
// hal_platform_extras.h
|
7 |
|
|
//
|
8 |
|
|
// Platform specific MMU table.
|
9 |
|
|
//
|
10 |
|
|
//=============================================================================
|
11 |
|
|
// ####ECOSGPLCOPYRIGHTBEGIN####
|
12 |
|
|
// -------------------------------------------
|
13 |
|
|
// This file is part of eCos, the Embedded Configurable Operating System.
|
14 |
|
|
// Copyright (C) 1998, 1999, 2000, 2001, 2002 Free Software Foundation, Inc.
|
15 |
|
|
//
|
16 |
|
|
// eCos is free software; you can redistribute it and/or modify it under
|
17 |
|
|
// the terms of the GNU General Public License as published by the Free
|
18 |
|
|
// Software Foundation; either version 2 or (at your option) any later
|
19 |
|
|
// version.
|
20 |
|
|
//
|
21 |
|
|
// eCos is distributed in the hope that it will be useful, but WITHOUT
|
22 |
|
|
// ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
23 |
|
|
// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
24 |
|
|
// for more details.
|
25 |
|
|
//
|
26 |
|
|
// You should have received a copy of the GNU General Public License
|
27 |
|
|
// along with eCos; if not, write to the Free Software Foundation, Inc.,
|
28 |
|
|
// 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
29 |
|
|
//
|
30 |
|
|
// As a special exception, if other files instantiate templates or use
|
31 |
|
|
// macros or inline functions from this file, or you compile this file
|
32 |
|
|
// and link it with other works to produce a work based on this file,
|
33 |
|
|
// this file does not by itself cause the resulting work to be covered by
|
34 |
|
|
// the GNU General Public License. However the source code for this file
|
35 |
|
|
// must still be made available in accordance with section (3) of the GNU
|
36 |
|
|
// General Public License v2.
|
37 |
|
|
//
|
38 |
|
|
// This exception does not invalidate any other reasons why a work based
|
39 |
|
|
// on this file might be covered by the GNU General Public License.
|
40 |
|
|
// -------------------------------------------
|
41 |
|
|
// ####ECOSGPLCOPYRIGHTEND####
|
42 |
|
|
//=============================================================================
|
43 |
|
|
//#####DESCRIPTIONBEGIN####
|
44 |
|
|
//
|
45 |
|
|
// Author(s): msalter
|
46 |
|
|
// Contributors: msalter
|
47 |
|
|
// Date: 2001-12-03
|
48 |
|
|
// Purpose: Intel XScale IQ80321 platform specific mmu table
|
49 |
|
|
// Description:
|
50 |
|
|
// Usage: #include <cyg/hal/hal_platform_extras.h>
|
51 |
|
|
// Only used by "vectors.S"
|
52 |
|
|
//
|
53 |
|
|
//####DESCRIPTIONEND####
|
54 |
|
|
//
|
55 |
|
|
//===========================================================================*/
|
56 |
|
|
|
57 |
|
|
#if defined(CYG_HAL_STARTUP_ROM)
|
58 |
|
|
.section .mmu_tables, "a"
|
59 |
|
|
|
60 |
|
|
#ifdef CYG_HAL_MEMORY_MAP_NORMAL
|
61 |
|
|
mmu_table:
|
62 |
|
|
// This page table sets up the preferred mapping:
|
63 |
|
|
//
|
64 |
|
|
// Virtual Address Physical Address Size (MB) Description
|
65 |
|
|
// --------------- ---------------- --------- -----------
|
66 |
|
|
// 0x00000000 0xA0000000 512 DRAM
|
67 |
|
|
// 0x20000000 0x00000000 2048 ATU Outbound Direct
|
68 |
|
|
// 0xA0000000 0x80000000 257 ATU Outbound Xlate
|
69 |
|
|
// 0xB0100000 0x90100000 255 Unused
|
70 |
|
|
// 0xC0000000 0xA0000000 512 Uncached DRAM alias
|
71 |
|
|
// 0xE0000000 0xE0000000 1 Cache Flush
|
72 |
|
|
// 0xE0100000 0xE0100000 255 Unused
|
73 |
|
|
// 0xF0000000 0xF0000000 8 FLASH (PBIU CS0)
|
74 |
|
|
// 0xF0800000 0xF0800000 224 Unused
|
75 |
|
|
// 0xFE800000 0xFE800000 1 PBIU CS1-CS5
|
76 |
|
|
// 0xFE900000 0xFE900000 22 Unused
|
77 |
|
|
// 0xFFF00000 0xFFF00000 1 Verde PMMR
|
78 |
|
|
|
79 |
|
|
// 512MB ECC DRAM
|
80 |
|
|
// In flash based table: X=1, C=1, B=1, ECC
|
81 |
|
|
.set __base,0xA00
|
82 |
|
|
.rept 0x200 - 0x000
|
83 |
|
|
FL_SECTION_ENTRY __base,1,3,1,0,1,1
|
84 |
|
|
.set __base,__base+1
|
85 |
|
|
.endr
|
86 |
|
|
|
87 |
|
|
// 2048MB ATU Outbound direct
|
88 |
|
|
// X=0, Non-cacheable, Non-bufferable
|
89 |
|
|
.set __base,0x000
|
90 |
|
|
.rept 0xA00 - 0x200
|
91 |
|
|
FL_SECTION_ENTRY __base,0,3,0,0,0,0
|
92 |
|
|
.set __base,__base+1
|
93 |
|
|
.endr
|
94 |
|
|
|
95 |
|
|
// 257MB ATU Outbound translation
|
96 |
|
|
// X=0, Non-cacheable, Non-bufferable
|
97 |
|
|
.rept 0xB01 - 0xA00
|
98 |
|
|
FL_SECTION_ENTRY __base,0,3,0,0,0,0
|
99 |
|
|
.set __base,__base+1
|
100 |
|
|
.endr
|
101 |
|
|
|
102 |
|
|
// Nothing here
|
103 |
|
|
.rept 0xC00 - 0xB01
|
104 |
|
|
FL_SECTION_ENTRY __base,0,0,0,0,0,0
|
105 |
|
|
.set __base,__base+1
|
106 |
|
|
.endr
|
107 |
|
|
|
108 |
|
|
// Uncached/unbuffered alias for 512MB ECC DRAM
|
109 |
|
|
.set __base,0xA00
|
110 |
|
|
.rept 0xE00 - 0xC00
|
111 |
|
|
FL_SECTION_ENTRY __base,0,3,1,0,0,0
|
112 |
|
|
.set __base,__base+1
|
113 |
|
|
.endr
|
114 |
|
|
|
115 |
|
|
// Cache flush region.
|
116 |
|
|
// Don't need physical memory, just a cached area.
|
117 |
|
|
.set __base,0xE00
|
118 |
|
|
.rept 0xE01 - 0xE00
|
119 |
|
|
FL_SECTION_ENTRY __base,1,3,0,0,1,1
|
120 |
|
|
.set __base,__base+1
|
121 |
|
|
.endr
|
122 |
|
|
|
123 |
|
|
// Nothing here
|
124 |
|
|
.rept 0xF00 - 0xE01
|
125 |
|
|
FL_SECTION_ENTRY __base,0,0,0,0,0,0
|
126 |
|
|
.set __base,__base+1
|
127 |
|
|
.endr
|
128 |
|
|
|
129 |
|
|
// 8MB of FLASH
|
130 |
|
|
// X=0, Cacheable, Non-bufferable
|
131 |
|
|
.rept 0xF08 - 0xF00
|
132 |
|
|
FL_SECTION_ENTRY __base,0,3,0,0,1,0
|
133 |
|
|
.set __base,__base+1
|
134 |
|
|
.endr
|
135 |
|
|
|
136 |
|
|
// Nothing here
|
137 |
|
|
.rept 0xFE8 - 0xF08
|
138 |
|
|
FL_SECTION_ENTRY __base,0,0,0,0,0,0
|
139 |
|
|
.set __base,__base+1
|
140 |
|
|
.endr
|
141 |
|
|
|
142 |
|
|
// PBIU CS1 - CS5
|
143 |
|
|
// X=0, Non-cacheable, Non-bufferable
|
144 |
|
|
.rept 0xFE9 - 0xFE8
|
145 |
|
|
FL_SECTION_ENTRY __base,0,3,0,0,0,0
|
146 |
|
|
.set __base,__base+1
|
147 |
|
|
.endr
|
148 |
|
|
|
149 |
|
|
// Nothing here
|
150 |
|
|
.rept 0xFFF - 0xFE9
|
151 |
|
|
FL_SECTION_ENTRY __base,0,0,0,0,0,0
|
152 |
|
|
.set __base,__base+1
|
153 |
|
|
.endr
|
154 |
|
|
|
155 |
|
|
// Verde PMMR
|
156 |
|
|
// X=0, Non-cacheable, Non-bufferable
|
157 |
|
|
.rept 0x1000 - 0xFFF
|
158 |
|
|
FL_SECTION_ENTRY __base,0,3,0,0,0,0
|
159 |
|
|
.set __base,__base+1
|
160 |
|
|
.endr
|
161 |
|
|
#else /* CYG_HAL_MEMORY_MAP_NORMAL */
|
162 |
|
|
mmu_table:
|
163 |
|
|
// This page table sets up an alternate mapping:
|
164 |
|
|
//
|
165 |
|
|
// Virtual Address Physical Address Size (MB) Description
|
166 |
|
|
// --------------- ---------------- --------- -----------
|
167 |
|
|
// 0x00000000 0xA0000000 1 DRAM
|
168 |
|
|
// 0x00100000 0x00100000 2047 ATU Outbound Direct
|
169 |
|
|
// 0x80000000 0x80000000 257 ATU Outbound Xlate
|
170 |
|
|
// 0x90100000 0x90100000 255 Invalid
|
171 |
|
|
// 0xA0000000 0xA0000000 512 DRAM
|
172 |
|
|
// 0xC0000000 0xA0000000 512 Uncached DRAM alias
|
173 |
|
|
// 0xE0000000 0xE0000000 1 Cache Flush
|
174 |
|
|
// 0xE0100000 0xE0100000 255 Invalid
|
175 |
|
|
// 0xF0000000 0xF0000000 8 FLASH (PBIU CS0)
|
176 |
|
|
// 0xF0800000 0xF0800000 224 Invalid
|
177 |
|
|
// 0xFE800000 0xFE800000 1 PBIU CS1-CS5
|
178 |
|
|
// 0xFE900000 0xFE900000 22 Invalid
|
179 |
|
|
// 0xFFF00000 0xFFF00000 1 Verde PMMR
|
180 |
|
|
|
181 |
|
|
// 1MB ECC DRAM
|
182 |
|
|
// This is a duplicate mapping of the first MB of RAM. It is mapped
|
183 |
|
|
// here for CPU exception vectors.
|
184 |
|
|
.set __base,0xA00
|
185 |
|
|
.rept 0x001 - 0x000
|
186 |
|
|
FL_SECTION_ENTRY __base,1,3,1,0,1,1
|
187 |
|
|
.set __base,__base+1
|
188 |
|
|
.endr
|
189 |
|
|
.set __base,0x001
|
190 |
|
|
|
191 |
|
|
// 2047MB ATU Outbound direct
|
192 |
|
|
// X=0, Non-cacheable, Non-bufferable
|
193 |
|
|
.rept 0x800 - 0x001
|
194 |
|
|
FL_SECTION_ENTRY __base,0,3,0,0,0,0
|
195 |
|
|
.set __base,__base+1
|
196 |
|
|
.endr
|
197 |
|
|
|
198 |
|
|
// 257MB ATU Outbound translation
|
199 |
|
|
// X=0, Non-cacheable, Non-bufferable
|
200 |
|
|
.rept 0x901 - 0x800
|
201 |
|
|
FL_SECTION_ENTRY __base,0,3,0,0,0,0
|
202 |
|
|
.set __base,__base+1
|
203 |
|
|
.endr
|
204 |
|
|
|
205 |
|
|
// Nothing here. Invalid.
|
206 |
|
|
.rept 0xA00 - 0x901
|
207 |
|
|
FL_SECTION_ENTRY __base,0,0,0,0,0,0
|
208 |
|
|
.set __base,__base+1
|
209 |
|
|
.endr
|
210 |
|
|
|
211 |
|
|
// 512MB ECC DRAM
|
212 |
|
|
// X=1, C=1, B=1, ECC
|
213 |
|
|
.rept 0xC00 - 0xA00
|
214 |
|
|
FL_SECTION_ENTRY __base,1,3,1,0,1,1
|
215 |
|
|
.set __base,__base+1
|
216 |
|
|
.endr
|
217 |
|
|
|
218 |
|
|
// Uncached/unbuffered alias for 512MB ECC DRAM
|
219 |
|
|
.set __base,0xA00
|
220 |
|
|
.rept 0xE00 - 0xC00
|
221 |
|
|
FL_SECTION_ENTRY __base,0,3,1,0,0,0
|
222 |
|
|
.set __base,__base+1
|
223 |
|
|
.endr
|
224 |
|
|
|
225 |
|
|
// Cache flush region.
|
226 |
|
|
// Don't need physical memory, just a cached area.
|
227 |
|
|
.set __base,0xE00
|
228 |
|
|
.rept 0xE01 - 0xE00
|
229 |
|
|
FL_SECTION_ENTRY __base,1,3,0,0,1,1
|
230 |
|
|
.set __base,__base+1
|
231 |
|
|
.endr
|
232 |
|
|
|
233 |
|
|
// Nothing here
|
234 |
|
|
.rept 0xF00 - 0xE01
|
235 |
|
|
FL_SECTION_ENTRY __base,0,0,0,0,0,0
|
236 |
|
|
.set __base,__base+1
|
237 |
|
|
.endr
|
238 |
|
|
|
239 |
|
|
// 8MB of FLASH
|
240 |
|
|
// X=0, Cacheable, Non-bufferable
|
241 |
|
|
.rept 0xF08 - 0xF00
|
242 |
|
|
FL_SECTION_ENTRY __base,0,3,0,0,1,0
|
243 |
|
|
.set __base,__base+1
|
244 |
|
|
.endr
|
245 |
|
|
|
246 |
|
|
// Nothing here
|
247 |
|
|
.rept 0xFE8 - 0xF08
|
248 |
|
|
FL_SECTION_ENTRY __base,0,0,0,0,0,0
|
249 |
|
|
.set __base,__base+1
|
250 |
|
|
.endr
|
251 |
|
|
|
252 |
|
|
// PBIU CS1 - CS5
|
253 |
|
|
// X=0, Non-cacheable, Non-bufferable
|
254 |
|
|
.rept 0xFE9 - 0xFE8
|
255 |
|
|
FL_SECTION_ENTRY __base,0,3,0,0,0,0
|
256 |
|
|
.set __base,__base+1
|
257 |
|
|
.endr
|
258 |
|
|
|
259 |
|
|
// Nothing here
|
260 |
|
|
.rept 0xFFF - 0xFE9
|
261 |
|
|
FL_SECTION_ENTRY __base,0,0,0,0,0,0
|
262 |
|
|
.set __base,__base+1
|
263 |
|
|
.endr
|
264 |
|
|
|
265 |
|
|
// Verde PMMR
|
266 |
|
|
// X=0, Non-cacheable, Non-bufferable
|
267 |
|
|
.rept 0x1000 - 0xFFF
|
268 |
|
|
FL_SECTION_ENTRY __base,0,3,0,0,0,0
|
269 |
|
|
.set __base,__base+1
|
270 |
|
|
.endr
|
271 |
|
|
#endif /* CYG_HAL_MEMORY_MAP_NORMAL */
|
272 |
|
|
|
273 |
|
|
|
274 |
|
|
#endif /* CYG_HAL_STARTUP_ROM */
|
275 |
|
|
|
276 |
|
|
/*---------------------------------------------------------------------------*/
|
277 |
|
|
/* end of hal_platform_setup.h */
|
278 |
|
|
#endif /* CYGONCE_HAL_PLATFORM_SETUP_H */
|