Skip to content

Commit

Permalink
First pass updates of scominfo for Cumulus.
Browse files Browse the repository at this point in the history
Change-Id: Id4d46a80959256b5dd815181e9424c3fdcc8b915
Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/38181
Tested-by: Jenkins Server <pfd-jenkins+hostboot@us.ibm.com>
Tested-by: Hostboot CI <hostboot-ci+hostboot@us.ibm.com>
Dev-Ready: Brent Wieman <bwieman@us.ibm.com>
Reviewed-by: Brent Wieman <bwieman@us.ibm.com>
Reviewed-by: JOSHUA L. HANNAN <jlhannan@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/38183
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
BenAtIBM authored and dcrowell77 committed Apr 7, 2017
1 parent 28dee47 commit b96a2fb
Show file tree
Hide file tree
Showing 3 changed files with 380 additions and 70 deletions.
1 change: 1 addition & 0 deletions src/import/chips/p9/common/scominfo/p9_cu.H
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@ extern "C"
PU_PPE_CHIPUNIT, ///< PPE
PU_SBE_CHIPUNIT, ///< SBE
PU_CAPP_CHIPUNIT, ///< CAPP
PU_MC_CHIPUNIT, ///< mc
NONE, ///< None/Invalid
} p9ChipUnits_t;

Expand Down
46 changes: 40 additions & 6 deletions src/import/chips/p9/common/scominfo/p9_scom_addr.H
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
/* */
/* OpenPOWER HostBoot Project */
/* */
/* Contributors Listed Below - COPYRIGHT 2015,2016 */
/* Contributors Listed Below - COPYRIGHT 2015,2017 */
/* [+] International Business Machines Corp. */
/* */
/* */
Expand Down Expand Up @@ -210,6 +210,14 @@ extern "C"
N3_PB_5_RING_ID = 0xe, ///< PB_5
} p9_n3_ring_id_t;


/// P9 N3 satellite ids
typedef enum
{
P9C_N3_MCS01_SAT_ID = 0,
P9C_N3_MCS23_SAT_ID = 2
} p9_n3_sat_id_t;

/// P9 XBUS chiplet SCOM ring ID enumeration
/// source: tpc_p9_xb_top.vhdl
typedef enum
Expand Down Expand Up @@ -262,7 +270,7 @@ extern "C"
MC_DIR_SAT_ID_ECC64_0 = 0x8,
MC_DIR_SAT_ID_ECC64_1 = 0x9,
MC_DIR_SAT_ID_ECC64_2 = 0xa,
MC_DIR_SAT_ID_ECC64_3 = 0xb,
MC_DIR_SAT_ID_ECC64_3 = 0xb
} p9_mc_dir0_sat_id_t;

//These are for registers that reside in the MCS chiplet, but
Expand All @@ -288,13 +296,24 @@ extern "C"

typedef enum
{
MC_DIR_SAT_ID_MCBIST = 0xC
MC_IND_SAT_ID = 0x0,
MC_DIR_SAT_ID_MCBIST = 0xC,
P9C_SAT_ID_CHAN_MCBIST = 0xD
} p9_mc_dir1_sat_id_t;


/// Cumulus mc rings
typedef enum
{
MC_IND_SAT_ID = 0x0
} p9_mc_ind_sat_id_t;
P9C_MC_CHAN_RING_ID = 0x2,
P9C_MC_IO_RING_ID = 0x4,
P9C_MC_BIST_RING_ID = 0x8
} p9c_mc_ring_id_t;

typedef enum
{
P9C_MC_OFFSET_IND = 0x3F
} p9c_mc_sat_offset_t;

/// P9 OB chiplet SCOM ring ID enumeration
/// source: tpc_p9_ob_top.vhdl
Expand Down Expand Up @@ -368,7 +387,6 @@ extern "C"
PPE_PB_SAT_ID = 0x0,
} p9_n3_ppe_sat_id;


// 8 7 6 5 4 3 2 1
//
// |0 1 2 3| |4 5 6 7| |8 9 10 11| |12 13 14 15| |16 17 18 19| |20 21 22 23| |24 25 26 27| |28 29 30 31|
Expand Down Expand Up @@ -521,6 +539,22 @@ extern "C"
return;
}

/// @brief Extract the RX or TX Group ID of an indirect scom address
/// @retval uint8_t Satellite register offset field value
inline uint8_t get_rxtx_group_id()
{
return (iv_addr >> 37) & 0x3F;
}

/// @brief Modify SCOM address, update the RX or TX Group ID
/// @param[in] i_grp_id Group id to set
/// @retval none
inline void set_rxtx_group_id(uint8_t i_grp_id)
{
iv_addr &= 0xFFFFF81FFFFFFFFFULL;
iv_addr |= (i_grp_id & 0x3FULL) << 37;
}

/// @brief Determine if SCOM address is valid/well-formed
/// @retval bool True if SCOM address is valid, false otherwise
inline bool is_valid() const
Expand Down

0 comments on commit b96a2fb

Please sign in to comment.