Skip to content

Commit

Permalink
L3 updates -- p9_setup_bars, p9_fbc_smp_utils
Browse files Browse the repository at this point in the history
p9_setup_bars
  record all enabled regions and check for overlap
  update NPU region partial good checking logic
  correct INT TM1/IC BAR range checking
  create unique errors for each INT BAR

p9_fbc_smp_utils
  minor code cleanup

Change-Id: I50a362323c604d75a397ecc1a807015d31cf799e
Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/40227
Tested-by: Jenkins Server <pfd-jenkins+hostboot@us.ibm.com>
Tested-by: Hostboot CI <hostboot-ci+hostboot@us.ibm.com>
Reviewed-by: DHRUVARAJ SUBHASH CHANDRAN <dhruvaraj@in.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/40246
Tested-by: Jenkins OP Build CI <op-jenkins+hostboot@us.ibm.com>
Tested-by: FSP CI Jenkins <fsp-CI-jenkins+hostboot@us.ibm.com>
Reviewed-by: Daniel M. Crowell <dcrowell@us.ibm.com>
  • Loading branch information
jjmcgill authored and dcrowell77 committed May 23, 2017
1 parent f6f62b7 commit 379ea55
Show file tree
Hide file tree
Showing 7 changed files with 373 additions and 154 deletions.
49 changes: 22 additions & 27 deletions src/import/chips/p9/procedures/hwp/nest/p9_fbc_smp_utils.C
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
/* */
/* OpenPOWER HostBoot Project */
/* */
/* Contributors Listed Below - COPYRIGHT 2016 */
/* Contributors Listed Below - COPYRIGHT 2016,2017 */
/* [+] International Business Machines Corp. */
/* */
/* */
Expand All @@ -30,14 +30,13 @@
/// - Determination of a chip's group/chip ID
///
/// @author Joe McGill <jmcgill@us.ibm.com>
/// @author Christy Graves <clgraves@us.ibm.com>
///

//
// *HWP HWP Owner: Joe McGill <jmcgill@us.ibm.com>
// *HWP FW Owner: Thi Tran <thi@us.ibm.com>
// *HWP Team: Nest
// *HWP Level: 2
// *HWP Level: 3
// *HWP Consumed by: HB,FSP
//

