summaryrefslogtreecommitdiffstats
path: root/src/usr/isteps
diff options
context:
space:
mode:
authorMike Baiocchi <mbaiocch@us.ibm.com>2019-09-12 09:00:52 -0500
committerNicholas E Bofferding <bofferdn@us.ibm.com>2019-11-14 08:28:02 -0600
commit35964668f9dc302401ff03c691e579a4c48eecea (patch)
tree2d1f1274e4b9b55826421fc23f3f19d43c33747d /src/usr/isteps
parenteace166aa1ef265712798d84f10782f7bc430be7 (diff)
downloadtalos-hostboot-35964668f9dc302401ff03c691e579a4c48eecea.tar.gz
talos-hostboot-35964668f9dc302401ff03c691e579a4c48eecea.zip
Add Physical Presence Check and Window Open Features
This commit does the following: - Adds an interface to detect if physical presence has been asserted -- This happens in istep 6 -- If the window is open to detect this, it is then closed here - Adds an interface to possibly open the window to look for physical presence -- This happens in istep 10 -- It first checks to see if the window should be opened -- If the window is opened then the system shuts down to wait for physical presence to be asserted on the next power on - Adds the necessary attributes to support and test this functionality RTC:211220 Change-Id: I05a26ebad581875a4b9f2a51eb1ca3062f36c5fb Reviewed-on: http://rchgit01.rchland.ibm.com/gerrit1/84656 Reviewed-by: Ilya Smirnov <ismirno@us.ibm.com> Reviewed-by: Christopher J Engel <cjengel@us.ibm.com> Tested-by: Jenkins Server <pfd-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> Tested-by: FSP CI Jenkins <fsp-CI-jenkins+hostboot@us.ibm.com> Reviewed-by: Nicholas E Bofferding <bofferdn@us.ibm.com>
Diffstat (limited to 'src/usr/isteps')
-rw-r--r--src/usr/isteps/istep06/call_host_update_master_tpm.C28
-rw-r--r--src/usr/isteps/istep10/call_host_update_redundant_tpm.C24
2 files changed, 47 insertions, 5 deletions
diff --git a/src/usr/isteps/istep06/call_host_update_master_tpm.C b/src/usr/isteps/istep06/call_host_update_master_tpm.C
index 284d43450..fa374f279 100644
--- a/src/usr/isteps/istep06/call_host_update_master_tpm.C
+++ b/src/usr/isteps/istep06/call_host_update_master_tpm.C
@@ -5,7 +5,7 @@
/* */
/* OpenPOWER HostBoot Project */
/* */
-/* Contributors Listed Below - COPYRIGHT 2015,2018 */
+/* Contributors Listed Below - COPYRIGHT 2015,2019 */
/* [+] International Business Machines Corp. */
/* */
/* */
@@ -31,6 +31,8 @@
#include <trustedbootif.H>
#include <initservice/isteps_trace.H>
#include <secureboot/service.H>
+#include <secureboot/phys_presence_if.H>
+#include <config.h>
namespace ISTEP_06
{
@@ -39,7 +41,7 @@ void* call_host_update_master_tpm( void *io_pArgs )
{
ISTEP_ERROR::IStepError l_stepError;
- TRACDCOMP( ISTEPS_TRACE::g_trac_isteps_trace,
+ TRACFCOMP( ISTEPS_TRACE::g_trac_isteps_trace,
"call_host_update_master_tpm entry" );
errlHndl_t l_err = nullptr;
@@ -67,10 +69,28 @@ void* call_host_update_master_tpm( void *io_pArgs )
ERRORLOG::errlCommit( l_err, SECURE_COMP_ID );
}
- TRACDCOMP( ISTEPS_TRACE::g_trac_isteps_trace,
- "call_host_update_master_tpm exit" );
+ // Check for Physical Presence
+#ifdef CONFIG_PHYS_PRES_PWR_BUTTON
+ l_err = SECUREBOOT::detectPhysPresence();
+ if (l_err)
+ {
+ // @TODO RTC 210301 - Handle Error Log Correctly, but for now
+ // just delete it
+ TRACFCOMP( ISTEPS_TRACE::g_trac_isteps_trace,
+ "call_host_update_master_tpm: Error back from "
+ "SECUREBOOT::detectPhysPresence: rc=0x%X, plid=0x%X. "
+ "Deleting error for now",
+ ERRL_GETRC_SAFE(l_err), ERRL_GETPLID_SAFE(l_err));
+ delete l_err;
+ l_err = nullptr;
+ }
+#endif
+ TRACFCOMP( ISTEPS_TRACE::g_trac_isteps_trace,
+ "call_host_update_master_tpm exit" );
return l_stepError.getErrorHandle();
+
+
}
};
diff --git a/src/usr/isteps/istep10/call_host_update_redundant_tpm.C b/src/usr/isteps/istep10/call_host_update_redundant_tpm.C
index 878b1b1e3..d0870d817 100644
--- a/src/usr/isteps/istep10/call_host_update_redundant_tpm.C
+++ b/src/usr/isteps/istep10/call_host_update_redundant_tpm.C
@@ -5,7 +5,7 @@
/* */
/* OpenPOWER HostBoot Project */
/* */
-/* Contributors Listed Below - COPYRIGHT 2015,2018 */
+/* Contributors Listed Below - COPYRIGHT 2015,2019 */
/* [+] International Business Machines Corp. */
/* */
/* */
@@ -40,6 +40,7 @@
#include <util/algorithm.H>
#include <istepHelperFuncs.H>
#include <secureboot/trustedbootif.H>
+#include <secureboot/phys_presence_if.H>
namespace ISTEP_10
{
@@ -50,6 +51,7 @@ void* call_host_update_redundant_tpm (void *io_pArgs)
ENTER_MRK"call_host_update_redundant_tpm");
ISTEP_ERROR::IStepError l_istepError;
+
#ifdef CONFIG_TPMDD
TARGETING::Target* l_backupTpm = nullptr;
@@ -67,6 +69,26 @@ void* call_host_update_redundant_tpm (void *io_pArgs)
} while(0);
#endif
+#ifdef CONFIG_PHYS_PRES_PWR_BUTTON
+ // Check to see if a Physical Presence Window should be opened,
+ // and if so, open it. This could result in the system being shutdown
+ // to allow the system administrator to assert physical presence
+ errlHndl_t l_err = nullptr;
+ l_err = SECUREBOOT::handlePhysPresenceWindow();
+ if (l_err)
+ {
+ // @TODO RTC 210301 - Handle Error Log Correctly, but for now
+ // just delete it
+ TRACFCOMP( ISTEPS_TRACE::g_trac_isteps_trace,
+ "call_host_update_redundant_tpm: Error back from "
+ "SECUREBOOT::handlePhysPresence: rc=0x%X, plid=0x%X. "
+ "Deleting error for now",
+ ERRL_GETRC_SAFE(l_err), ERRL_GETPLID_SAFE(l_err));
+ delete l_err;
+ l_err = nullptr;
+ }
+#endif
+
TRACFCOMP(ISTEPS_TRACE::g_trac_isteps_trace,
EXIT_MRK"call_host_update_redundant_tpm");
OpenPOWER on IntegriCloud