1 /******************************************************************************
3 * Copyright (C) 2014 - 2015 Xilinx, Inc. All rights reserved.
5 * Permission is hereby granted, free of charge, to any person obtaining a copy
6 * of this software and associated documentation files (the "Software"), to deal
7 * in the Software without restriction, including without limitation the rights
8 * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 * copies of the Software, and to permit persons to whom the Software is
10 * furnished to do so, subject to the following conditions:
12 * The above copyright notice and this permission notice shall be included in
13 * all copies or substantial portions of the Software.
15 * Use of the Software is limited solely to applications:
16 * (a) running on a Xilinx device, or
17 * (b) that interact with a Xilinx device through a bus or interconnect.
19 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
20 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
21 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
22 * XILINX BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
23 * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF
24 * OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
27 * Except as contained in this notice, the name of the Xilinx shall not be used
28 * in advertising or otherwise to promote the sale, use or other dealings in
29 * this Software without prior written authorization from Xilinx.
31 ******************************************************************************/
32 /*****************************************************************************/
34 * @file translation_table.s
36 * This file contains the initialization for the MMU table in RAM
37 * needed by the Cortex A53 processor
40 * MODIFICATION HISTORY:
42 * Ver Who Date Changes
43 * ----- ---- -------- ---------------------------------------------------
44 * 5.00 pkp 05/21/14 Initial version
45 * 5.04 pkp 12/18/15 Updated the address map according to proper address map
51 ******************************************************************************/
52 #include "xparameters.h"
58 .set reserved, 0x0 /* Fault*/
59 .set Memory, 0x405 | (3 << 8) | (0x0) /* normal writeback write allocate inner shared read write */
60 .set Device, 0x409 | (1 << 53)| (1 << 54) |(0x0) /* strongly ordered read write non executable*/
61 .section .mmu_tbl0,"a"
65 .set SECT, MMUTableL1 /* 0x0000_0000 - 0x7F_FFFF_FFFF */
67 .set SECT, MMUTableL1+0x1000 /* 0x80_0000_0000 - 0xFF_FFFF_FFFF */
70 .section .mmu_tbl1,"a"
74 .set SECT, MMUTableL2 /* 0x0000_0000 - 0x3FFF_FFFF */
75 .8byte SECT + 0x3 /* 1GB DDR */
77 .rept 0x3 /* 0x4000_0000 - 0xFFFF_FFFF */
78 .set SECT, SECT + 0x1000 /*1GB DDR, 1GB PL, 2GB other devices n memory */
83 .rept 0xC /* 0x0001_0000_0000 - 0x0003_FFFF_FFFF */
84 .8byte SECT + reserved /* 12GB Reserved */
85 .set SECT, SECT + 0x40000000
88 .rept 0x10 /* 0x0004_0000_0000 - 0x0007_FFFF_FFFF */
89 .8byte SECT + Device /* 8GB PL, 8GB PCIe */
90 .set SECT, SECT + 0x40000000
93 .rept 0x20 /* 0x0008_0000_0000 - 0x000F_FFFF_FFFF */
94 .8byte SECT + Memory /* 32GB DDR */
95 .set SECT, SECT + 0x40000000
98 .rept 0x1C0 /* 0x0010_0000_0000 - 0x007F_FFFF_FFFF */
99 .8byte SECT + Device /* 448 GB PL */
100 .set SECT, SECT + 0x40000000
104 .rept 0x100 /* 0x0080_0000_0000 - 0x00BF_FFFF_FFFF */
105 .8byte SECT + Device /* 256GB PCIe */
106 .set SECT, SECT + 0x40000000
110 .rept 0x100 /* 0x00C0_0000_0000 - 0x00FF_FFFF_FFFF */
111 .8byte SECT + reserved /* 256GB reserved */
112 .set SECT, SECT + 0x40000000
116 .section .mmu_tbl2,"a"
122 #ifdef XPAR_PSU_DDR_0_S_AXI_BASEADDR
123 .set DDR_START, XPAR_PSU_DDR_0_S_AXI_BASEADDR
124 .set DDR_END, XPAR_PSU_DDR_0_S_AXI_HIGHADDR
125 .set DDR_SIZE, (DDR_END - DDR_START)+1
126 .if DDR_SIZE > 0x80000000
127 /* If DDR size is larger than 2GB, truncate to 2GB */
130 .set DDR_REG, DDR_SIZE/0x200000
136 .set UNDEF_REG, 0x400 - DDR_REG
138 .rept DDR_REG /* DDR based on size in hdf*/
140 .set SECT, SECT+0x200000
143 .rept UNDEF_REG /* reserved for region where ddr is absent */
144 .8byte SECT + reserved
145 .set SECT, SECT+0x200000
148 .rept 0x0200 /* 0x8000_0000 - 0xBFFF_FFFF */
149 .8byte SECT + Device /* 1GB lower PL */
150 .set SECT, SECT+0x200000
153 .rept 0x0100 /* 0xC000_0000 - 0xDFFF_FFFF */
154 .8byte SECT + Device /* 512MB QSPI */
155 .set SECT, SECT+0x200000
158 .rept 0x080 /* 0xE000_0000 - 0xEFFF_FFFF */
159 .8byte SECT + Device /* 256MB lower PCIe */
160 .set SECT, SECT+0x200000
163 .rept 0x040 /* 0xF000_0000 - 0xF7FF_FFFF */
164 .8byte SECT + reserved /* 128MB Reserved */
165 .set SECT, SECT+0x200000
168 .rept 0x8 /* 0xF800_0000 - 0xF8FF_FFFF */
169 .8byte SECT + Device /* 16MB coresight */
170 .set SECT, SECT+0x200000
173 /* 1MB RPU LLP is marked for 2MB region as the minimum block size in
174 translation table is 2MB and adjacent 63MB reserved region is
177 .rept 0x1 /* 0xF900_0000 - 0xF91F_FFFF */
178 .8byte SECT + Device /* 2MB RPU low latency port */
179 .set SECT, SECT+0x200000
182 .rept 0x1F /* 0xF920_0000 - 0xFCFF_FFFF */
183 .8byte SECT + reserved /* 62MB Reserved */
184 .set SECT, SECT+0x200000
187 .rept 0x8 /* 0xFD00_0000 - 0xFDFF_FFFF */
188 .8byte SECT + Device /* 16MB FPS */
189 .set SECT, SECT+0x200000
192 .rept 0xE /* 0xFE00_0000 - 0xFFBF_FFFF */
193 .8byte SECT + Device /* 28MB LPS */
194 .set SECT, SECT+0x200000
197 /* 0xFFC0_0000 - 0xFFDF_FFFF */
198 .8byte SECT + Device /*2MB PMU/CSU */
200 .set SECT, SECT+0x200000 /* 0xFFE0_0000 - 0xFFFF_FFFF*/
201 .8byte SECT + Memory /*2MB OCM/TCM*/