diff options
-rw-r--r-- | src/usr/diag/prdf/plat/mem/prdfP9Mcbist.C | 32 | ||||
-rw-r--r-- | src/usr/diag/prdf/plat/mem/prdfP9McbistDataBundle.H | 40 |
2 files changed, 37 insertions, 35 deletions
diff --git a/src/usr/diag/prdf/plat/mem/prdfP9Mcbist.C b/src/usr/diag/prdf/plat/mem/prdfP9Mcbist.C index 94b3ba409..66b436307 100644 --- a/src/usr/diag/prdf/plat/mem/prdfP9Mcbist.C +++ b/src/usr/diag/prdf/plat/mem/prdfP9Mcbist.C @@ -51,8 +51,6 @@ namespace p9_mcbist // //############################################################################## -#ifndef __HOSTBOOT_RUNTIME - /** * @brief Plugin that initializes the data bundle. * @param i_mcbChip An MCBIST chip. @@ -69,16 +67,18 @@ PRDF_PLUGIN_DEFINE( p9_mcbist, Initialize ); * @brief Plugin function called after analysis is complete but before PRD * exits. * @param i_mcbChip An MCBIST chip. - * @param i_sc The step code data struct. + * @param io_sc The step code data struct. * @note This is especially useful for any analysis that still needs to be * done after the framework clears the FIR bits that were at attention. * @return SUCCESS. */ int32_t PostAnalysis( ExtensibleChip * i_mcbChip, - STEP_CODE_DATA_STRUCT & i_sc ) + STEP_CODE_DATA_STRUCT & io_sc ) { #define PRDF_FUNC "[p9_mcbist::PostAnalysis] " + #ifndef __HOSTBOOT_RUNTIME + // Send command complete to MDIA. // This must be done in post analysis after attentions have been cleared. @@ -96,14 +96,14 @@ int32_t PostAnalysis( ExtensibleChip * i_mcbChip, } } - return SUCCESS; // Intentionally return SUCCESS for this plugin + #endif // not __HOSTBOOT_RUNTIME + + return SUCCESS; // Always return SUCCESS for this plugin. #undef PRDF_FUNC } PRDF_PLUGIN_DEFINE( p9_mcbist, PostAnalysis ); -#endif // not __HOSTBOOT_RUNTIME - //############################################################################## // // MCBISTFIR @@ -113,26 +113,18 @@ PRDF_PLUGIN_DEFINE( p9_mcbist, PostAnalysis ); /** * @brief MCBIST[10] - MCBIST Command Complete. * @param i_mcbChip An MCBIST chip. - * @param i_sc The step code data struct. + * @param io_sc The step code data struct. * @return SUCCESS */ int32_t McbistCmdComplete( ExtensibleChip * i_mcbChip, - STEP_CODE_DATA_STRUCT & i_sc ) + STEP_CODE_DATA_STRUCT & io_sc ) { #define PRDF_FUNC "[p9_mcbist::McbistCmdComplete] " - // TODO: RTC 152592 - This code is only temporary so that we can get MDIA - // working in SIMICs. Eventually, we will add a call to the TD - // controller which will handle errors, restart commands, communicate - // with MDIA, etc. - #ifndef __HOSTBOOT_RUNTIME - - McbistDataBundle * mcbdb = getMcbistDataBundle( i_mcbChip ); - mcbdb->iv_sendCmdCompleteMsg = true; + // Tell the TD controller there was a command complete attention. + getMcbistDataBundle(i_mcbChip)->getTdCtlr()->handleCmdComplete( io_sc ); - #endif - - return SUCCESS; + return SUCCESS; // Always return SUCCESS for this plugin. #undef PRDF_FUNC } diff --git a/src/usr/diag/prdf/plat/mem/prdfP9McbistDataBundle.H b/src/usr/diag/prdf/plat/mem/prdfP9McbistDataBundle.H index 95b0976a3..4c55a8ee7 100644 --- a/src/usr/diag/prdf/plat/mem/prdfP9McbistDataBundle.H +++ b/src/usr/diag/prdf/plat/mem/prdfP9McbistDataBundle.H @@ -34,6 +34,7 @@ #include <prdfExtensibleChip.H> // Platform includes +#include <prdfMemTdCtlr.H> #include <prdfPlatServices.H> namespace PRDF @@ -44,45 +45,54 @@ class McbistDataBundle : public DataBundle { public: // functions - #ifdef __HOSTBOOT_RUNTIME - - /** - * @brief Constructor. - * @param i_mcbChip The MCBIST chip. - */ - explicit McbistDataBundle( ExtensibleChip * i_mcbChip ) = default; - - #else - /** * @brief Constructor. * @param i_mcbChip The MCBIST chip. */ explicit McbistDataBundle( ExtensibleChip * i_mcbChip ) : - iv_sendCmdCompleteMsg(false) + iv_chip(i_mcbChip) {} - #endif - /** @brief Destructor. */ - ~McbistDataBundle() = default; + ~McbistDataBundle() + { + delete iv_tdCtlr; iv_tdCtlr = nullptr; + } // Don't allow copy or assignment. McbistDataBundle( const McbistDataBundle & ) = delete; const McbistDataBundle & operator=( const McbistDataBundle & ) = delete; + /** @return The Targeted Diagnostics controller. */ + MemTdCtlr<TARGETING::TYPE_MCBIST,McbistDataBundle *> * getTdCtlr() + { + using namespace TARGETING; + + if ( nullptr == iv_tdCtlr ) + { + iv_tdCtlr = new MemTdCtlr<TYPE_MCBIST,McbistDataBundle *>{iv_chip}; + } + + return iv_tdCtlr; + } + public: // instance variables #ifndef __HOSTBOOT_RUNTIME /** TRUE if a message needs to be sent to MDIA in the post analysis plugin, * FALSE otherwise. */ - bool iv_sendCmdCompleteMsg; + bool iv_sendCmdCompleteMsg = false; #endif private: // instance variables + /** The MCBIST chip associated with this data bundle. */ + ExtensibleChip * const iv_chip; + + /** The Targeted Diagnostics controller. */ + MemTdCtlr<TARGETING::TYPE_MCBIST,McbistDataBundle *> * iv_tdCtlr = nullptr; }; /** |