diff options
-rw-r--r-- | src/include/usr/runtime/runtime.H | 6 | ||||
-rw-r--r-- | src/usr/mbox/ipcSp.C | 3 | ||||
-rw-r--r-- | src/usr/runtime/populate_attributes.C | 9 |
3 files changed, 18 insertions, 0 deletions
diff --git a/src/include/usr/runtime/runtime.H b/src/include/usr/runtime/runtime.H index 237c8bc02..433f82169 100644 --- a/src/include/usr/runtime/runtime.H +++ b/src/include/usr/runtime/runtime.H @@ -129,6 +129,12 @@ errlHndl_t writeActualCount( RUNTIME::SectionId i_id ); void add_host_data_ffdc( SectionId i_section, errlHndl_t& io_errlog ); +/* + * @brief Set the PAYLOAD_BASE attribute + * @param[in] i_payloadAddress in MEGABYTES + */ +void setPayloadBaseAddress(uint64_t i_payloadAddress); + } #endif diff --git a/src/usr/mbox/ipcSp.C b/src/usr/mbox/ipcSp.C index 920e82e77..26fad96a8 100644 --- a/src/usr/mbox/ipcSp.C +++ b/src/usr/mbox/ipcSp.C @@ -109,6 +109,9 @@ void IpcSp::msgHandler() } if(!err) { + RUNTIME::setPayloadBaseAddress + (reinterpret_cast<uint64_t>(msg->extra_data)); + err = RUNTIME::populate_node_attributes( msg->data[0] ); } diff --git a/src/usr/runtime/populate_attributes.C b/src/usr/runtime/populate_attributes.C index b1aa2c635..e6e9ff03b 100644 --- a/src/usr/runtime/populate_attributes.C +++ b/src/usr/runtime/populate_attributes.C @@ -760,6 +760,7 @@ errlHndl_t populate_attributes( void ) uint64_t this_node = INTR::PIR_t(task_getcpuid()).nodeId; task_affinity_unpin(); + uint64_t payloadBase = sys->getAttr<TARGETING::ATTR_PAYLOAD_BASE>(); //loop though all possible drawers whether they exist or not // An invalid or non-existant logical node number in that drawer @@ -785,6 +786,7 @@ errlHndl_t populate_attributes( void ) msg->type = IPC::IPC_POPULATE_ATTRIBUTES; msg->data[0] = drawer; // offset in attribute table msg->data[1] = this_node; // node to send a msg back to + msg->extra_data = reinterpret_cast<uint64_t*>(payloadBase); errhdl = MBOX::send(MBOX::HB_IPC_MSGQ, msg, node); if (errhdl) { @@ -817,4 +819,11 @@ errlHndl_t populate_attributes( void ) return errhdl; } +void setPayloadBaseAddress(uint64_t i_payloadAddress) +{ + TARGETING::Target * sys = NULL; + TARGETING::targetService().getTopLevelTarget( sys ); + sys->setAttr<TARGETING::ATTR_PAYLOAD_BASE>(i_payloadAddress); +} + } //namespace RUNTIME |