From 29c37a0bd0bf4bc15e57cda0121901f756c7f67c Mon Sep 17 00:00:00 2001 From: Brian Stegmiller Date: Thu, 29 Jun 2017 10:12:08 -0500 Subject: [PATCH] PRD: Avoid Multicast read of unitCs and hostAttn during IPL steps 15 and 16 Change-Id: I7e837eec60d34bff6092db76e11706301cc15ebf RTC: 174385 Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/42598 Tested-by: Jenkins Server Reviewed-by: Caleb N. Palmer Reviewed-by: Benjamin J. Weisenbeck Reviewed-by: Zane C. Shelley Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/42634 Tested-by: Jenkins OP Build CI Tested-by: Jenkins OP HW --- .../diag/prdf/common/plat/p9/p9_nimbus.rule | 2 + src/usr/diag/prdf/common/plat/p9/prdfP9Proc.C | 43 ++++++++++++++++++- 2 files changed, 44 insertions(+), 1 deletion(-) diff --git a/src/usr/diag/prdf/common/plat/p9/p9_nimbus.rule b/src/usr/diag/prdf/common/plat/p9/p9_nimbus.rule index 981e5955204..dc0de383b36 100644 --- a/src/usr/diag/prdf/common/plat/p9/p9_nimbus.rule +++ b/src/usr/diag/prdf/common/plat/p9/p9_nimbus.rule @@ -72,6 +72,7 @@ chip p9_nimbus { name "Global Unit Checkstop FIR"; scomaddr 0x50040018; + capture req funccall("isUcsFirAccessible"); capture group default; }; @@ -83,6 +84,7 @@ chip p9_nimbus { name "Global Host Attention FIR"; scomaddr 0x50040009; + capture req funccall("isHostAttnFirAccessible"); capture group default; }; diff --git a/src/usr/diag/prdf/common/plat/p9/prdfP9Proc.C b/src/usr/diag/prdf/common/plat/p9/prdfP9Proc.C index ca59308bbb1..21ae3242e28 100644 --- a/src/usr/diag/prdf/common/plat/p9/prdfP9Proc.C +++ b/src/usr/diag/prdf/common/plat/p9/prdfP9Proc.C @@ -33,6 +33,10 @@ #include #include +#ifdef __HOSTBOOT_MODULE +#include +#endif + // Platform includes using namespace TARGETING; @@ -268,7 +272,7 @@ int32_t checkNimbusDD10( ExtensibleChip * i_chip, // It does look a little weird to return FAIL when the chip is Nimbus DD1.0, // but the purpose of this plugin is to give a non-SUCCESS return code to // the 'try' statement in rule code so that it will execute actions - // specifically for Nimbus DD1.0 in the default branch of the 'try' + // specifically for Nimbus DD1.0 in the default branch of the 'try'. // statement. if ( MODEL_NIMBUS == getChipModel(trgt) && 0x10 == getChipLevel(trgt) ) @@ -288,6 +292,43 @@ PRDF_PLUGIN_DEFINE_NS( p9_nimbus, Proc, checkNotNimbusDD10 ); //------------------------------------------------------------------------------ +int32_t isHostAttnFirAccessible(ExtensibleChip * i_chip, bool & o_isOkToAccess) +{ + o_isOkToAccess = false; + + // Host Processor side can always access the 'host' attn reg + // The FSP can not access it during IPL steps 15 thru 16.2 + // Host attn is only needed for MS diag and runtime case. + + if ( (true == atRuntime()) +#ifdef __HOSTBOOT_MODULE + || (true == isInMdiaMode()) +#endif + ) + { + o_isOkToAccess = true; + } + + return SUCCESS; +} +PRDF_PLUGIN_DEFINE_NS( p9_nimbus, Proc, isHostAttnFirAccessible ); + +//------------------------------------------------------------------------------ + +int32_t isUcsFirAccessible(ExtensibleChip * i_chip, bool & o_isOkToAccess) +{ + o_isOkToAccess = (true == atRuntime()) ? true : false; + + // Host Processor side can always access the 'unitCS' reg + // The FSP can not access it during IPL steps 15 thru 16.2 + // We don't really use unitCs at this time. + + return SUCCESS; +} +PRDF_PLUGIN_DEFINE_NS( p9_nimbus, Proc, isUcsFirAccessible ); + +//------------------------------------------------------------------------------ + } // end namespace Proc } // end namespace PRDF