feat(drtm): update drtm setup function

Updated DRTM setup functionality that mainly does below 2 things
1. Initialise the DRTM DMA protection, this function assumes the
   platform must support complete DMA protection.
2. Initialise the Crypto module that will be useful to calculate
   the hash of various DRTM element involved.

Signed-off-by: Manish V Badarkhe <manish.badarkhe@arm.com>
Signed-off-by: Lucian Paul-Trifu <lucian.paultrifu@gmail.com>
Change-Id: I3d6e4d534686d391fa7626094d2b2535dac74e00
diff --git a/services/std_svc/drtm/drtm_main.c b/services/std_svc/drtm/drtm_main.c
index c7fce5e..adb9293 100644
--- a/services/std_svc/drtm/drtm_main.c
+++ b/services/std_svc/drtm/drtm_main.c
@@ -12,15 +12,37 @@
 
 #include <stdint.h>
 
+#include <arch.h>
+#include <arch_helpers.h>
 #include <common/debug.h>
 #include <common/runtime_svc.h>
+#include <drivers/auth/crypto_mod.h>
 #include "drtm_main.h"
 #include <services/drtm_svc.h>
 
+/* This value is used by the SMC to advertise the boot PE */
+static uint64_t boot_pe_aff_value;
+
 int drtm_setup(void)
 {
+	bool rc;
+
 	INFO("DRTM service setup\n");
 
+	boot_pe_aff_value = read_mpidr_el1() & MPIDR_AFFINITY_MASK;
+
+	rc = drtm_dma_prot_init();
+	if (rc) {
+		return INTERNAL_ERROR;
+	}
+
+	/*
+	 * initialise the platform supported crypto module that will
+	 * be used by the DRTM-service to calculate hash of DRTM-
+	 * implementation specific components
+	 */
+	crypto_mod_init();
+
 	return 0;
 }