summaryrefslogtreecommitdiffstats
path: root/src/import
diff options
context:
space:
mode:
Diffstat (limited to 'src/import')
-rw-r--r--src/import/chips/p9/procedures/hwp/perv/p9_update_security_ctrl.C5
-rw-r--r--src/import/chips/p9/procedures/hwp/perv/p9_update_security_ctrl.H7
2 files changed, 8 insertions, 4 deletions
diff --git a/src/import/chips/p9/procedures/hwp/perv/p9_update_security_ctrl.C b/src/import/chips/p9/procedures/hwp/perv/p9_update_security_ctrl.C
index 1c1d2d7e3..a2f22062c 100644
--- a/src/import/chips/p9/procedures/hwp/perv/p9_update_security_ctrl.C
+++ b/src/import/chips/p9/procedures/hwp/perv/p9_update_security_ctrl.C
@@ -48,7 +48,8 @@
#include "p9_update_security_ctrl.H"
-fapi2::ReturnCode p9_update_security_ctrl(const fapi2::Target<fapi2::TARGET_TYPE_PROC_CHIP>& i_target_chip)
+fapi2::ReturnCode p9_update_security_ctrl(const fapi2::Target<fapi2::TARGET_TYPE_PROC_CHIP>& i_target_chip,
+ bool i_force_security)
{
FAPI_INF("p9_update_security_ctrl : Entering ...");
@@ -66,7 +67,7 @@ fapi2::ReturnCode p9_update_security_ctrl(const fapi2::Target<fapi2::TARGET_TYPE
l_in_secure_mode = l_data64.getBit<PU_SECURITY_SWITCH_REGISTER_SECURE_ACCESS>();
- if (l_in_secure_mode == 1) //Chip in Secure mode
+ if ((l_in_secure_mode == 1) || (i_force_security)) //Chip in Secure mode or override with i_force_security parameter
{
//Set bit 4 to set SUL
l_data64.setBit<PU_SECURITY_SWITCH_REGISTER_SEEPROM_UPDATE_LOCK>();
diff --git a/src/import/chips/p9/procedures/hwp/perv/p9_update_security_ctrl.H b/src/import/chips/p9/procedures/hwp/perv/p9_update_security_ctrl.H
index 3bc6a3018..3ca4071a8 100644
--- a/src/import/chips/p9/procedures/hwp/perv/p9_update_security_ctrl.H
+++ b/src/import/chips/p9/procedures/hwp/perv/p9_update_security_ctrl.H
@@ -45,14 +45,17 @@
#include <fapi2.H>
-typedef fapi2::ReturnCode (*p9_update_security_ctrl_FP_t)(const fapi2::Target<fapi2::TARGET_TYPE_PROC_CHIP>&);
+typedef fapi2::ReturnCode (*p9_update_security_ctrl_FP_t)(const fapi2::Target<fapi2::TARGET_TYPE_PROC_CHIP>&,
+ bool );
///
/// @param[in] i_target_chip Reference to TARGET_TYPE_PROC_CHIP target
+/// @param[in] i_force_security Forces setting of SUL and TDP (if attribute is set)
/// @return FAPI2_RC_SUCCESS if success, else error code.
extern "C"
{
- fapi2::ReturnCode p9_update_security_ctrl(const fapi2::Target<fapi2::TARGET_TYPE_PROC_CHIP>& i_target_chip);
+ fapi2::ReturnCode p9_update_security_ctrl(const fapi2::Target<fapi2::TARGET_TYPE_PROC_CHIP>& i_target_chip,
+ bool i_force_security = false);
}
#endif
OpenPOWER on IntegriCloud