Nishant Sharma | 96107d7 | 2022-04-28 00:13:50 +0100 | [diff] [blame^] | 1 | /* |
| 2 | * Copyright (c) 2023, ARM Limited and Contributors. All rights reserved. |
| 3 | * |
| 4 | * SPDX-License-Identifier: BSD-3-Clause |
| 5 | */ |
| 6 | |
| 7 | #include <lib/xlat_tables/xlat_tables_v2.h> |
| 8 | #include <platform_def.h> |
| 9 | |
| 10 | /* Place translation tables by default along with the ones used by BL31. */ |
| 11 | #ifndef PLAT_SP_IMAGE_XLAT_SECTION_NAME |
| 12 | #define PLAT_SP_IMAGE_XLAT_SECTION_NAME ".xlat_table" |
| 13 | #endif |
| 14 | #ifndef PLAT_SP_IMAGE_BASE_XLAT_SECTION_NAME |
| 15 | #define PLAT_SP_IMAGE_BASE_XLAT_SECTION_NAME ".bss" |
| 16 | #endif |
| 17 | |
| 18 | /* Allocate and initialise the translation context for the secure partitions. */ |
| 19 | REGISTER_XLAT_CONTEXT2(sp, |
| 20 | PLAT_SP_IMAGE_MMAP_REGIONS, |
| 21 | PLAT_SP_IMAGE_MAX_XLAT_TABLES, |
| 22 | PLAT_VIRT_ADDR_SPACE_SIZE, PLAT_PHY_ADDR_SPACE_SIZE, |
| 23 | EL1_EL0_REGIME, PLAT_SP_IMAGE_XLAT_SECTION_NAME, |
| 24 | PLAT_SP_IMAGE_BASE_XLAT_SECTION_NAME); |
| 25 | |
| 26 | /* Get handle of Secure Partition translation context */ |
| 27 | xlat_ctx_t *spm_get_sp_xlat_context(void) |
| 28 | { |
| 29 | return &sp_xlat_ctx; |
| 30 | }; |