summaryrefslogtreecommitdiffstats
path: root/src/usr/fapi2/attribute_service.C
diff options
context:
space:
mode:
authorJaymes Wilks <mjwilks@us.ibm.com>2017-08-25 14:18:38 -0500
committerDaniel M. Crowell <dcrowell@us.ibm.com>2017-08-31 12:49:40 -0400
commite1678bffbd5cba43911f7e6f670ac3c3bb68af39 (patch)
tree2f9086aa3a1e29bbc353591c4a3d771c92472d0d /src/usr/fapi2/attribute_service.C
parent45d359f3df82a3e9edf31b89193c7a61c5229977 (diff)
downloadtalos-hostboot-e1678bffbd5cba43911f7e6f670ac3c3bb68af39.tar.gz
talos-hostboot-e1678bffbd5cba43911f7e6f670ac3c3bb68af39.zip
Replace HB_SECURITY_MODE attribute with SECUREBOOT API equivalent
The HB_SECURITY_MODE attribute will now be a variable managed by secureboot. The FAPI attribue SECURITY_MODE that maps to the HB version will now call to that variable in the SECUREBOOT API. Change-Id: I7e42c3f2e355feeb0d49aa6a998960bc5409bfa2 RTC:178643 Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/45167 Reviewed-by: Michael Baiocchi <mbaiocch@us.ibm.com> Reviewed-by: Nicholas E. Bofferding <bofferdn@us.ibm.com> Tested-by: Jenkins Server <pfd-jenkins+hostboot@us.ibm.com> Tested-by: FSP CI Jenkins <fsp-CI-jenkins+hostboot@us.ibm.com> Tested-by: Jenkins OP Build CI <op-jenkins+hostboot@us.ibm.com> Tested-by: Jenkins OP HW <op-hw-jenkins+hostboot@us.ibm.com> Reviewed-by: Daniel M. Crowell <dcrowell@us.ibm.com>
Diffstat (limited to 'src/usr/fapi2/attribute_service.C')
-rw-r--r--src/usr/fapi2/attribute_service.C25
1 files changed, 25 insertions, 0 deletions
diff --git a/src/usr/fapi2/attribute_service.C b/src/usr/fapi2/attribute_service.C
index 58d5e4b1e..fea495705 100644
--- a/src/usr/fapi2/attribute_service.C
+++ b/src/usr/fapi2/attribute_service.C
@@ -62,6 +62,8 @@
#include <targeting/common/util.H>
#include <../memory/lib/shared/mss_const.H>
+#include <secureboot/service.H>
+
//******************************************************************************
// Implementation
//******************************************************************************
@@ -1281,6 +1283,29 @@ ReturnCode fapiAttrSetBadDqBitmap(
return l_rc;
}
+//******************************************************************************
+// fapi::platAttrSvc::platGetSecurityMode function
+//******************************************************************************
+ReturnCode platGetSecurityMode(uint8_t & o_securityMode)
+{
+ #ifndef __HOSTBOOT_RUNTIME
+ o_securityMode = SECUREBOOT::getSbeSecurityMode();
+ #else
+ o_securityMode = 0xFF;
+ FAPI_INF("Get SECURITY_MODE not supported from hostboot runtime");
+ #endif
+ return fapi2::ReturnCode();
+}
+
+//******************************************************************************
+// fapi::platAttrSvc::platSetSecurityMode function
+//******************************************************************************
+ReturnCode platSetSecurityMode()
+{
+ FAPI_INF("Set SECURITY_MODE ignored when called from FAPI code");
+ return fapi2::ReturnCode();
+}
+
} // End platAttrSvc namespace
} // End fapi2 namespace
OpenPOWER on IntegriCloud