diff options
author | Antonio Nino Diaz <antonio.ninodiaz@arm.com> | 2017-10-25 11:53:25 +0100 |
---|---|---|
committer | Antonio Nino Diaz <antonio.ninodiaz@arm.com> | 2017-11-08 18:05:14 +0000 |
commit | ad02a7596f73ea9f07ebc9e04970ab7e9961c868 (patch) | |
tree | 435ae69cc9a11a59fb6ad16f8dda2022bed574a3 /lib | |
parent | 92cad5fa4bb4f7662574350df91196bb8017a820 (diff) | |
download | platform_external_arm-trusted-firmware-ad02a7596f73ea9f07ebc9e04970ab7e9961c868.tar.gz platform_external_arm-trusted-firmware-ad02a7596f73ea9f07ebc9e04970ab7e9961c868.tar.bz2 platform_external_arm-trusted-firmware-ad02a7596f73ea9f07ebc9e04970ab7e9961c868.zip |
xlat: Make function to calculate TCR PA bits public
This function can be useful to setup TCR_ELx by callers that don't use
the translation tables library to setup the system registers related
to them. By making it common, it can be reused whenever it is needed
without duplicating code.
Change-Id: Ibfada9e846d2a6cd113b1925ac911bb27327d375
Signed-off-by: Antonio Nino Diaz <antonio.ninodiaz@arm.com>
Diffstat (limited to 'lib')
-rw-r--r-- | lib/xlat_tables_v2/aarch64/xlat_tables_arch.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/lib/xlat_tables_v2/aarch64/xlat_tables_arch.c b/lib/xlat_tables_v2/aarch64/xlat_tables_arch.c index eda38d341..433110794 100644 --- a/lib/xlat_tables_v2/aarch64/xlat_tables_arch.c +++ b/lib/xlat_tables_v2/aarch64/xlat_tables_arch.c @@ -16,8 +16,7 @@ #include <xlat_tables_v2.h> #include "../xlat_tables_private.h" -static unsigned long long calc_physical_addr_size_bits( - unsigned long long max_addr) +unsigned long long tcr_physical_addr_size_bits(unsigned long long max_addr) { /* Physical address can't exceed 48 bits */ assert((max_addr & ADDR_MASK_48_TO_63) == 0); @@ -252,7 +251,7 @@ void enable_mmu_arch(unsigned int flags, * It is safer to restrict the max physical address accessible by the * hardware as much as possible. */ - unsigned long long tcr_ps_bits = calc_physical_addr_size_bits(max_pa); + unsigned long long tcr_ps_bits = tcr_physical_addr_size_bits(max_pa); #if IMAGE_EL == 1 assert(IS_IN_EL(1)); |