aboutsummaryrefslogtreecommitdiff
path: root/lib/xlat_tables_v2
diff options
context:
space:
mode:
authorSandrine Bailleux <sandrine.bailleux@arm.com>2017-07-19 10:11:13 +0100
committerSandrine Bailleux <sandrine.bailleux@arm.com>2017-07-26 09:28:23 +0100
commit0044231d434997428b2a2de0088433779a2555bf (patch)
treed2744e76f081680cdb699a9a1f83a40c900dffd1 /lib/xlat_tables_v2
parent7bba6884a0112ec38ad5992b1eb3f0398abf5cf7 (diff)
downloadarm-trusted-firmware-0044231d434997428b2a2de0088433779a2555bf.tar.gz
xlat lib: Fix some types
Fix the type length and signedness of some of the constants and variables used in the translation table library. This patch supersedes Pull Request #1018: https://github.com/ARM-software/arm-trusted-firmware/pull/1018 Change-Id: Ibd45faf7a4fb428a0bf71c752551d35800212fb2 Signed-off-by: Sandrine Bailleux <sandrine.bailleux@arm.com>
Diffstat (limited to 'lib/xlat_tables_v2')
-rw-r--r--lib/xlat_tables_v2/aarch32/xlat_tables_arch.c4
-rw-r--r--lib/xlat_tables_v2/aarch64/xlat_tables_arch.c4
-rw-r--r--lib/xlat_tables_v2/xlat_tables_internal.c2
3 files changed, 5 insertions, 5 deletions
diff --git a/lib/xlat_tables_v2/aarch32/xlat_tables_arch.c b/lib/xlat_tables_v2/aarch32/xlat_tables_arch.c
index 9c4d68bc3..be18552e3 100644
--- a/lib/xlat_tables_v2/aarch32/xlat_tables_arch.c
+++ b/lib/xlat_tables_v2/aarch32/xlat_tables_arch.c
@@ -131,10 +131,10 @@ void enable_mmu_arch(unsigned int flags,
uintptr_t virtual_addr_space_size = max_va + 1;
assert(CHECK_VIRT_ADDR_SPACE_SIZE(virtual_addr_space_size));
/*
- * __builtin_ctzl(0) is undefined but here we are guaranteed
+ * __builtin_ctzll(0) is undefined but here we are guaranteed
* that virtual_addr_space_size is in the range [1, UINT32_MAX].
*/
- ttbcr |= 32 - __builtin_ctzl(virtual_addr_space_size);
+ ttbcr |= 32 - __builtin_ctzll(virtual_addr_space_size);
}
/*
diff --git a/lib/xlat_tables_v2/aarch64/xlat_tables_arch.c b/lib/xlat_tables_v2/aarch64/xlat_tables_arch.c
index 5f389f365..61eac1064 100644
--- a/lib/xlat_tables_v2/aarch64/xlat_tables_arch.c
+++ b/lib/xlat_tables_v2/aarch64/xlat_tables_arch.c
@@ -220,10 +220,10 @@ void enable_mmu_arch(unsigned int flags,
uintptr_t virtual_addr_space_size = max_va + 1;
assert(CHECK_VIRT_ADDR_SPACE_SIZE(virtual_addr_space_size));
/*
- * __builtin_ctzl(0) is undefined but here we are guaranteed that
+ * __builtin_ctzll(0) is undefined but here we are guaranteed that
* virtual_addr_space_size is in the range [1,UINTPTR_MAX].
*/
- tcr = 64 - __builtin_ctzl(virtual_addr_space_size);
+ tcr = 64 - __builtin_ctzll(virtual_addr_space_size);
/*
* Set the cacheability and shareability attributes for memory
diff --git a/lib/xlat_tables_v2/xlat_tables_internal.c b/lib/xlat_tables_v2/xlat_tables_internal.c
index 5efc834fa..940337bef 100644
--- a/lib/xlat_tables_v2/xlat_tables_internal.c
+++ b/lib/xlat_tables_v2/xlat_tables_internal.c
@@ -357,7 +357,7 @@ static void xlat_tables_unmap_region(xlat_ctx_t *ctx, mmap_region_t *mm,
*/
static action_t xlat_tables_map_region_action(const mmap_region_t *mm,
const int desc_type, const unsigned long long dest_pa,
- const uintptr_t table_entry_base_va, const int level)
+ const uintptr_t table_entry_base_va, const unsigned int level)
{
uintptr_t mm_end_va = mm->base_va + mm->size - 1;
uintptr_t table_entry_end_va =