summaryrefslogtreecommitdiffstats
path: root/src/usr/diag/prdf/plat/mem/prdfMemTdCtlr.C
diff options
context:
space:
mode:
authorZane Shelley <zshelle@us.ibm.com>2016-11-09 15:52:48 -0600
committerZane C. Shelley <zshelle@us.ibm.com>2016-12-06 10:00:39 -0500
commit1613ef4b00c0a8fcf6b171cf51fc8ee61e9f356f (patch)
treeb49ec2bb214bf584e66be95b0d28c625e7e4fd30 /src/usr/diag/prdf/plat/mem/prdfMemTdCtlr.C
parentf8578ea4bc4244b999d5114bc752c24306a19586 (diff)
downloadtalos-hostboot-1613ef4b00c0a8fcf6b171cf51fc8ee61e9f356f.tar.gz
talos-hostboot-1613ef4b00c0a8fcf6b171cf51fc8ee61e9f356f.zip
PRD: Determine where to restart commands after cmd complete attn
Change-Id: Ibd39b252c3cb00946c061a2f8090af7a7de3e3f2 RTC: 157892 Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/32452 Tested-by: Jenkins Server <pfd-jenkins+hostboot@us.ibm.com> Reviewed-by: Caleb N. Palmer <cnpalmer@us.ibm.com> Reviewed-by: Benjamin J. Weisenbeck <bweisenb@us.ibm.com> Reviewed-by: Zane C. Shelley <zshelle@us.ibm.com> Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/33076 Tested-by: FSP CI Jenkins <fsp-CI-jenkins+hostboot@us.ibm.com>
Diffstat (limited to 'src/usr/diag/prdf/plat/mem/prdfMemTdCtlr.C')
-rw-r--r--src/usr/diag/prdf/plat/mem/prdfMemTdCtlr.C122
1 files changed, 122 insertions, 0 deletions
diff --git a/src/usr/diag/prdf/plat/mem/prdfMemTdCtlr.C b/src/usr/diag/prdf/plat/mem/prdfMemTdCtlr.C
new file mode 100644
index 000000000..5f7138271
--- /dev/null
+++ b/src/usr/diag/prdf/plat/mem/prdfMemTdCtlr.C
@@ -0,0 +1,122 @@
+/* IBM_PROLOG_BEGIN_TAG */
+/* This is an automatically generated prolog. */
+/* */
+/* $Source: src/usr/diag/prdf/plat/mem/prdfMemTdCtlr.C $ */
+/* */
+/* OpenPOWER HostBoot Project */
+/* */
+/* Contributors Listed Below - COPYRIGHT 2016 */
+/* [+] International Business Machines Corp. */
+/* */
+/* */
+/* Licensed under the Apache License, Version 2.0 (the "License"); */
+/* you may not use this file except in compliance with the License. */
+/* You may obtain a copy of the License at */
+/* */
+/* http://www.apache.org/licenses/LICENSE-2.0 */
+/* */
+/* Unless required by applicable law or agreed to in writing, software */
+/* distributed under the License is distributed on an "AS IS" BASIS, */
+/* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or */
+/* implied. See the License for the specific language governing */
+/* permissions and limitations under the License. */
+/* */
+/* IBM_PROLOG_END_TAG */
+
+#include <prdfMemTdCtlr.H>
+
+#include <prdfMemAddress.H>
+#include <prdfP9McbistDataBundle.H>
+
+using namespace TARGETING;
+
+namespace PRDF
+{
+
+using namespace PlatServices;
+
+//------------------------------------------------------------------------------
+
+template<>
+uint32_t MemTdCtlr<TYPE_MCBIST, McbistDataBundle *>::initStoppedRank()
+{
+ #define PRDF_FUNC "[initStoppedRank] "
+
+ uint32_t o_rc = SUCCESS;
+
+ do
+ {
+ // Get all ports in which the command was run. In broadcast mode, the
+ // rank configuration for all ports will be the same. In non-broadcast
+ // mode, there will only be one MCA in the list. Therefore, we can
+ // simply use the first MCA in the list for all configs.
+ std::vector<ExtensibleChip *> portList;
+ o_rc = getMcbistMaintPort( iv_chip, portList );
+ if ( SUCCESS != o_rc )
+ {
+ PRDF_ERR( PRDF_FUNC "getMcbistMaintPort(0x%08x) failed",
+ iv_chip->getHuid() );
+ break;
+ }
+
+ // Get the rank in which the command stopped.
+ MemAddr addr;
+ o_rc = getMemMaintAddr<TYPE_MCBIST>( iv_chip, addr );
+ if ( SUCCESS != o_rc )
+ {
+ PRDF_ERR( PRDF_FUNC "getMemMaintAddr<TYPE_MCBIST>(0x%08x) failed",
+ iv_chip->getHuid() );
+ break;
+ }
+
+ // Update iv_stoppedRank.
+ iv_stoppedRank = TdRankListEntry ( portList.front(), addr.getRank() );
+ #ifndef __HOSTBOOT_RUNTIME
+ // Update iv_broadcastMode.
+ iv_broadcastMode = ( 1 < portList.size() );
+ #endif
+
+ } while (0);
+
+ return o_rc;
+
+ #undef PRDF_FUNC
+}
+
+//------------------------------------------------------------------------------
+
+/* RTC 136128
+template<>
+uint32_t MemTdCtlr<TYPE_MBA, MbaDataBundle *>::initStoppedRank()
+{
+ #define PRDF_FUNC "[initStoppedRank] "
+
+ uint32_t o_rc = SUCCESS;
+
+ do
+ {
+ // Get the rank in which the command stopped.
+ MemAddr addr;
+ o_rc = getMemMaintAddr<TYPE_MBA>( iv_chip, addr );
+ if ( SUCCESS != o_rc )
+ {
+ PRDF_ERR( PRDF_FUNC "getMemMaintAddr<TYPE_MBA>(0x%08x) failed",
+ iv_chip->getHuid() );
+ break;
+ }
+
+ // Update iv_stoppedRank.
+ iv_stoppedRank = TdRankListEntry( iv_chip, addr.getRank() );
+
+ } while (0);
+
+ return o_rc;
+
+ #undef PRDF_FUNC
+}
+*/
+
+//------------------------------------------------------------------------------
+
+} // end namespace PRDF
+
OpenPOWER on IntegriCloud