diff options
Diffstat (limited to 'src/usr/diag/prdf/common/plugins')
5 files changed, 73 insertions, 37 deletions
diff --git a/src/usr/diag/prdf/common/plugins/prdfLogParse_common.C b/src/usr/diag/prdf/common/plugins/prdfLogParse_common.C index c6cd47d0b..08aa11600 100644 --- a/src/usr/diag/prdf/common/plugins/prdfLogParse_common.C +++ b/src/usr/diag/prdf/common/plugins/prdfLogParse_common.C @@ -237,6 +237,18 @@ void getTargetInfo( HUID i_chipId, TARGETING::TYPE & o_targetType, l_node, l_chip, l_chiplet ); break; + case TYPE_OCMB_CHIP: + snprintf( o_chipName, i_sz_chipName, "ocmb(n%dp%d)", + l_node, l_chip ); + break; + + case TYPE_MEM_PORT: + l_chip = l_chip / MAX_PORT_PER_OCMB; + l_chiplet = l_chiplet % MAX_PORT_PER_OCMB; + snprintf( o_chipName, i_sz_chipName, "memport(n%dp%dc%d)", + l_node, l_chip, l_chiplet ); + break; + case TYPE_MCS: l_chip = l_chip / MAX_MCS_PER_PROC; l_chiplet = l_chiplet % MAX_MCS_PER_PROC; @@ -286,6 +298,13 @@ void getTargetInfo( HUID i_chipId, TARGETING::TYPE & o_targetType, l_node, l_chip, l_chiplet ); break; + case TYPE_OMI: + l_chip = l_chip / MAX_OMI_PER_PROC; + l_chiplet = l_chiplet % MAX_OMI_PER_PROC; + snprintf( o_chipName, i_sz_chipName, "omi(n%dp%dc%d)", + l_node, l_chip, l_chiplet ); + break; + case TYPE_MEMBUF: snprintf( o_chipName, i_sz_chipName, "mb(n%dp%d)", l_node, l_chip ); diff --git a/src/usr/diag/prdf/common/plugins/prdfMemLogParse.C b/src/usr/diag/prdf/common/plugins/prdfMemLogParse.C index 390178f6e..1518319d1 100644 --- a/src/usr/diag/prdf/common/plugins/prdfMemLogParse.C +++ b/src/usr/diag/prdf/common/plugins/prdfMemLogParse.C @@ -2848,17 +2848,22 @@ void initMemMruStrings( MemoryMruData::MemMruMeld i_mm, bool & o_addDramSite, memset( o_header, '\0', HEADER_SIZE ); memset( o_data, '\0', DATA_SIZE ); - // Get the position info (default MCA). - const char * compStr = "mca"; + // Get the position info (default MBA). + + const char * compStr = "mba"; uint8_t nodePos = i_mm.s.nodePos; - uint8_t chipPos = i_mm.s.procPos; - uint8_t compPos = i_mm.s.chnlPos; + uint8_t chipPos = (i_mm.s.procPos << 3) | i_mm.s.chnlPos; + uint8_t compPos = i_mm.s.mbaPos; - if ( !i_mm.s.isMca ) // MBA + if ( i_mm.s.isMca ) // MCA + { + compStr = "mca"; + chipPos = i_mm.s.procPos; + compPos = i_mm.s.chnlPos; + } + else if ( i_mm.s.isOcmb ) // OCMB { - compStr = "mba"; - chipPos = (i_mm.s.procPos << 3) | i_mm.s.chnlPos; - compPos = i_mm.s.mbaPos; + compStr = "ocmb"; } // Build the header string. @@ -2953,13 +2958,13 @@ void addDramSiteString( const MemoryMruData::ExtendedData & i_extMemMru, } } } - else // IS DIMMs + else // Dram site locations not supported { // Add DQ info. char tmp[DATA_SIZE] = { '\0' }; strcat( io_data, "DQ:" ); - if ( mm.s.isMca ) // MCA + if ( mm.s.isMca || mm.s.isOcmb ) // MCA, OCMB { // There is only one DQ per symbol. snprintf( tmp, DATA_SIZE, "%d", i_extMemMru.dqMapping[dqIdx] ); diff --git a/src/usr/diag/prdf/common/plugins/prdfMemoryMruData.H b/src/usr/diag/prdf/common/plugins/prdfMemoryMruData.H index a9a4498d3..f2fdaff26 100644 --- a/src/usr/diag/prdf/common/plugins/prdfMemoryMruData.H +++ b/src/usr/diag/prdf/common/plugins/prdfMemoryMruData.H @@ -5,7 +5,7 @@ /* */ /* OpenPOWER HostBoot Project */ /* */ -/* Contributors Listed Below - COPYRIGHT 2013,2017 */ +/* Contributors Listed Below - COPYRIGHT 2013,2019 */ /* [+] International Business Machines Corp. */ /* */ /* */ @@ -88,6 +88,10 @@ union MemMruMeld // version field so that the error log parser know which format to // used. + // NOTE: For OCMBs, specified by the isOcmb field, chnlPos will specify + // the MCC position within the proc and mbaPos will specify the + // OMI position within the channel. + #if !( __BYTE_ORDER == __LITTLE_ENDIAN ) uint32_t valid : 1; ///< Used to indicate nothing failed while @@ -106,13 +110,15 @@ union MemMruMeld uint32_t eccSpared : 1; ///< True if symbol is on ECC DRAM uint32_t srank : 3; ///< Slave rank (0-7) // If isMca is specified, then chnlPos above will specify the MCA pos - // and the mbaPos field will be unused + // and the mbaPos field will be unused. See above note for OCMB usage. uint32_t isMca : 1; ///< True if MCA is used as opposed to MBA - uint32_t unused : 3; ///< 3 Bits currently unused + uint32_t isOcmb : 1; ///< True if OCMB is used + uint32_t unused : 2; ///< 2 Bits currently unused #else // Need to reverse this to make the uint32_t look right in the // simulator. - uint32_t unused : 3; + uint32_t unused : 2; + uint32_t isOcmb : 1; uint32_t isMca : 1; uint32_t srank : 3; uint32_t eccSpared : 1; diff --git a/src/usr/diag/prdf/common/plugins/prdfParserEnums.H b/src/usr/diag/prdf/common/plugins/prdfParserEnums.H index af346e57b..1001e185f 100644 --- a/src/usr/diag/prdf/common/plugins/prdfParserEnums.H +++ b/src/usr/diag/prdf/common/plugins/prdfParserEnums.H @@ -109,8 +109,14 @@ enum PositionBounds MAX_OMI_PER_MCC = 2, MAX_OMI_PER_OMIC = 3, + MAX_OMI_PER_MC = 8, + MAX_OMI_PER_PROC = MAX_OMI_PER_MC * MAX_MC_PER_PROC, MAX_OCMB_PER_OMI = 1, + MAX_OCMB_PER_MCC = MAX_OCMB_PER_OMI * MAX_OMI_PER_MCC, + + // TODO RTC 210072 - Support multiple ports + MAX_PORT_PER_OCMB = 1, MAX_SUB_PORT = 2, diff --git a/src/usr/diag/prdf/common/plugins/prdfParserUtils.C b/src/usr/diag/prdf/common/plugins/prdfParserUtils.C index 9d2233e75..2f9bdb458 100644 --- a/src/usr/diag/prdf/common/plugins/prdfParserUtils.C +++ b/src/usr/diag/prdf/common/plugins/prdfParserUtils.C @@ -87,9 +87,9 @@ uint8_t symbol2Dq<TARGETING::TYPE_MCA>( uint8_t i_symbol ) //------------------------------------------------------------------------------ template<> -uint8_t symbol2Dq<TARGETING::TYPE_MEM_PORT>( uint8_t i_symbol ) +uint8_t symbol2Dq<TARGETING::TYPE_OCMB_CHIP>( uint8_t i_symbol ) { - // MEM_PORT case is identical to MCA + // OCMB_CHIP case is identical to MCA return symbol2Dq<TARGETING::TYPE_MCA>(i_symbol); } @@ -122,10 +122,12 @@ uint8_t symbol2PortSlct<TARGETING::TYPE_MCA>( uint8_t i_symbol ) //------------------------------------------------------------------------------ template<> -uint8_t symbol2PortSlct<TARGETING::TYPE_MEM_PORT>( uint8_t i_symbol ) +uint8_t symbol2PortSlct<TARGETING::TYPE_OCMB_CHIP>( uint8_t i_symbol ) { - // Port select does not exist on MEM_PORT. Always return 0 so that code will - // continue to work. + // TODO RTC 210072 - Explorer only has one port, as such we can just + // return 0. However, multiple ports will be supported in the future, + // We'll need to figure out how to convert the symbol to a port select for + // OCMB at that time. return 0; } @@ -149,8 +151,8 @@ uint8_t dq2Symbol<TARGETING::TYPE_MBA>( uint8_t i_dq, uint8_t i_ps ) //------------------------------------------------------------------------------ -template<> -uint8_t dq2Symbol<TARGETING::TYPE_MCA>( uint8_t i_dq, uint8_t i_ps ) +template<TARGETING::TYPE T> +uint8_t dq2Symbol( uint8_t i_dq, uint8_t i_ps ) { uint8_t symbol = SYMBOLS_PER_RANK; @@ -175,14 +177,12 @@ uint8_t dq2Symbol<TARGETING::TYPE_MCA>( uint8_t i_dq, uint8_t i_ps ) return symbol; } -//------------------------------------------------------------------------------ - -template<> -uint8_t dq2Symbol<TARGETING::TYPE_MEM_PORT>( uint8_t i_dq, uint8_t i_ps ) -{ - // MEM_PORT case is identical to MCA - return dq2Symbol<TARGETING::TYPE_MCA>( i_dq, i_ps ); -} +template +uint8_t dq2Symbol<TARGETING::TYPE_MCA>( uint8_t i_dq, uint8_t i_ps ); +template +uint8_t dq2Symbol<TARGETING::TYPE_MEM_PORT>( uint8_t i_dq, uint8_t i_ps ); +template +uint8_t dq2Symbol<TARGETING::TYPE_OCMB_CHIP>( uint8_t i_dq, uint8_t i_ps ); //------------------------------------------------------------------------------ @@ -218,9 +218,9 @@ uint8_t nibble2Symbol<TARGETING::TYPE_MCA>( uint8_t i_x4Dram ) //------------------------------------------------------------------------------ template<> -uint8_t nibble2Symbol<TARGETING::TYPE_MEM_PORT>( uint8_t i_x4Dram ) +uint8_t nibble2Symbol<TARGETING::TYPE_OCMB_CHIP>( uint8_t i_x4Dram ) { - // MEM_PORT case is identical to MCA + // OCMB_CHIP case is identical to MCA return nibble2Symbol<TARGETING::TYPE_MCA>(i_x4Dram); } @@ -258,9 +258,9 @@ uint8_t byte2Symbol<TARGETING::TYPE_MCA>( uint8_t i_x8Dram ) //------------------------------------------------------------------------------ template<> -uint8_t byte2Symbol<TARGETING::TYPE_MEM_PORT>( uint8_t i_x8Dram ) +uint8_t byte2Symbol<TARGETING::TYPE_OCMB_CHIP>( uint8_t i_x8Dram ) { - // MEM_PORT case is identical to MCA + // OCMB_CHIP case is identical to MCA return byte2Symbol<TARGETING::TYPE_MCA>(i_x8Dram); } @@ -286,9 +286,9 @@ uint8_t symbol2Nibble<TARGETING::TYPE_MCA>( uint8_t i_symbol ) //------------------------------------------------------------------------------ template<> -uint8_t symbol2Nibble<TARGETING::TYPE_MEM_PORT>( uint8_t i_symbol ) +uint8_t symbol2Nibble<TARGETING::TYPE_OCMB_CHIP>( uint8_t i_symbol ) { - // MEM_PORT case is identical to MCA + // OCMB_CHIP case is identical to MCA return symbol2Nibble<TARGETING::TYPE_MCA>(i_symbol); } @@ -314,9 +314,9 @@ uint8_t symbol2Byte<TARGETING::TYPE_MCA>( uint8_t i_symbol ) //------------------------------------------------------------------------------ template<> -uint8_t symbol2Byte<TARGETING::TYPE_MEM_PORT>( uint8_t i_symbol ) +uint8_t symbol2Byte<TARGETING::TYPE_OCMB_CHIP>( uint8_t i_symbol ) { - // MEM_PORT case is identical to MCA + // OCMB_CHIP case is identical to MCA return symbol2Byte<TARGETING::TYPE_MCA>(i_symbol); } |