summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorThi Tran <thi@us.ibm.com>2015-09-10 14:35:52 -0500
committerA. Patrick Williams III <iawillia@us.ibm.com>2015-09-11 13:09:52 -0500
commit2512b458dc679c86538f366126d2dab6c722fb75 (patch)
treef7fb005dd5c7679c520a7243db368f58f481dc65 /src
parent8f43ff9551b5237a2a98fcc74c32caa33c8fd480 (diff)
downloadtalos-hostboot-2512b458dc679c86538f366126d2dab6c722fb75.tar.gz
talos-hostboot-2512b458dc679c86538f366126d2dab6c722fb75.zip
SW318033: INITPROC: Add slave rank bit to mss_get_address_range in maint_cmds.C
Change-Id: Iffd8b4e55580797ba222dd3d34932f0246122905 CQ:SW318033 Reviewed-on: http://gfw160.aus.stglabs.ibm.com:8080/gerrit/20437 Reviewed-by: Thi N. Tran <thi@us.ibm.com> Tested-by: Thi N. Tran <thi@us.ibm.com> Reviewed-on: http://gfw160.aus.stglabs.ibm.com:8080/gerrit/20445 Tested-by: Jenkins Server Tested-by: Jenkins OP Build CI Tested-by: Jenkins OP HW Tested-by: FSP CI Jenkins Reviewed-by: A. Patrick Williams III <iawillia@us.ibm.com>
Diffstat (limited to 'src')
-rw-r--r--src/include/usr/hwpf/hwp/utility_procedures/mss_maint_cmds.H24
-rw-r--r--src/usr/hwpf/hwp/utility_procedures/mss_maint_cmds.C40
2 files changed, 54 insertions, 10 deletions
diff --git a/src/include/usr/hwpf/hwp/utility_procedures/mss_maint_cmds.H b/src/include/usr/hwpf/hwp/utility_procedures/mss_maint_cmds.H
index e31fe68c6..5f0fdd0a9 100644
--- a/src/include/usr/hwpf/hwp/utility_procedures/mss_maint_cmds.H
+++ b/src/include/usr/hwpf/hwp/utility_procedures/mss_maint_cmds.H
@@ -5,7 +5,9 @@
/* */
/* OpenPOWER HostBoot Project */
/* */
-/* COPYRIGHT International Business Machines Corp. 2013,2014 */
+/* Contributors Listed Below - COPYRIGHT 2013,2015 */
+/* [+] 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. */
@@ -20,7 +22,7 @@
/* permissions and limitations under the License. */
/* */
/* IBM_PROLOG_END_TAG */
-// $Id: mss_maint_cmds.H,v 1.22 2014/03/11 19:04:46 gollub Exp $
+// $Id: mss_maint_cmds.H,v 1.23 2015/08/11 20:09:21 lwmulkey Exp $
//------------------------------------------------------------------------------
// Don't forget to create CVS comments when you check in your changes!
//------------------------------------------------------------------------------
@@ -910,6 +912,24 @@ static const uint8_t mss_x8_chip_mark_to_centaurDQ[18][2]={
ecmdDataBufferBase & o_endAddr );
+/**
+ * @brief Calculates start and end address for a single slave rank
+ *
+ * @param i_target MBA target
+ * @param i_master master rank corresponding to the desired slave rank on the MBA to get start/end address
+ * for (0x00-0x07)
+ * @param i_slave Slave rank to get the address range for
+ * @param o_startAddr Address to start cmd at.
+ * @param o_endAddr Address to stop cmd at.
+ * @return Non-SUCCESS if an internal function fails, SUCCESS otherwise.
+ */
+ fapi::ReturnCode mss_get_slave_address_range( const fapi::Target & i_target,
+ uint8_t i_master,
+ uint8_t i_slave,
+ ecmdDataBufferBase & o_startAddr,
+ ecmdDataBufferBase & o_endAddr );
+
+
/**
* @brief Mark store is implemented as one register per rank, so read register
* for the given rank.
diff --git a/src/usr/hwpf/hwp/utility_procedures/mss_maint_cmds.C b/src/usr/hwpf/hwp/utility_procedures/mss_maint_cmds.C
index d6b42cc2b..3b8427b70 100644
--- a/src/usr/hwpf/hwp/utility_procedures/mss_maint_cmds.C
+++ b/src/usr/hwpf/hwp/utility_procedures/mss_maint_cmds.C
@@ -5,7 +5,7 @@
/* */
/* OpenPOWER HostBoot Project */
/* */
-/* Contributors Listed Below - COPYRIGHT 2013,2014 */
+/* Contributors Listed Below - COPYRIGHT 2013,2015 */
/* [+] International Business Machines Corp. */
/* */
/* */
@@ -22,7 +22,7 @@
/* permissions and limitations under the License. */
/* */
/* IBM_PROLOG_END_TAG */
-// $Id: mss_maint_cmds.C,v 1.37 2014/10/13 21:31:53 gollub Exp $
+// $Id: mss_maint_cmds.C,v 1.39 2015/08/12 17:46:32 lwmulkey Exp $
//------------------------------------------------------------------------------
// Don't forget to create CVS comments when you check in your changes!
//------------------------------------------------------------------------------
@@ -1369,8 +1369,8 @@ fapi::ReturnCode mss_MaintCmd::stopCmd()
ecmdDataBufferBase l_mbspa_and(64);
- // 1 ms delay for HW mode
- const uint64_t HW_MODE_DELAY = 100000000;
+ // 1 ms delay for HW mode -- LWM changed 100,000,000 to 1,000,000 to match comment
+ const uint64_t HW_MODE_DELAY = 1000000;
// 200000 sim cycle delay for SIM mode
const uint64_t SIM_MODE_DELAY = 200000;
@@ -1429,7 +1429,7 @@ fapi::ReturnCode mss_MaintCmd::stopCmd()
// Loop to check for cmd in progress bit to turn off
do
{
- // Wait 1ms
+ // Wait 1ms
fapiDelay(HW_MODE_DELAY, SIM_MODE_DELAY);
// Read MBMSRQ
@@ -2055,8 +2055,8 @@ fapi::ReturnCode mss_MaintCmd::stopCmd()
uint32_t count = 0;
-// 1 ms delay for HW mode
- const uint64_t HW_MODE_DELAY = 100000000;
+// 1 ms delay for HW mode -- LWM changed 100,000,000 to 1,000,000 to match comment
+ const uint64_t HW_MODE_DELAY = 1000000;
// 200000 sim cycle delay for SIM mode
const uint64_t SIM_MODE_DELAY = 200000;
@@ -4060,9 +4060,33 @@ fapi::ReturnCode mss_MaintCmd::stopCmd()
return l_rc;
}
+//------------------------------------------------------------------------------
+// mss_get_slave_address_range
+//------------------------------------------------------------------------------
+ fapi::ReturnCode mss_get_slave_address_range( const fapi::Target & i_target,
+ uint8_t i_master,
+ uint8_t i_slave,
+ ecmdDataBufferBase & o_startAddr,
+ ecmdDataBufferBase & o_endAddr )
+ {
+ fapi::ReturnCode l_rc;
+ uint32_t l_ecmd_rc = 0;
+ FAPI_INF("ENTER mss_get_slave_address_range()");
+ mss_get_address_range(i_target,i_master,o_startAddr,o_endAddr);
+ //START SLAVE RANK = 4:6
+ l_ecmd_rc |= o_startAddr.insert( i_slave, 4, 3, 8-3 );
+ //END SLAVE RANK = 4:6
+ l_ecmd_rc |= o_endAddr.insert( i_slave, 4, 3, 8-3 );
+ if(l_ecmd_rc)
+ {
+ l_rc.setEcmdError(l_ecmd_rc);
+ return l_rc;
+ }
+ FAPI_INF("EXIT mss_get_slave_address_range()");
-
+ return l_rc;
+ }
//------------------------------------------------------------------------------
// mss_get_mark_store
OpenPOWER on IntegriCloud