diff mbox series

[v4,18/18] witherspoon: enable secvar for witherspoon platform

Message ID 20200511213152.24952-19-erichte@linux.ibm.com
State Changes Requested
Headers show
Series Add initial secure variable storage and backend drivers | expand

Checks

Context Check Description
snowpatch_ozlabs/apply_patch fail Failed to apply to any branch
snowpatch_ozlabs/apply_patch warning Failed to apply on branch master (0f1937ef40fca0c3212a9dff1010b832a24fb063)

Commit Message

Eric Richter May 11, 2020, 9:31 p.m. UTC
Secure variable support needs to be enabled for each platform, and each
platform needs to select which storage and backend drivers to use (or
alternatively implement their own). This patch adds secure variable
support to the witherspoon platform.

Signed-off-by: Eric Richter <erichte@linux.ibm.com>
---
 platforms/astbmc/witherspoon.c | 8 ++++++++
 1 file changed, 8 insertions(+)
diff mbox series

Patch

diff --git a/platforms/astbmc/witherspoon.c b/platforms/astbmc/witherspoon.c
index 39c3f161..6bbf51a1 100644
--- a/platforms/astbmc/witherspoon.c
+++ b/platforms/astbmc/witherspoon.c
@@ -17,6 +17,8 @@ 
 #include <npu2.h>
 #include <occ.h>
 #include <i2c.h>
+#include <secvar.h>
+#include "libstb/secvar/storage/secboot_tpm.h"
 
 #include "astbmc.h"
 #include "ast.h"
@@ -572,6 +574,11 @@  static void witherspoon_finalise_dt(bool is_reboot)
 	}
 }
 
+static int witherspoon_secvar_init(void)
+{
+	return secvar_main(secboot_tpm_driver, edk2_compatible_v1);
+}
+
 /* The only difference between these is the PCI slot handling */
 
 DECLARE_PLATFORM(witherspoon) = {
@@ -594,4 +601,5 @@  DECLARE_PLATFORM(witherspoon) = {
 	.ocapi                  = &witherspoon_ocapi,
 	.npu2_device_detect	= witherspoon_npu2_device_detect,
 	.op_display		= op_display_lpc,
+	.secvar_init		= witherspoon_secvar_init,
 };