diff options
author | Antonio Nino Diaz <antonio.ninodiaz@arm.com> | 2016-08-02 09:21:41 +0100 |
---|---|---|
committer | Soby Mathew <soby.mathew@arm.com> | 2016-08-23 10:51:44 +0100 |
commit | e8719552a243b7e7e0d2fd3401669e68c9519170 (patch) | |
tree | 3228856390ee33f83c17088cebffb2cd80f5fa77 /lib/xlat_tables/xlat_tables_private.h | |
parent | 079e522d39715c39a9d5f23832d09ccdda5dfcd5 (diff) |
Automatically select initial xlation lookup level
Instead of hardcoding a level 1 table as the base translation level
table, let the code decide which level is the most appropriate given
the virtual address space size.
As the table granularity is 4 KB, this allows the code to select
level 0, 1 or 2 as base level for AArch64. This way, instead of
limiting the virtual address space width to 39-31 bits, widths of
48-25 bit can be used.
For AArch32, this change allows the code to select level 1 or 2
as the base translation level table and use virtual address space
width of 32-25 bits.
Also removed some unused definitions related to translation tables.
Fixes ARM-software/tf-issues#362
Change-Id: Ie3bb5d6d1a4730a26700b09827c79f37ca3cdb65
Diffstat (limited to 'lib/xlat_tables/xlat_tables_private.h')
-rw-r--r-- | lib/xlat_tables/xlat_tables_private.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/lib/xlat_tables/xlat_tables_private.h b/lib/xlat_tables/xlat_tables_private.h index 389bb0b5..159d071b 100644 --- a/lib/xlat_tables/xlat_tables_private.h +++ b/lib/xlat_tables/xlat_tables_private.h @@ -31,6 +31,12 @@ #ifndef __XLAT_TABLES_PRIVATE_H__ #define __XLAT_TABLES_PRIVATE_H__ +#include <cassert.h> +#include <utils.h> + +/* The virtual address space size must be a power of two. */ +CASSERT(IS_POWER_OF_TWO(ADDR_SPACE_SIZE), assert_valid_addr_space_size); + void print_mmap(void); void init_xlation_table(uintptr_t base_va, uint64_t *table, int level, uintptr_t *max_va, |