summaryrefslogtreecommitdiffstats
path: root/src/usr/runtime
diff options
context:
space:
mode:
authorMarty Gloff <mgloff@us.ibm.com>2017-05-02 09:11:53 -0500
committerDaniel M. Crowell <dcrowell@us.ibm.com>2017-05-10 17:53:13 -0400
commit31ac6a9726ad142d6143910288c999af55fd2a1a (patch)
treee0472b39d484eeaee1f52a176f93441bb5740a68 /src/usr/runtime
parent240f26001382001974fff7d62367e58df3f7b1db (diff)
downloadtalos-hostboot-31ac6a9726ad142d6143910288c999af55fd2a1a.tar.gz
talos-hostboot-31ac6a9726ad142d6143910288c999af55fd2a1a.zip
Full Path of SBE message passing SBE Comm Buffer per SBE
Fix code that gets the SBE Communication buffer so that it gets a separate buffer per SBE. Also applies to FFDC buffer. Change-Id: I93b1a0f1a0d17a9ee360874511e711fbfb343a4a RTC:173582 Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/39936 Tested-by: Jenkins Server <pfd-jenkins+hostboot@us.ibm.com> Tested-by: FSP CI Jenkins <fsp-CI-jenkins+hostboot@us.ibm.com> Tested-by: Jenkins OP Build CI <op-jenkins+hostboot@us.ibm.com> Reviewed-by: Christian R. Geddes <crgeddes@us.ibm.com> Reviewed-by: Corey V. Swenson <cswenson@us.ibm.com> Reviewed-by: Daniel M. Crowell <dcrowell@us.ibm.com>
Diffstat (limited to 'src/usr/runtime')
-rw-r--r--src/usr/runtime/populate_hbruntime.C163
1 files changed, 82 insertions, 81 deletions
diff --git a/src/usr/runtime/populate_hbruntime.C b/src/usr/runtime/populate_hbruntime.C
index 56c320193..59e322b53 100644
--- a/src/usr/runtime/populate_hbruntime.C
+++ b/src/usr/runtime/populate_hbruntime.C
@@ -998,107 +998,108 @@ errlHndl_t populate_HbRsvMem(uint64_t i_nodeId)
}
+ ///////////////////////////////////////////////////
// SBE Communications buffer entry
+ // SBE FFDC entry
uint64_t l_sbeCommAddr = 0x0;
- l_label = HBRT_RSVD_MEM__SBE_COMM;
- l_labelSize = strlen(l_label) + 1;
uint64_t l_sbeCommSize = SBE_MSG::SBE_COMM_BUFFER_SIZE;
+ uint64_t l_sbeffdcAddr = 0x0;
+ uint64_t l_sbeffdcSize =
+ SBEIO::SbePsu::getTheInstance().getSbeFFDCBufferSize();
+
// Minimum 64K size for Opal
size_t l_sbeCommSizeAligned = ALIGN_X( l_sbeCommSize, 64*KILOBYTE );
+ size_t l_sbeffdcSizeAligned = ALIGN_X( l_sbeffdcSize, 64*KILOBYTE );
- if(TARGETING::is_phyp_load())
- {
- l_sbeCommAddr = l_prevDataAddr + l_prevDataSize;
- }
- else if(TARGETING::is_sapphire_load())
- {
- l_sbeCommAddr = l_prevDataAddr - l_sbeCommSizeAligned;
- }
-
- // Get a pointer to the next available HDAT HB Rsv Mem entry
- l_rngPtr = nullptr;
- l_elog = getNextRhbAddrRange(l_rngPtr);
- if(l_elog)
+ // Loop through all functional Procs
+ for (const auto & l_procChip: l_procChips)
{
- break;
- }
+ // -- SBE Communications buffer entry
+ if(TARGETING::is_phyp_load())
+ {
+ l_sbeCommAddr = l_prevDataAddr + l_prevDataSize;
+ }
+ else if(TARGETING::is_sapphire_load())
+ {
+ l_sbeCommAddr = l_prevDataAddr - l_sbeCommSizeAligned;
+ }
- // Fill in the entry
- l_rngPtr->hdatRhbRngType =
- static_cast<uint8_t>(HDAT::RHB_TYPE_HBRT);
- l_rngPtr->hdatRhbRngId = i_nodeId;
- l_rngPtr->hdatRhbAddrRngStrAddr =
- l_sbeCommAddr | VmmManager::FORCE_PHYS_ADDR;
- l_rngPtr->hdatRhbAddrRngEndAddr =
- (l_sbeCommAddr | VmmManager::FORCE_PHYS_ADDR)
- + l_sbeCommSizeAligned - 1 ;
- l_rngPtr->hdatRhbLabelSize = l_labelSize;
- memcpy( l_rngPtr->hdatRhbLabelString,
- l_label,
- l_labelSize );
- l_prevDataAddr = l_sbeCommAddr;
- l_prevDataSize = l_sbeCommSizeAligned;
+ // Get a pointer to the next available HDAT HB Rsv Mem entry
+ l_rngPtr = nullptr;
+ l_elog = getNextRhbAddrRange(l_rngPtr);
+ if(l_elog)
+ {
+ break;
+ }
- traceHbRsvMemRange(l_rngPtr);
+ // SBE Communications buffer label
+ l_label = HBRT_RSVD_MEM__SBE_COMM;
+ l_labelSize = strlen(l_label) + 1;
- // Loop through all functional Procs
- for (const auto & l_procChip: l_procChips)
- {
- l_procChip->setAttr<TARGETING::ATTR_SBE_COMM_ADDR>(l_sbeCommAddr);
+ // Fill in the entry
+ l_rngPtr->hdatRhbRngType =
+ static_cast<uint8_t>(HDAT::RHB_TYPE_HBRT);
+ l_rngPtr->hdatRhbRngId = i_nodeId;
+ l_rngPtr->hdatRhbAddrRngStrAddr =
+ l_sbeCommAddr | VmmManager::FORCE_PHYS_ADDR;
+ l_rngPtr->hdatRhbAddrRngEndAddr =
+ (l_sbeCommAddr | VmmManager::FORCE_PHYS_ADDR)
+ + l_sbeCommSizeAligned - 1 ;
+ l_rngPtr->hdatRhbLabelSize = l_labelSize;
+ memcpy( l_rngPtr->hdatRhbLabelString,
+ l_label,
+ l_labelSize );
+ l_prevDataAddr = l_sbeCommAddr;
+ l_prevDataSize = l_sbeCommSizeAligned;
- }
+ traceHbRsvMemRange(l_rngPtr);
+ // Save SBE Communication buffer address to attribute
+ l_procChip->setAttr<TARGETING::ATTR_SBE_COMM_ADDR>(l_sbeCommAddr);
- // SBE FFDC entry
- uint64_t l_sbeffdcAddr = 0x0;
- l_label = HBRT_RSVD_MEM__SBE_FFDC;
- l_labelSize = strlen(l_label) + 1;
- uint64_t l_sbeffdcSize =
- SBEIO::SbePsu::getTheInstance().getSbeFFDCBufferSize();
+ // -- SBE FFDC entry
- // Minimum 64K size for Opal
- size_t l_sbeffdcSizeAligned = ALIGN_X( l_sbeffdcSize, 64*KILOBYTE );
+ if(TARGETING::is_phyp_load())
+ {
+ l_sbeffdcAddr = l_prevDataAddr + l_prevDataSize;
+ }
+ else if(TARGETING::is_sapphire_load())
+ {
+ l_sbeffdcAddr = l_prevDataAddr - l_sbeffdcSizeAligned;
+ }
- if(TARGETING::is_phyp_load())
- {
- l_sbeffdcAddr = l_prevDataAddr + l_prevDataSize;
- }
- else if(TARGETING::is_sapphire_load())
- {
- l_sbeffdcAddr = l_prevDataAddr - l_sbeffdcSizeAligned;
- }
+ // Get a pointer to the next available HDAT HB Rsv Mem entry
+ l_rngPtr = nullptr;
+ l_elog = getNextRhbAddrRange(l_rngPtr);
+ if(l_elog)
+ {
+ break;
+ }
- // Get a pointer to the next available HDAT HB Rsv Mem entry
- l_rngPtr = nullptr;
- l_elog = getNextRhbAddrRange(l_rngPtr);
- if(l_elog)
- {
- break;
- }
+ // SBE FFDC label
+ l_label = HBRT_RSVD_MEM__SBE_FFDC;
+ l_labelSize = strlen(l_label) + 1;
- // Fill in the entry
- l_rngPtr->hdatRhbRngType =
- static_cast<uint8_t>(HDAT::RHB_TYPE_HBRT);
- l_rngPtr->hdatRhbRngId = i_nodeId;
- l_rngPtr->hdatRhbAddrRngStrAddr =
- l_sbeffdcAddr | VmmManager::FORCE_PHYS_ADDR;
- l_rngPtr->hdatRhbAddrRngEndAddr =
- (l_sbeffdcAddr | VmmManager::FORCE_PHYS_ADDR)
- + l_sbeffdcSizeAligned - 1 ;
- l_rngPtr->hdatRhbLabelSize = l_labelSize;
- memcpy( l_rngPtr->hdatRhbLabelString,
- l_label,
- l_labelSize );
- l_prevDataAddr = l_sbeffdcAddr;
- l_prevDataSize = l_sbeffdcSizeAligned;
+ // Fill in the entry
+ l_rngPtr->hdatRhbRngType =
+ static_cast<uint8_t>(HDAT::RHB_TYPE_HBRT);
+ l_rngPtr->hdatRhbRngId = i_nodeId;
+ l_rngPtr->hdatRhbAddrRngStrAddr =
+ l_sbeffdcAddr | VmmManager::FORCE_PHYS_ADDR;
+ l_rngPtr->hdatRhbAddrRngEndAddr =
+ (l_sbeffdcAddr | VmmManager::FORCE_PHYS_ADDR)
+ + l_sbeffdcSizeAligned - 1 ;
+ l_rngPtr->hdatRhbLabelSize = l_labelSize;
+ memcpy( l_rngPtr->hdatRhbLabelString,
+ l_label,
+ l_labelSize );
+ l_prevDataAddr = l_sbeffdcAddr;
+ l_prevDataSize = l_sbeffdcSizeAligned;
- traceHbRsvMemRange(l_rngPtr);
+ traceHbRsvMemRange(l_rngPtr);
- // Send Set FFDC Address for each functional proc
- for (const auto & l_procChip: l_procChips)
- {
- // Call sendSetFFDCAddr, tell SBE where to write FFDC and messages
+ // Send Set FFDC Address, tell SBE where to write FFDC and messages
l_elog = SBEIO::sendSetFFDCAddr(l_sbeffdcSize,
l_sbeCommSize,
l_sbeffdcAddr,
OpenPOWER on IntegriCloud