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

Claudio Carvalho cclaudio at linux.vnet.ibm.com
Thu Aug 31 17:24:32 AEST 2017


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 at linux.vnet.ibm.com>
---
 libstb/stb.c | 12 ------------
 1 file changed, 12 deletions(-)

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;
-- 
2.7.4



More information about the Skiboot mailing list