app: aboot: Added MDTP indication to the kernel cmd_line

If MDTP is activated the string 'mdtp' will be added to the cmd_line.

Change-Id: I56b10735f0c56a4aaa15fcebf9a5299d2334a2d8
diff --git a/app/aboot/mdtp.c b/app/aboot/mdtp.c
index 60b97b0..35b2558 100644
--- a/app/aboot/mdtp.c
+++ b/app/aboot/mdtp.c
@@ -47,6 +47,7 @@
 static int mdtp_tzbsp_dec_verify_DIP(DIP_t *enc_dip, DIP_t *dec_dip, uint32_t *verified);
 static int mdtp_tzbsp_enc_hash_DIP(DIP_t *dec_dip, DIP_t *enc_dip);
 
+static int is_mdtp_activated = -1;
 /********************************************************************************/
 
 /* Read the DIP from EMMC */
@@ -364,6 +365,7 @@
 			show_invalid_msg();
 			return -1;
 		}
+		is_mdtp_activated = 1;
 
 	}
 
@@ -459,6 +461,9 @@
 	int ret;
 	bool enabled;
 
+	/* sets the default value of this global to be MDTP not activated */
+	is_mdtp_activated = 0;
+
 	ret = mdtp_fuse_get_enabled(&enabled);
 	if(ret)
 	{
@@ -474,6 +479,18 @@
 
 	return 0;
 }
+/********************************************************************************/
+
+/** Indicates whether the MDTP is currently in ACTIVATED state **/
+int mdtp_activated(bool * activated){
+	if(is_mdtp_activated < 0){
+		/* mdtp_fwlock_verify_lock was not called before, the value is not valid */
+		return is_mdtp_activated;
+	}
+
+	*activated = is_mdtp_activated;
+	return 0;
+}
 
 /********************************************************************************/