refactor(lib/realm): remove 'ns' argument from the buffer_map API
buffer_map() API receives an argument to indicate whether the
buffer slot where to map a granule is considered secure or not.
This patch removes that argument, as it is redundant and not
needed.
Signed-off-by: Javier Almansa Sobrino <javier.almansasobrino@arm.com>
Change-Id: I250cdd4884d7efb9b8451eedb03eb6444a5e4dc8
diff --git a/lib/realm/src/buffer.c b/lib/realm/src/buffer.c
index c645777..7fcaa48 100644
--- a/lib/realm/src/buffer.c
+++ b/lib/realm/src/buffer.c
@@ -232,7 +232,7 @@
unsigned long addr = granule_addr(granule);
assert(is_ns_slot(slot));
- return buffer_arch_map(slot, addr, true);
+ return buffer_arch_map(slot, addr);
}
static void ns_buffer_unmap(enum buffer_slot slot)
@@ -254,7 +254,7 @@
assert(is_realm_slot(slot));
- return buffer_arch_map(slot, addr, false);
+ return buffer_arch_map(slot, addr);
}
void buffer_unmap(void *buf)
@@ -347,7 +347,7 @@
* Internal helpers
******************************************************************************/
-void *buffer_map_internal(enum buffer_slot slot, unsigned long addr, bool ns)
+void *buffer_map_internal(enum buffer_slot slot, unsigned long addr)
{
uint64_t attr = SLOT_DESC_ATTR;
uintptr_t va = slot_to_va(slot);
@@ -355,7 +355,7 @@
assert(GRANULE_ALIGNED(addr));
- attr |= (ns == true ? MT_NS : MT_REALM);
+ attr |= (slot == SLOT_NS ? MT_NS : MT_REALM);
if (xlat_map_memory_page_with_attrs(entry, va,
(uintptr_t)addr, attr) != 0) {