summaryrefslogtreecommitdiffstats
path: root/src/usr/util/utilmbox_scratch.C
diff options
context:
space:
mode:
authorDan Crowell <dcrowell@us.ibm.com>2016-08-08 11:06:31 -0500
committerDaniel M. Crowell <dcrowell@us.ibm.com>2016-08-29 11:54:59 -0400
commitf38f03fd5c0b267916d1f48a87afff67ad9ab3ed (patch)
tree3434b5a811d95f03b9f7568052fdab97db3c31f3 /src/usr/util/utilmbox_scratch.C
parenta24586804c3bdf9506c8af79e1adc69d0b478366 (diff)
downloadtalos-hostboot-f38f03fd5c0b267916d1f48a87afff67ad9ab3ed.tar.gz
talos-hostboot-f38f03fd5c0b267916d1f48a87afff67ad9ab3ed.zip
Apply BOOT_FLAGS onto slave sbe
Need to get the BOOT_FLAGS (scratch3) bits set into the slave sbe Also consolidated other code to use a single set of interfaces and structures. Change-Id: I670acb5cee1ab4fcebaa7be72aa3b986598873d3 Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/28003 Tested-by: Jenkins Server <pfd-jenkins+hostboot@us.ibm.com> Tested-by: FSP CI Jenkins <fsp-CI-jenkins+hostboot@us.ibm.com> Reviewed-by: Sachin Gupta <sgupta2m@in.ibm.com> Reviewed-by: Christian R. Geddes <crgeddes@us.ibm.com> Reviewed-by: Dean Sanner <dsanner@us.ibm.com> Reviewed-by: Daniel M. Crowell <dcrowell@us.ibm.com>
Diffstat (limited to 'src/usr/util/utilmbox_scratch.C')
-rw-r--r--src/usr/util/utilmbox_scratch.C15
1 files changed, 7 insertions, 8 deletions
diff --git a/src/usr/util/utilmbox_scratch.C b/src/usr/util/utilmbox_scratch.C
index 9a38b8dff..814a9026a 100644
--- a/src/usr/util/utilmbox_scratch.C
+++ b/src/usr/util/utilmbox_scratch.C
@@ -54,14 +54,14 @@ namespace Util
mutex_t g_mutex = MUTEX_INITIALIZER;
- uint64_t readScratchReg(uint64_t i_addr)
+ uint32_t readScratchReg(uint64_t i_addr)
{
size_t l_size = sizeof(uint64_t);
- uint64_t value = 0;
+ uint64_t l_value = 0;
errlHndl_t l_errl =
deviceRead(TARGETING::MASTER_PROCESSOR_CHIP_TARGET_SENTINEL,
- &value, l_size,
+ &l_value, l_size,
DEVICE_SCOM_ADDRESS(i_addr));
if (l_errl)
@@ -69,12 +69,14 @@ namespace Util
errlCommit(l_errl, UTIL_COMP_ID);
}
- return value;
+ return static_cast<uint32_t>(l_value >> 32);
}
- void writeScratchReg(uint64_t i_addr, uint64_t i_data)
+ void writeScratchReg(uint64_t i_addr, uint32_t i_data)
{
size_t l_size = sizeof(uint64_t);
+ uint64_t l_value = static_cast<uint64_t>(i_data);
+ l_value <<= 32; //data is in top half of scom reg
errlHndl_t l_errl =
deviceWrite(TARGETING::MASTER_PROCESSOR_CHIP_TARGET_SENTINEL,
@@ -94,9 +96,6 @@ namespace Util
uint64_t l_bufSize = (i_size & MSG_DATA_SIZE_MASK) |
(i_usage << MSG_USAGE_SHIFT);
- l_bufAddr <<=32;
- l_bufSize <<=32;
-
//Lock to prevent concurrent access
mutex_lock(&g_mutex);
OpenPOWER on IntegriCloud