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/realm/tests/realm_test_utils.c b/lib/realm/tests/realm_test_utils.c
index 9f00b97..0af8b47 100644
--- a/lib/realm/tests/realm_test_utils.c
+++ b/lib/realm/tests/realm_test_utils.c
@@ -17,10 +17,10 @@
*/
uintptr_t realm_test_util_slot_to_pa(enum buffer_slot slot)
{
- struct xlat_table_entry *entry = get_cache_entry();
+ struct xlat_tbl_info *entry = get_cached_tbl_info();
uintptr_t va = slot_to_va(slot);
- uint64_t *desc_ptr = xlat_get_pte_from_table(entry, va);
- uint64_t descriptor = xlat_read_descriptor(desc_ptr);
+ uint64_t *desc_ptr = xlat_get_tte_ptr(entry, va);
+ uint64_t descriptor = xlat_read_tte(desc_ptr);
return (uintptr_t)(descriptor & XLAT_TTE_L3_PA_MASK);
}