summaryrefslogtreecommitdiffstats
path: root/src/lib
diff options
context:
space:
mode:
authorBrian Bakke <bbakke@us.ibm.com>2018-05-22 11:30:26 -0500
committerDaniel M. Crowell <dcrowell@us.ibm.com>2018-06-07 13:37:46 -0400
commite364f91be1727019dd594c57d496e5ce43e8f5f0 (patch)
tree3515d4777d5ca4705fc232b02110d6c480151eff /src/lib
parent0c6d58230e615000dee1a1940bf4bc84ad5c1798 (diff)
downloadtalos-hostboot-e364f91be1727019dd594c57d496e5ce43e8f5f0.tar.gz
talos-hostboot-e364f91be1727019dd594c57d496e5ce43e8f5f0.zip
Fixes to node IPC messaging to handle non-zero base addresses
Current code has each Node calculate each Remote Node's IPC area remote address by performing a fixed format calculation. This change has each Node calculating its IPC area Remote address and posting this value to a local SCOM register. A Node reads a Remote Node's SCOM register to acquire the Remote IPC area address. Change-Id: I25260ce180e0d07e5e81990d4c1f99e249912491 RTC:191463 Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/59177 Tested-by: Jenkins Server <pfd-jenkins+hostboot@us.ibm.com> Reviewed-by: William G. Hoffa <wghoffa@us.ibm.com> Tested-by: Jenkins OP Build CI <op-jenkins+hostboot@us.ibm.com> Tested-by: Jenkins OP HW <op-hw-jenkins+hostboot@us.ibm.com> Tested-by: FSP CI Jenkins <fsp-CI-jenkins+hostboot@us.ibm.com> Reviewed-by: Prachi Gupta <pragupta@us.ibm.com> Reviewed-by: Daniel M. Crowell <dcrowell@us.ibm.com>
Diffstat (limited to 'src/lib')
-rw-r--r--src/lib/syscall_msg.C30
1 files changed, 29 insertions, 1 deletions
diff --git a/src/lib/syscall_msg.C b/src/lib/syscall_msg.C
index e5a63920f..9004461c4 100644
--- a/src/lib/syscall_msg.C
+++ b/src/lib/syscall_msg.C
@@ -5,7 +5,7 @@
/* */
/* OpenPOWER HostBoot Project */
/* */
-/* Contributors Listed Below - COPYRIGHT 2010,2015 */
+/* Contributors Listed Below - COPYRIGHT 2010,2018 */
/* [+] International Business Machines Corp. */
/* */
/* */
@@ -151,3 +151,31 @@ msg_t* msg_wait(msg_q_t q)
return (msg_t*)_syscall1(MSG_WAIT, q);
}
+int updateRemoteIpcAddr(uint64_t i_Node, uint64_t i_RemoteAddr)
+{
+ return (int64_t)_syscall2(UPDATE_REMOTE_IPC_ADDR,
+ (void *)i_Node,
+ (void *)i_RemoteAddr);
+}
+
+int qryLocalIpcInfo(uint64_t & o_Node, uint64_t & o_Addr)
+{
+ // need to allocate a buffer on the heap as Kernel cannot
+ // store back to user stack buffer
+ uint64_t * l_pTmpBfr = new uint64_t[2];
+ l_pTmpBfr[0] = o_Node; // seed tmp bfr with contents of out bfr
+ l_pTmpBfr[1] = o_Addr; // to hide the existence of the
+ // intermediate tmp bfr
+ void * l_pNode = reinterpret_cast<void *>(&l_pTmpBfr[0]);
+ void * l_pAddr = reinterpret_cast<void *>(&l_pTmpBfr[1]);
+
+ void * l_retVal = _syscall2( QRY_LOCAL_IPC_INFO,
+ l_pNode,
+ l_pAddr );
+
+ o_Node = l_pTmpBfr[0];
+ o_Addr = l_pTmpBfr[1];
+ delete [] l_pTmpBfr;
+
+ return( reinterpret_cast<int64_t>(l_retVal) );
+}
OpenPOWER on IntegriCloud