1*91f16700Schasinglulu /* 2*91f16700Schasinglulu * Copyright (c) 2016-2018, Arm Limited and Contributors. All rights reserved. 3*91f16700Schasinglulu * 4*91f16700Schasinglulu * SPDX-License-Identifier: BSD-3-Clause 5*91f16700Schasinglulu */ 6*91f16700Schasinglulu 7*91f16700Schasinglulu #ifndef XLAT_TABLES_PRIVATE_H 8*91f16700Schasinglulu #define XLAT_TABLES_PRIVATE_H 9*91f16700Schasinglulu 10*91f16700Schasinglulu #include <platform_def.h> 11*91f16700Schasinglulu 12*91f16700Schasinglulu #include <lib/cassert.h> 13*91f16700Schasinglulu #include <lib/xlat_tables/xlat_tables_arch.h> 14*91f16700Schasinglulu 15*91f16700Schasinglulu #if HW_ASSISTED_COHERENCY 16*91f16700Schasinglulu #error xlat tables v2 must be used with HW_ASSISTED_COHERENCY 17*91f16700Schasinglulu #endif 18*91f16700Schasinglulu 19*91f16700Schasinglulu CASSERT(CHECK_PHY_ADDR_SPACE_SIZE(PLAT_PHY_ADDR_SPACE_SIZE), 20*91f16700Schasinglulu assert_valid_phy_addr_space_size); 21*91f16700Schasinglulu 22*91f16700Schasinglulu /* Alias to retain compatibility with the old #define name */ 23*91f16700Schasinglulu #define XLAT_BLOCK_LEVEL_MIN MIN_LVL_BLOCK_DESC 24*91f16700Schasinglulu 25*91f16700Schasinglulu void print_mmap(void); 26*91f16700Schasinglulu 27*91f16700Schasinglulu /* Returns the current Exception Level. The returned EL must be 1 or higher. */ 28*91f16700Schasinglulu unsigned int xlat_arch_current_el(void); 29*91f16700Schasinglulu 30*91f16700Schasinglulu /* 31*91f16700Schasinglulu * Returns the bit mask that has to be ORed to the rest of a translation table 32*91f16700Schasinglulu * descriptor so that execution of code is prohibited at the given Exception 33*91f16700Schasinglulu * Level. 34*91f16700Schasinglulu */ 35*91f16700Schasinglulu uint64_t xlat_arch_get_xn_desc(unsigned int el); 36*91f16700Schasinglulu 37*91f16700Schasinglulu void init_xlation_table(uintptr_t base_va, uint64_t *table, 38*91f16700Schasinglulu unsigned int level, uintptr_t *max_va, 39*91f16700Schasinglulu unsigned long long *max_pa); 40*91f16700Schasinglulu 41*91f16700Schasinglulu #endif /* XLAT_TABLES_PRIVATE_H */ 42