project: msm8952: move rpmb and sec app under verified boot
Enable rpmb,mdtp and sec app loader when verified boot is enabled.
Change-Id: Ib6c8fa16cdaba2e3365e331cc7b27f0a1e008397
diff --git a/project/msm8952.mk b/project/msm8952.mk
index e808597..9a6397f 100644
--- a/project/msm8952.mk
+++ b/project/msm8952.mk
@@ -13,8 +13,16 @@
endif
EMMC_BOOT := 1
+
+ifeq ($(VERIFIED_BOOT),1)
+ENABLE_MDTP_SUPPORT := 1
ENABLE_SECAPP_LOADER := 1
ENABLE_RPMB_SUPPORT := 1
+#enable fbcon display menu
+ENABLE_FBCON_DISPLAY_MSG := 1
+endif
+
+
ENABLE_SMD_SUPPORT := 1
#ENABLE_PWM_SUPPORT := true
@@ -33,7 +41,10 @@
#Enable the feature of long press power on
DEFINES += LONG_PRESS_POWER_ON=1
+
+ifeq ($(ENABLE_RPMB_SUPPORT),1)
DEFINES += USE_RPMB_FOR_DEVINFO=1
+endif
#Disable thumb mode
ENABLE_THUMB := false
@@ -44,8 +55,7 @@
DEFINES += MMC_SDHCI_SUPPORT=1
endif
-#enable fbcon display menu
-ENABLE_FBCON_DISPLAY_MSG := 1
+
ifeq ($(ENABLE_FBCON_DISPLAY_MSG),1)
DEFINES += FBCON_DISPLAY_MSG=1
@@ -70,7 +80,6 @@
DEFINES += SMD_SUPPORT=1
endif
-ENABLE_MDTP_SUPPORT := 1
ifeq ($(ENABLE_MDTP_SUPPORT),1)
DEFINES += MDTP_SUPPORT=1
diff --git a/target/msm8952/init.c b/target/msm8952/init.c
index 4e0b806..f61365d 100644
--- a/target/msm8952/init.c
+++ b/target/msm8952/init.c
@@ -252,7 +252,10 @@
void target_init(void)
{
+#if VERIFIED_BOOT
int ret = 0;
+#endif
+
dprintf(INFO, "target_init()\n");
spmi_init(PMIC_ARB_CHANNEL_NUM, PMIC_ARB_OWNER_ID);
@@ -278,6 +281,7 @@
if (target_use_signed_kernel())
target_crypto_init_params();
+#if VERIFIED_BOOT
clock_ce_enable(CE1_INSTANCE);
/* Initialize Qseecom */
@@ -312,6 +316,8 @@
dprintf(CRITICAL, "Failed to load App for verified\n");
ASSERT(0);
}
+#endif
+
#if SMD_SUPPORT
rpm_smd_init();
#endif
@@ -494,7 +500,7 @@
if (target_is_ssd_enabled())
clock_ce_disable(CE1_INSTANCE);
-
+#if VERIFIED_BOOT
if (is_sec_app_loaded())
{
if (send_milestone_call_to_tz() < 0)
@@ -511,6 +517,8 @@
}
clock_ce_disable(CE1_INSTANCE);
+#endif
+
#if SMD_SUPPORT
rpm_smd_uninit();
#endif