blob: 0e07b1b7ce0fa1ddd2be295ff2a9d1e868c74fee [file] [log] [blame]
Lokesh Vutlae0918322018-08-27 15:57:13 +05301// SPDX-License-Identifier: GPL-2.0+
2/*
3 * K3: ARM64 MMU setup
4 *
Suman Anna7873e9d2020-08-17 18:15:09 -05005 * Copyright (C) 2018-2020 Texas Instruments Incorporated - https://www.ti.com/
Lokesh Vutlae0918322018-08-27 15:57:13 +05306 * Lokesh Vutla <lokeshvutla@ti.com>
Suman Anna7873e9d2020-08-17 18:15:09 -05007 * Suman Anna <s-anna@ti.com>
Michal Simek274ccb52019-01-17 08:22:43 +01008 * (This file is derived from arch/arm/mach-zynqmp/cpu.c)
Lokesh Vutlae0918322018-08-27 15:57:13 +05309 *
10 */
11
Lokesh Vutlae0918322018-08-27 15:57:13 +053012#include <asm/system.h>
13#include <asm/armv8/mmu.h>
14
Andrew Davis7c9c6e12023-11-28 11:05:28 -060015struct mm_region k3_mem_map[] = {
Lokesh Vutlae0918322018-08-27 15:57:13 +053016 {
17 .virt = 0x0UL,
18 .phys = 0x0UL,
19 .size = 0x80000000UL,
20 .attrs = PTE_BLOCK_MEMTYPE(MT_DEVICE_NGNRNE) |
21 PTE_BLOCK_NON_SHARE |
22 PTE_BLOCK_PXN | PTE_BLOCK_UXN
23 }, {
24 .virt = 0x80000000UL,
25 .phys = 0x80000000UL,
Andrew Davis4b4ebdb2023-11-28 11:05:26 -060026 .size = 0x1e780000UL,
Suman Anna60bdc6b2019-09-04 16:01:49 +053027 .attrs = PTE_BLOCK_MEMTYPE(MT_NORMAL) |
28 PTE_BLOCK_INNER_SHARE
29 }, {
30 .virt = 0xa0000000UL,
31 .phys = 0xa0000000UL,
Andrew Davisc90462e2023-11-28 11:05:27 -060032 .size = 0x60000000UL,
Lokesh Vutlae0918322018-08-27 15:57:13 +053033 .attrs = PTE_BLOCK_MEMTYPE(MT_NORMAL) |
34 PTE_BLOCK_INNER_SHARE
35 }, {
36 .virt = 0x880000000UL,
37 .phys = 0x880000000UL,
38 .size = 0x80000000UL,
39 .attrs = PTE_BLOCK_MEMTYPE(MT_NORMAL) |
40 PTE_BLOCK_INNER_SHARE
41 }, {
Vignesh Raghavendra8915a402020-02-04 11:09:49 +053042 .virt = 0x500000000UL,
43 .phys = 0x500000000UL,
Sekhar Nori22d238f2024-01-09 14:15:51 +053044 .size = 0x380000000UL,
Vignesh Raghavendra8915a402020-02-04 11:09:49 +053045 .attrs = PTE_BLOCK_MEMTYPE(MT_DEVICE_NGNRNE) |
46 PTE_BLOCK_NON_SHARE |
47 PTE_BLOCK_PXN | PTE_BLOCK_UXN
48 }, {
Lokesh Vutlae0918322018-08-27 15:57:13 +053049 /* List terminator */
50 0,
51 }
52};
53
Andrew Davis7c9c6e12023-11-28 11:05:28 -060054struct mm_region *mem_map = k3_mem_map;