Expand All @@ -62,7 +61,8 @@ fapi2::ReturnCode p9_fbc_utils_get_chip_id_attr(
fapi2::ReturnCode l_rc;

// Retrieve chip ID attribute
FAPI_TRY(FAPI_ATTR_GET(fapi2::ATTR_PROC_FABRIC_CHIP_ID, i_target,
FAPI_TRY(FAPI_ATTR_GET(fapi2::ATTR_PROC_FABRIC_CHIP_ID,
i_target,
o_chip_id),
"(PROC): Error getting ATTR_PROC_FABRIC_CHIP_ID, l_rc 0x%.8X",
(uint64_t)fapi2::current_err);
Expand All @@ -88,11 +88,9 @@ fapi2::ReturnCode p9_fbc_utils_get_chip_id_attr(
uint8_t& o_chip_id)
{
FAPI_DBG("(XBUS): Start");

fapi2::Target<fapi2::TARGET_TYPE_PROC_CHIP> l_procChip;
l_procChip = i_target.getParent<fapi2::TARGET_TYPE_PROC_CHIP>();

return (p9_fbc_utils_get_chip_id_attr(l_procChip, o_chip_id));
return (p9_fbc_utils_get_chip_id_attr(
i_target.getParent<fapi2::TARGET_TYPE_PROC_CHIP>(),
o_chip_id));
}

// Specialization for chiplet targets. See doxygen in header file.
Expand All @@ -102,11 +100,9 @@ fapi2::ReturnCode p9_fbc_utils_get_chip_id_attr(
uint8_t& o_chip_id)
{
FAPI_DBG("(OBUS): Start");

fapi2::Target<fapi2::TARGET_TYPE_PROC_CHIP> l_procChip;
l_procChip = i_target.getParent<fapi2::TARGET_TYPE_PROC_CHIP>();

return (p9_fbc_utils_get_chip_id_attr(l_procChip, o_chip_id));
return (p9_fbc_utils_get_chip_id_attr(
i_target.getParent<fapi2::TARGET_TYPE_PROC_CHIP>(),
o_chip_id));
}


Expand All @@ -120,19 +116,21 @@ fapi2::ReturnCode p9_fbc_utils_get_group_id_attr(
fapi2::ReturnCode l_rc;

// Retrieve group ID attribute
FAPI_TRY(FAPI_ATTR_GET(fapi2::ATTR_PROC_FABRIC_GROUP_ID, i_target,
FAPI_TRY(FAPI_ATTR_GET(fapi2::ATTR_PROC_FABRIC_GROUP_ID,
i_target,
o_group_id),
"(PROC): Error getting ATTR_FABRIC_GROUP_ID, l_rc 0x%.8X",
(uint64_t)fapi2::current_err);
// Print attribute value

// Display attribute value
FAPI_DBG("(PROC): ATTR_PROC_FABRIC_GROUP_ID = 0x%X", o_group_id);

FAPI_ASSERT(o_group_id < P9_FBC_UTILS_NUM_GROUP_IDS,
fapi2::P9_FBC_UTILS_FABRIC_GROUP_ID_ATTR_ERR()
.set_ATTR_DATA(o_group_id),
"(PROC): Invalid fabric group ID attribute value 0x%02X", o_group_id);
fapi_try_exit:

fapi_try_exit:
FAPI_DBG("(PROC): End");
return fapi2::current_err;
}
Expand All @@ -145,23 +143,20 @@ fapi2::ReturnCode p9_fbc_utils_get_group_id_attr(
uint8_t& o_group_id)
{
FAPI_DBG("(XBUS): Start");

fapi2::Target<fapi2::TARGET_TYPE_PROC_CHIP> l_procChip;
l_procChip = i_target.getParent<fapi2::TARGET_TYPE_PROC_CHIP>();

return (p9_fbc_utils_get_group_id_attr(l_procChip, o_group_id));
return (p9_fbc_utils_get_group_id_attr(
i_target.getParent<fapi2::TARGET_TYPE_PROC_CHIP>(),
o_group_id));
}


// Specialization for chiplet targets. See doxygen in header file.
template<>
fapi2::ReturnCode p9_fbc_utils_get_group_id_attr(
const fapi2::Target<fapi2::TARGET_TYPE_OBUS>& i_target,
uint8_t& o_group_id)
{
FAPI_DBG("(OBUS): Start");

fapi2::Target<fapi2::TARGET_TYPE_PROC_CHIP> l_procChip;
l_procChip = i_target.getParent<fapi2::TARGET_TYPE_PROC_CHIP>();

return (p9_fbc_utils_get_group_id_attr(l_procChip, o_group_id));
return (p9_fbc_utils_get_group_id_attr(
i_target.getParent<fapi2::TARGET_TYPE_PROC_CHIP>(),
o_group_id));
}
4 changes: 2 additions & 2 deletions src/import/chips/p9/procedures/hwp/nest/p9_fbc_smp_utils.H
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
/* */
/* OpenPOWER HostBoot Project */
/* */
/* Contributors Listed Below - COPYRIGHT 2016 */
/* Contributors Listed Below - COPYRIGHT 2016,2017 */
/* [+] International Business Machines Corp. */
/* */
/* */
Expand Down Expand Up @@ -33,7 +33,7 @@
// *HWP HWP Owner: Joe McGill <jmcgill@us.ibm.com>
// *HWP FW Owner: Thi Tran <thi@us.ibm.com>
// *HWP Team: Nest
// *HWP Level: 2
// *HWP Level: 3
// *HWP Consumed by: HB,FSP
//

Expand Down

0 comments on commit 379ea55

Please sign in to comment.