Dan Handley | 9df4804 | 2015-03-19 18:58:55 +0000 | [diff] [blame] | 1 | /* |
Sandrine Bailleux | 4a1267a | 2016-05-18 16:11:47 +0100 | [diff] [blame] | 2 | * Copyright (c) 2015-2016, ARM Limited and Contributors. All rights reserved. |
Dan Handley | 9df4804 | 2015-03-19 18:58:55 +0000 | [diff] [blame] | 3 | * |
dp-arm | fa3cf0b | 2017-05-03 09:38:09 +0100 | [diff] [blame] | 4 | * SPDX-License-Identifier: BSD-3-Clause |
Dan Handley | 9df4804 | 2015-03-19 18:58:55 +0000 | [diff] [blame] | 5 | */ |
| 6 | #include <arm_def.h> |
| 7 | #include <plat_arm.h> |
| 8 | |
| 9 | /* |
Sandrine Bailleux | 4a1267a | 2016-05-18 16:11:47 +0100 | [diff] [blame] | 10 | * Table of memory regions for different BL stages to map using the MMU. |
| 11 | * This doesn't include Trusted SRAM as arm_setup_page_tables() already |
| 12 | * takes care of mapping it. |
Dan Handley | 9df4804 | 2015-03-19 18:58:55 +0000 | [diff] [blame] | 13 | */ |
Masahiro Yamada | 441bfdd | 2016-12-25 23:36:24 +0900 | [diff] [blame] | 14 | #ifdef IMAGE_BL1 |
Dan Handley | 9df4804 | 2015-03-19 18:58:55 +0000 | [diff] [blame] | 15 | const mmap_region_t plat_arm_mmap[] = { |
| 16 | ARM_MAP_SHARED_RAM, |
Juan Castillo | b6132f1 | 2015-10-06 14:01:35 +0100 | [diff] [blame] | 17 | V2M_MAP_FLASH0_RO, |
Dan Handley | 9df4804 | 2015-03-19 18:58:55 +0000 | [diff] [blame] | 18 | V2M_MAP_IOFPGA, |
| 19 | CSS_MAP_DEVICE, |
| 20 | SOC_CSS_MAP_DEVICE, |
Yatharth Kochar | 736a3bf | 2015-10-11 14:14:55 +0100 | [diff] [blame] | 21 | #if TRUSTED_BOARD_BOOT |
| 22 | ARM_MAP_NS_DRAM1, |
| 23 | #endif |
Dan Handley | 9df4804 | 2015-03-19 18:58:55 +0000 | [diff] [blame] | 24 | {0} |
| 25 | }; |
| 26 | #endif |
Masahiro Yamada | 441bfdd | 2016-12-25 23:36:24 +0900 | [diff] [blame] | 27 | #ifdef IMAGE_BL2 |
Dan Handley | 9df4804 | 2015-03-19 18:58:55 +0000 | [diff] [blame] | 28 | const mmap_region_t plat_arm_mmap[] = { |
| 29 | ARM_MAP_SHARED_RAM, |
Juan Castillo | b6132f1 | 2015-10-06 14:01:35 +0100 | [diff] [blame] | 30 | V2M_MAP_FLASH0_RO, |
Dan Handley | 9df4804 | 2015-03-19 18:58:55 +0000 | [diff] [blame] | 31 | V2M_MAP_IOFPGA, |
| 32 | CSS_MAP_DEVICE, |
| 33 | SOC_CSS_MAP_DEVICE, |
| 34 | ARM_MAP_NS_DRAM1, |
| 35 | ARM_MAP_TSP_SEC_MEM, |
| 36 | {0} |
| 37 | }; |
| 38 | #endif |
Masahiro Yamada | 441bfdd | 2016-12-25 23:36:24 +0900 | [diff] [blame] | 39 | #ifdef IMAGE_BL2U |
Yatharth Kochar | 3a11eda | 2015-10-14 15:28:11 +0100 | [diff] [blame] | 40 | const mmap_region_t plat_arm_mmap[] = { |
| 41 | ARM_MAP_SHARED_RAM, |
| 42 | CSS_MAP_DEVICE, |
| 43 | SOC_CSS_MAP_DEVICE, |
| 44 | {0} |
| 45 | }; |
| 46 | #endif |
Masahiro Yamada | 441bfdd | 2016-12-25 23:36:24 +0900 | [diff] [blame] | 47 | #ifdef IMAGE_BL31 |
Dan Handley | 9df4804 | 2015-03-19 18:58:55 +0000 | [diff] [blame] | 48 | const mmap_region_t plat_arm_mmap[] = { |
| 49 | ARM_MAP_SHARED_RAM, |
| 50 | V2M_MAP_IOFPGA, |
| 51 | CSS_MAP_DEVICE, |
Soby Mathew | cbafd7a | 2016-11-14 12:44:32 +0000 | [diff] [blame] | 52 | #if CSS_USE_SCMI_DRIVER |
| 53 | /* |
| 54 | * The SCMI payload area is currently in the Non Secure SRAM. This is |
| 55 | * a potential security risk but this will be resolved once SCP |
| 56 | * completely replaces SCPI with SCMI as the only communication |
| 57 | * protocol. |
| 58 | */ |
| 59 | CSS_MAP_NSRAM, |
| 60 | #endif |
Dan Handley | 9df4804 | 2015-03-19 18:58:55 +0000 | [diff] [blame] | 61 | SOC_CSS_MAP_DEVICE, |
| 62 | {0} |
| 63 | }; |
| 64 | #endif |
Masahiro Yamada | 441bfdd | 2016-12-25 23:36:24 +0900 | [diff] [blame] | 65 | #ifdef IMAGE_BL32 |
Dan Handley | 9df4804 | 2015-03-19 18:58:55 +0000 | [diff] [blame] | 66 | const mmap_region_t plat_arm_mmap[] = { |
Yatharth Kochar | 2694cba | 2016-11-14 12:00:41 +0000 | [diff] [blame] | 67 | #ifdef AARCH32 |
| 68 | ARM_MAP_SHARED_RAM, |
| 69 | #endif |
Dan Handley | 9df4804 | 2015-03-19 18:58:55 +0000 | [diff] [blame] | 70 | V2M_MAP_IOFPGA, |
| 71 | CSS_MAP_DEVICE, |
| 72 | SOC_CSS_MAP_DEVICE, |
| 73 | {0} |
| 74 | }; |
| 75 | #endif |
| 76 | |
| 77 | ARM_CASSERT_MMAP |
| 78 | |