Skip to content

Commit

Permalink
Add Locking of Abus Sec Mailboxes
Browse files Browse the repository at this point in the history
Add logic to support Abus security mailbox locking to
p9_update_security_ctrl. This updated procedure will
be called in istep 18 to secure the Abus mailboxes.

Change-Id: Ie89df465299856d39dc5fa2bba6f9a9c38da469a
RTC: 191005
Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/59489
Tested-by: FSP CI Jenkins <fsp-CI-jenkins+hostboot@us.ibm.com>
Tested-by: Jenkins Server <pfd-jenkins+hostboot@us.ibm.com>
Tested-by: Hostboot CI <hostboot-ci+hostboot@us.ibm.com>
Reviewed-by: Nicholas E. Bofferding <bofferdn@us.ibm.com>
Reviewed-by: Michael Baiocchi <mbaiocch@us.ibm.com>
Reviewed-by: Jennifer A. Stofer <stofer@us.ibm.com>
Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/59495
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>
  • Loading branch information
Ilya Smirnov authored and dcrowell77 committed Jun 4, 2018
1 parent 07cf2ea commit b77dbed
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
/* */
/* OpenPOWER HostBoot Project */
/* */
/* Contributors Listed Below - COPYRIGHT 2016,2017 */
/* Contributors Listed Below - COPYRIGHT 2016,2018 */
/* [+] International Business Machines Corp. */
/* */
/* */
Expand Down Expand Up @@ -49,7 +49,8 @@


fapi2::ReturnCode p9_update_security_ctrl(const fapi2::Target<fapi2::TARGET_TYPE_PROC_CHIP>& i_target_chip,
bool i_force_security)
bool i_force_security,
bool i_lock_sec_mailboxes)
{
FAPI_INF("p9_update_security_ctrl : Entering ...");

Expand Down Expand Up @@ -82,6 +83,12 @@ fapi2::ReturnCode p9_update_security_ctrl(const fapi2::Target<fapi2::TARGET_TYPE
l_data64.setBit<PU_SECURITY_SWITCH_REGISTER_I2CM_TPM_DECONFIG_PROTECT>();
}

//Set bit 8 to set Abus mailbox lock
if(i_lock_sec_mailboxes)
{
l_data64.setBit<PU_SECURITY_SWITCH_REGISTER_ABUS_LOCK>();
}

FAPI_TRY(fapi2::putScom(i_target_chip, PU_SECURITY_SWITCH_REGISTER_SCOM, l_data64));
}
else
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
/* */
/* OpenPOWER HostBoot Project */
/* */
/* Contributors Listed Below - COPYRIGHT 2016,2017 */
/* Contributors Listed Below - COPYRIGHT 2016,2018 */
/* [+] International Business Machines Corp. */
/* */
/* */
Expand Down Expand Up @@ -51,11 +51,14 @@ typedef fapi2::ReturnCode (*p9_update_security_ctrl_FP_t)(const fapi2::Target<fa
///
/// @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)
/// @param[in] i_lock_sec_mailboxes Forces locking of Abus security mailboxes
/// (only if security is asserted on the machine).
/// @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,
bool i_force_security = false);
bool i_force_security = false,
bool i_lock_sec_mailboxes = false);
}

#endif

0 comments on commit b77dbed

Please sign in to comment.