feat(rmm): export *_rec_aux_* functions

This patch renames 'init_aux_data' function
to init_rec_aux_data() for consistency with
'map_rec_aux' and 'unmap_rec_aux' and
exports them for external usage. It doesn't
include changes in functionality.

Signed-off-by: AlexeiFedorov <Alexei.Fedorov@arm.com>
Change-Id: I6058c6e2e73c3658b83cddfc1dc444f3fcd31a6a
diff --git a/runtime/core/run.c b/runtime/core/run.c
index d4b9724..a94d5af 100644
--- a/runtime/core/run.c
+++ b/runtime/core/run.c
@@ -21,15 +21,15 @@
 static struct pmu_state g_pmu_data[MAX_CPUS];
 
 /*
- * Initialize the aux data and any buffer pointers to the aux granule memory for
- * use by REC when it is entered.
+ * Initialize pointers in @aux_data
+ *
+ * Call with parent REC granule's lock held.
  */
-static void init_aux_data(struct rec_aux_data *aux_data,
-			  void *rec_aux,
-			  unsigned int num_rec_aux)
+void init_rec_aux_data(struct rec_aux_data *aux_data, void *rec_aux,
+		       unsigned long num_aux)
 {
 	/* Ensure we have enough aux granules for use by REC */
-	assert(num_rec_aux >= REC_NUM_PAGES);
+	assert(num_aux >= REC_NUM_PAGES);
 
 	aux_data->attest_heap_buf = (uint8_t *)rec_aux;
 
@@ -42,10 +42,11 @@
 }
 
 /*
- * The parent REC granules lock is expected to be acquired
- * before functions map_rec_aux() and unmap_rec_aux() are called.
+ * Map REC auxiliary Granules
+ *
+ * Call with parent REC granule's lock held.
  */
-static void *map_rec_aux(struct granule *rec_aux_pages[], unsigned long num_aux)
+void *map_rec_aux(struct granule *rec_aux_pages[], unsigned long num_aux)
 {
 	void *rec_aux = NULL;
 
@@ -59,7 +60,12 @@
 	return rec_aux;
 }
 
-static void unmap_rec_aux(void *rec_aux, unsigned long num_aux)
+/*
+ * Unmap REC auxiliary Granules
+ *
+ * Call with parent REC granule's lock held.
+ */
+void unmap_rec_aux(void *rec_aux, unsigned long num_aux)
 {
 	unsigned char *rec_aux_vaddr = (unsigned char *)rec_aux;
 
@@ -362,7 +368,7 @@
 	/* Map auxiliary granules */
 	rec_aux = map_rec_aux(rec->g_aux, rec->num_rec_aux);
 
-	init_aux_data(&(rec->aux_data), rec_aux, rec->num_rec_aux);
+	init_rec_aux_data(&(rec->aux_data), rec_aux, rec->num_rec_aux);
 
 	/*
 	 * The attset heap on the REC aux pages is mapped now. It is time to
diff --git a/runtime/include/run.h b/runtime/include/run.h
index 10cb9dc..546e766 100644
--- a/runtime/include/run.h
+++ b/runtime/include/run.h
@@ -6,7 +6,13 @@
 #ifndef RUN_H
 #define RUN_H
 
-struct rec;
+struct granule;
+struct rec_aux_data;
+
+void init_rec_aux_data(struct rec_aux_data *aux_data, void *rec_aux,
+		       unsigned long num_aux);
+void *map_rec_aux(struct granule *rec_aux_pages[], unsigned long num_aux);
+void unmap_rec_aux(void *rec_aux, unsigned long num_aux);
 
 /*
  * Function to enter Realm with `regs` pointing to GP Regs to be