diff options
author | Jaymes Wilks <mjwilks@us.ibm.com> | 2017-11-17 09:23:44 -0600 |
---|---|---|
committer | Daniel M. Crowell <dcrowell@us.ibm.com> | 2017-12-12 17:06:02 -0500 |
commit | ba9cad2c031bcf85fd34f8f3e8c477d38ed1db71 (patch) | |
tree | bd43f3b8532786f5de52d074a015c93bf82b2117 /src/include/usr/secureboot/service.H | |
parent | 8fcdfa14a7d3e8615f08c398bec2ee0b7a8d119e (diff) | |
download | talos-hostboot-ba9cad2c031bcf85fd34f8f3e8c477d38ed1db71.tar.gz talos-hostboot-ba9cad2c031bcf85fd34f8f3e8c477d38ed1db71.zip |
Create better anti-deadlock strategy for vfs
Addresses situations in the error paths of vfs resource
provider where the handler may deadlock. As a precautionary
measure, the same change was applied to secure PNOR resource
provider just in case a new deadlock scenario gets introduced
through future code changes.
Change-Id: I1bda8c28ad9a3a1758cd6b8ae2e35f67c3e0572c
RTC:176134
Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/50068
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>
Reviewed-by: Stephen M. Cprek <smcprek@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/include/usr/secureboot/service.H')
-rw-r--r-- | src/include/usr/secureboot/service.H | 21 |
1 files changed, 16 insertions, 5 deletions
diff --git a/src/include/usr/secureboot/service.H b/src/include/usr/secureboot/service.H index c4dc31334..7203ae879 100644 --- a/src/include/usr/secureboot/service.H +++ b/src/include/usr/secureboot/service.H @@ -284,9 +284,15 @@ namespace SECUREBOOT * never return from this call) or not (and return from this call). * In general, code should wait for shutdown unless early in boot before * basic services are up, or in a resource provider path. + * @param[in] i_calledByRP Indicates that this function is being called from + * within a resource provider message handler, which lets the + * implementation know that it needs to take precautionary measures to + * avoid deadlock scenarios. If called by a resource provider pass true. + * If not, false. */ - void handleSecurebootFailure( - errlHndl_t &io_err, bool i_waitForShutdown = true); + void handleSecurebootFailure(errlHndl_t &io_err, + bool i_waitForShutdown = true, + bool i_calledByRP = false); /** * @brief Adds the values of the Security Registers of the processors in @@ -297,18 +303,23 @@ namespace SECUREBOOT * NOTE: The state of the system/processors * (ie, SCOM vs FSI) determines which registers can * be included. - * + * @param[in] i_calledByRP See the handleSecurebootFailure function's + * "called by resource provider" option. * @return N/A */ - void addSecurityRegistersToErrlog(errlHndl_t & io_err); + void addSecurityRegistersToErrlog(errlHndl_t & io_err, + bool i_calledByRP = false); /** * @brief Common handler for adding all relevant secureboot information to * the user details section of an error log * @param[in/out] io_err Error Log to add secure info to. * Must not be nullptr. + * @param[in] i_calledByRP See the handleSecurebootFailure function's + * "called by resource provider" option. */ - void addSecureUserDetailsToErrolog(errlHndl_t & io_err); + void addSecureUserDetailsToErrlog(errlHndl_t & io_err, + bool i_calledByRP = false); /* * @brief Determines if Attribute Overrides are Allowed |