[v2,01/14] libstb/stb.c: remove macros used to force secure-mode and trusted-mode

Message ID 1504164285-15095-2-git-send-email-cclaudio@linux.vnet.ibm.com
State Under Review
Headers show
Series
  • libstb: simplify the initialization of cvc drivers
Related show

Commit Message

Claudio Carvalho Aug. 31, 2017, 7:24 a.m.
This removes STB_FORCE_SECURE_MODE and STB_FORCE_TRUSTED_MODE, which are
macros used to force secure mode and trusted mode, respectively.

We don't need that anymore because the same functionality is provided by
NVRAM config variables.

Signed-off-by: Claudio Carvalho <cclaudio@linux.vnet.ibm.com>
---
 libstb/stb.c | 12 ------------
 1 file changed, 12 deletions(-)

Patch

diff --git a/libstb/stb.c b/libstb/stb.c
index f798bcb..41e6505 100644
--- a/libstb/stb.c
+++ b/libstb/stb.c
@@ -28,8 +28,6 @@ 
 
 /* For debugging only */
 //#define STB_DEBUG
-//#define STB_FORCE_SECURE_MODE
-//#define STB_FORCE_TRUSTED_MODE
 
 static bool secure_mode = false;
 static bool trusted_mode = false;
@@ -112,10 +110,6 @@  void stb_init(void)
 		return;
 	}
 
-#ifdef STB_FORCE_SECURE_MODE
-	secure_mode = true;
-	prlog(PR_NOTICE, "STB: secure mode on (forced!)\n");
-#else
 	secure_mode = dt_has_node_property(ibm_secureboot, "secure-enabled",
 					   NULL);
 
@@ -127,12 +121,7 @@  void stb_init(void)
 	} else {
 		prlog(PR_NOTICE, "STB: secure mode off\n");
 	}
-#endif
 
-#ifdef STB_FORCE_TRUSTED_MODE
-	trusted_mode = true;
-	prlog(PR_NOTICE, "STB: trusted mode on (forced!)\n");
-#else
 	trusted_mode = dt_has_node_property(ibm_secureboot, "trusted-enabled",
 					    NULL);
 	if (nvram_query_eq("force-trusted-mode", "true")) {
@@ -141,7 +130,6 @@  void stb_init(void)
 	}
 	prlog(PR_NOTICE, "STB: trusted mode %s\n",
 	      trusted_mode ? "on" : "off");
-#endif
 
 	if (!secure_mode && !trusted_mode)
 		return;