diff mbox series

[RFC,v2,9/9] witherspoon: enable secvar for witherspoon platform

Message ID 20190625220215.27134-10-erichte@linux.ibm.com
State RFC
Headers show
Series Add Secure Variable Support | expand

Checks

Context Check Description
snowpatch_ozlabs/snowpatch_job_snowpatch-skiboot-dco success Signed-off-by present
snowpatch_ozlabs/snowpatch_job_snowpatch-skiboot fail Test snowpatch/job/snowpatch-skiboot on branch master
snowpatch_ozlabs/apply_patch success Successfully applied on branch master (b904cb733750de1bb0e04e5012c391a9c3094d11)

Commit Message

Eric Richter June 25, 2019, 10:02 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 | 7 +++++++
 1 file changed, 7 insertions(+)
diff mbox series

Patch

diff --git a/platforms/astbmc/witherspoon.c b/platforms/astbmc/witherspoon.c
index 52971ecf..f3e2378f 100644
--- a/platforms/astbmc/witherspoon.c
+++ b/platforms/astbmc/witherspoon.c
@@ -30,6 +30,7 @@ 
 #include <npu2.h>
 #include <occ.h>
 #include <i2c.h>
+#include <secvar.h>
 
 #include "astbmc.h"
 #include "ast.h"
@@ -475,6 +476,11 @@  static void npu2_phb_nvlink_dt(struct phb *npuphb)
 	}
 }
 
+static int witherspoon_secvar_init(void)
+{
+        return secvar_main(secboot_p9_driver, edk2_compatible_v1);
+}
+
 static void witherspoon_exit(void)
 {
 	struct dt_node *np;
@@ -512,4 +518,5 @@  DECLARE_PLATFORM(witherspoon) = {
 	.pci_get_slot_info	= dt_slot_get_slot_info,
 	.ocapi                  = &witherspoon_ocapi,
 	.npu2_device_detect	= witherspoon_npu2_device_detect,
+	.secvar_init		= witherspoon_secvar_init,
 };