refactor(xlat): add several refactorizations to the xlat library
This patch includes a number of refactorizations of the xlat library in
order to facilitate the implementation of unittests for the library.
Amongst the improvements there are:
* Macros to allocate and initialize the translation tables as well
as the translation context structures have been removed and
replaced with library APIs.
* Some of the library APIs have been collapsed, reducing the size
of the overall interface and presenting a more compact API to
the consumer.
* The distinction between the translation base tables and the
intermediate tables have been removed, presenting now a single
array of tables for the whole translation context.
The patch also adapts the rest of RMM to use the new library API.
Signed-off-by: Javier Almansa Sobrino <javier.almansasobrino@arm.com>
Change-Id: I2fb486c0c5bc005446b09e3fef5e7de9bf0efda0
diff --git a/lib/arch/include/arch.h b/lib/arch/include/arch.h
index b2c765c..328c264 100644
--- a/lib/arch/include/arch.h
+++ b/lib/arch/include/arch.h
@@ -140,8 +140,7 @@
#define TCR_EL2_E0PD1 (UL(1) << 56) /* TODO: ARMv8.5-E0PD, otherwise RES0 */
#define TCR_TxSZ_MIN UL(16)
-#define TCR_TxSZ_MAX UL(39)
-#define TCR_TxSZ_MAX_TTST UL(48)
+#define TCR_TxSZ_MAX UL(48)
/* HCR definitions */
#define HCR_FWB (UL(1) << 46)
diff --git a/lib/arch/src/arch_features.c b/lib/arch/src/arch_features.c
index ecba2e9..6c12796 100644
--- a/lib/arch/src/arch_features.c
+++ b/lib/arch/src/arch_features.c
@@ -18,7 +18,7 @@
* Physical Address ranges supported in the AArch64 Memory Model.
* Value 0b110 is supported in ARMv8.2 onwards but not used in RMM.
*/
- static const unsigned int pa_range_bits_arr[] = {
+ const unsigned int pa_range_bits_arr[] = {
PARANGE_0000_WIDTH, PARANGE_0001_WIDTH, PARANGE_0010_WIDTH,
PARANGE_0011_WIDTH, PARANGE_0100_WIDTH, PARANGE_0101_WIDTH,
/*