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
46 * 6.0 mus 07/20/16 Added warning for ddrless HW design CR-954977
52 ******************************************************************************/
53 #include "xparameters.h"
59 .set reserved, 0x0 /* Fault*/
60 .set Memory, 0x405 | (3 << 8) | (0x0) /* normal writeback write allocate inner shared read write */
61 .set Device, 0x409 | (1 << 53)| (1 << 54) |(0x0) /* strongly ordered read write non executable*/
62 .section .mmu_tbl0,"a"
66 .set SECT, MMUTableL1 /* 0x0000_0000 - 0x7F_FFFF_FFFF */
68 .set SECT, MMUTableL1+0x1000 /* 0x80_0000_0000 - 0xFF_FFFF_FFFF */
71 .section .mmu_tbl1,"a"
75 .set SECT, MMUTableL2 /* 0x0000_0000 - 0x3FFF_FFFF */
76 .8byte SECT + 0x3 /* 1GB DDR */
78 .rept 0x3 /* 0x4000_0000 - 0xFFFF_FFFF */
79 .set SECT, SECT + 0x1000 /*1GB DDR, 1GB PL, 2GB other devices n memory */
84 .rept 0xC /* 0x0001_0000_0000 - 0x0003_FFFF_FFFF */
85 .8byte SECT + reserved /* 12GB Reserved */
86 .set SECT, SECT + 0x40000000
89 .rept 0x10 /* 0x0004_0000_0000 - 0x0007_FFFF_FFFF */
90 .8byte SECT + Device /* 8GB PL, 8GB PCIe */
91 .set SECT, SECT + 0x40000000
94 .rept 0x20 /* 0x0008_0000_0000 - 0x000F_FFFF_FFFF */
95 .8byte SECT + Memory /* 32GB DDR */
96 .set SECT, SECT + 0x40000000
99 .rept 0x1C0 /* 0x0010_0000_0000 - 0x007F_FFFF_FFFF */
100 .8byte SECT + Device /* 448 GB PL */
101 .set SECT, SECT + 0x40000000
105 .rept 0x100 /* 0x0080_0000_0000 - 0x00BF_FFFF_FFFF */
106 .8byte SECT + Device /* 256GB PCIe */
107 .set SECT, SECT + 0x40000000
111 .rept 0x100 /* 0x00C0_0000_0000 - 0x00FF_FFFF_FFFF */
112 .8byte SECT + reserved /* 256GB reserved */
113 .set SECT, SECT + 0x40000000
117 .section .mmu_tbl2,"a"
123 #ifdef XPAR_PSU_DDR_0_S_AXI_BASEADDR
124 .set DDR_START, XPAR_PSU_DDR_0_S_AXI_BASEADDR
125 .set DDR_END, XPAR_PSU_DDR_0_S_AXI_HIGHADDR
126 .set DDR_SIZE, (DDR_END - DDR_START)+1
127 .if DDR_SIZE > 0x80000000
128 /* If DDR size is larger than 2GB, truncate to 2GB */
131 .set DDR_REG, DDR_SIZE/0x200000
135 #warning "There's no DDR in the HW design. MMU translation table marks 2 GB DDR address space as undefined"
138 .set UNDEF_REG, 0x400 - DDR_REG
140 .rept DDR_REG /* DDR based on size in hdf*/
142 .set SECT, SECT+0x200000
145 .rept UNDEF_REG /* reserved for region where ddr is absent */
146 .8byte SECT + reserved
147 .set SECT, SECT+0x200000
150 .rept 0x0200 /* 0x8000_0000 - 0xBFFF_FFFF */
151 .8byte SECT + Device /* 1GB lower PL */
152 .set SECT, SECT+0x200000
155 .rept 0x0100 /* 0xC000_0000 - 0xDFFF_FFFF */
156 .8byte SECT + Device /* 512MB QSPI */
157 .set SECT, SECT+0x200000
160 .rept 0x080 /* 0xE000_0000 - 0xEFFF_FFFF */
161 .8byte SECT + Device /* 256MB lower PCIe */
162 .set SECT, SECT+0x200000
165 .rept 0x040 /* 0xF000_0000 - 0xF7FF_FFFF */
166 .8byte SECT + reserved /* 128MB Reserved */
167 .set SECT, SECT+0x200000
170 .rept 0x8 /* 0xF800_0000 - 0xF8FF_FFFF */
171 .8byte SECT + Device /* 16MB coresight */
172 .set SECT, SECT+0x200000
175 /* 1MB RPU LLP is marked for 2MB region as the minimum block size in
176 translation table is 2MB and adjacent 63MB reserved region is
179 .rept 0x1 /* 0xF900_0000 - 0xF91F_FFFF */
180 .8byte SECT + Device /* 2MB RPU low latency port */
181 .set SECT, SECT+0x200000
184 .rept 0x1F /* 0xF920_0000 - 0xFCFF_FFFF */
185 .8byte SECT + reserved /* 62MB Reserved */
186 .set SECT, SECT+0x200000
189 .rept 0x8 /* 0xFD00_0000 - 0xFDFF_FFFF */
190 .8byte SECT + Device /* 16MB FPS */
191 .set SECT, SECT+0x200000
194 .rept 0xE /* 0xFE00_0000 - 0xFFBF_FFFF */
195 .8byte SECT + Device /* 28MB LPS */
196 .set SECT, SECT+0x200000
199 /* 0xFFC0_0000 - 0xFFDF_FFFF */
200 .8byte SECT + Device /*2MB PMU/CSU */
202 .set SECT, SECT+0x200000 /* 0xFFE0_0000 - 0xFFFF_FFFF*/
203 .8byte SECT + Memory /*2MB OCM/TCM*/