diff options
author | Brian Bakke <bbakke@us.ibm.com> | 2018-05-22 11:30:26 -0500 |
---|---|---|
committer | Daniel M. Crowell <dcrowell@us.ibm.com> | 2018-06-07 13:37:46 -0400 |
commit | e364f91be1727019dd594c57d496e5ce43e8f5f0 (patch) | |
tree | 3515d4777d5ca4705fc232b02110d6c480151eff /src/include/kernel | |
parent | 0c6d58230e615000dee1a1940bf4bc84ad5c1798 (diff) | |
download | talos-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/include/kernel')
-rw-r--r-- | src/include/kernel/ipc.H | 39 | ||||
-rw-r--r-- | src/include/kernel/syscalls.H | 8 |
2 files changed, 45 insertions, 2 deletions
diff --git a/src/include/kernel/ipc.H b/src/include/kernel/ipc.H index eeeea2d4b..a29d982a1 100644 --- a/src/include/kernel/ipc.H +++ b/src/include/kernel/ipc.H @@ -5,7 +5,7 @@ /* */ /* OpenPOWER HostBoot Project */ /* */ -/* Contributors Listed Below - COPYRIGHT 2013,2015 */ +/* Contributors Listed Below - COPYRIGHT 2013,2018 */ /* [+] International Business Machines Corp. */ /* */ /* */ @@ -26,6 +26,7 @@ #define __IPC_H #include <sys/msg.h> +#include <sys/internode.h> #define IPC_DATA_AREA_LOCKED 0xFFFFFFFFFFFFFFFFul #define IPC_DATA_AREA_READ 0xFFFFFFFFFFFFFFFEul @@ -33,12 +34,48 @@ namespace KernelIpc { + + /** @fn send() + * @brief Send an IPC message to a remote node + * + * @param[in] i_q - message queue + * @param[in] i_msg - message + * + * @note + */ + int send(uint64_t i_q, msg_t * i_msg); + + /** @fn updateRemoteIpcAddr() + * @brief update the Remote Address used to send IPC + * messages to the specified node + * + * @param[in] i_node - node + * @param[in] i_remoteAddr - IPC address of Remote Node's ipc_data_area + * + * @note + */ + int updateRemoteIpcAddr(uint64_t i_node, uint64_t i_remoteAddr); + + /** @fn qryLocalIpcInfo() + * @brief query the node and remote address other nodes will use to + * send messages to this IPC instance. + * + * @param[in] i_pONode - buffer the node will be returned in + * @param[in] i_pOAddr - buffer the address will be returned in + * + * @note + */ + int qryLocalIpcInfo(uint64_t * i_pONode, uint64_t * i_pOAddr); + + struct ipc_data_area_t { uint64_t msg_queue_id; msg_t msg_payload; uint64_t hrmor_base; uint32_t pir; + struct ipc_data_area_t * + remote_ipc_data_addr[internode_info_vals_t::MAX_NODES_PER_SYS]; }; /** diff --git a/src/include/kernel/syscalls.H b/src/include/kernel/syscalls.H index c7a03d6b6..c606ad771 100644 --- a/src/include/kernel/syscalls.H +++ b/src/include/kernel/syscalls.H @@ -126,7 +126,13 @@ namespace Systemcalls /** set_mchk_data() */ MISC_SETMCHKDATA, - SYSCALL_MAX + /** updateRemoteIpcAddr() */ + UPDATE_REMOTE_IPC_ADDR, + + /** qryLocalIpcInfo() */ + QRY_LOCAL_IPC_INFO, + + SYSCALL_MAX }; /** @enum SysCalls_FastPath |