[Skiboot] [PATCH v2 12/20] core: update superseded libstb calls in flash.c and init.c

Claudio Carvalho cclaudio at linux.vnet.ibm.com
Sat Dec 9 15:52:26 AEDT 2017


List of libstb calls that were superseded:

sb_verify()  -> secureboot_verify()
tb_measure() -> trustedboot_measure()
stb_final()  -> trustedboot_exit_boot_services()
stb_init()   -> secureboot_init() and trustedboot_init()

The new functions are supported in both P8 and P9.

Signed-off-by: Claudio Carvalho <cclaudio at linux.vnet.ibm.com>
---
 core/flash.c | 8 ++++----
 core/init.c  | 9 +++++----
 2 files changed, 9 insertions(+), 8 deletions(-)

diff --git a/core/flash.c b/core/flash.c
index 66568e7..eacf55b 100644
--- a/core/flash.c
+++ b/core/flash.c
@@ -25,8 +25,8 @@
 #include <libflash/libffs.h>
 #include <libflash/blocklevel.h>
 #include <libflash/ecc.h>
-#include <libstb/stb.h>
-#include <libstb/container.h>
+#include <libstb/secureboot.h>
+#include <libstb/trustedboot.h>
 #include <elf.h>
 
 struct flash {
@@ -799,8 +799,8 @@ done_reading:
 	 * Verify and measure the retrieved PNOR partition as part of the
 	 * secure boot and trusted boot requirements
 	 */
-	sb_verify(id, buf, *len);
-	tb_measure(id, buf, *len);
+	secureboot_verify(id, buf, *len);
+	trustedboot_measure(id, buf, *len);
 
 	/* Find subpartition */
 	if (subid != RESOURCE_SUBID_NONE) {
diff --git a/core/init.c b/core/init.c
index b0c13ca..4ec4e08 100644
--- a/core/init.c
+++ b/core/init.c
@@ -46,8 +46,8 @@
 #include <xive.h>
 #include <nvram.h>
 #include <vas.h>
-#include <libstb/stb.h>
-#include <libstb/container.h>
+#include <libstb/secureboot.h>
+#include <libstb/trustedboot.h>
 #include <phys-map.h>
 #include <imc.h>
 
@@ -417,7 +417,7 @@ static bool load_kernel(void)
 		return false;
 	}
 
-	stb_final();
+	trustedboot_exit_boot_services();
 
 	return true;
 }
@@ -991,7 +991,8 @@ void __noreturn __nomcount main_cpu_entry(const void *fdt)
 	console_log_level();
 
 	/* Secure/Trusted Boot init. We look for /ibm,secureboot in DT */
-	stb_init();
+	secureboot_init();
+	trustedboot_init();
 
 	/* Install the OPAL Console handlers */
 	init_opal_console();
-- 
2.7.4



More information about the Skiboot mailing list