Skip to content

Commit

Permalink
p9_fab_iovalid -- secure ABUS mailboxes after iovalid is asserted
Browse files Browse the repository at this point in the history
  Setting ABUS_LOCK in security switch register will
  return all zero data on future reads to secure mailboxes
  (even half-link, mbox 0)

Change-Id: Ie9e4c5f777032fce95ff83e81403cd3dc25368c7
Original-Change-Id: I6c661839b8661e073ba0e16ce594843e60355f85
Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/51817
Tested-by: FSP CI Jenkins <fsp-CI-jenkins+hostboot@us.ibm.com>
Tested-by: Hostboot CI <hostboot-ci+hostboot@us.ibm.com>
Tested-by: Jenkins Server <pfd-jenkins+hostboot@us.ibm.com>
Reviewed-by: Nicholas E. Bofferding <bofferdn@us.ibm.com>
Reviewed-by: Thi N. Tran <thi@us.ibm.com>
Reviewed-by: Jennifer A. Stofer <stofer@us.ibm.com>
Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/59111
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
jjmcgill authored and dcrowell77 committed May 26, 2018
1 parent 29144e0 commit fa70736
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions src/import/chips/p9/procedures/hwp/nest/p9_fab_iovalid.C
Original file line number Diff line number Diff line change
Expand Up @@ -956,6 +956,26 @@ p9_fab_iovalid(const fapi2::Target<fapi2::TARGET_TYPE_PROC_CHIP>& i_target,
FAPI_TRY(FAPI_ATTR_SET(fapi2::ATTR_PROC_FABRIC_A_LINK_DELAY, i_target, l_a_agg_link_delay),
"Error from FAPI_ATTR_GET (ATTR_PROC_FABRIC_A_LINK_DELAY");

// lock down secure ABUS mailboxes (even half link, mailbox 0), future
// read accessses will return 0
if (i_set_not_clear &&
i_manage_optical)
{
fapi2::buffer<uint64_t> l_security_switch;

FAPI_TRY(fapi2::getScom(i_target,
PU_SECURITY_SWITCH_REGISTER_SCOM,
l_security_switch),
"Error from getScom (PU_SECURITY_SWITCH_REGISTER_SCOM)");

l_security_switch.setBit<PU_SECURITY_SWITCH_REGISTER_ABUS_LOCK>();

FAPI_TRY(fapi2::putScom(i_target,
PU_SECURITY_SWITCH_REGISTER_SCOM,
l_security_switch),
"Error from putScom (PU_SECURITY_SWITCH_REGISTER_SCOM)");
}

fapi_try_exit:
FAPI_INF("End");
return fapi2::current_err;
Expand Down

0 comments on commit fa70736

Please sign in to comment.