summaryrefslogtreecommitdiffstats
path: root/src/usr/util
diff options
context:
space:
mode:
authorMike Baiocchi <mbaiocch@us.ibm.com>2018-04-17 13:41:18 -0500
committerDaniel M. Crowell <dcrowell@us.ibm.com>2018-04-18 17:22:11 -0400
commit2d3cfebc29cc581d61719bf778fe06804024f0b3 (patch)
tree2bd85d03cdc7aa6cf9394088faa10753ec70a1bf /src/usr/util
parent48b001dafc539b10ac830cb82dad59875419b66b (diff)
downloadtalos-hostboot-2d3cfebc29cc581d61719bf778fe06804024f0b3.tar.gz
talos-hostboot-2d3cfebc29cc581d61719bf778fe06804024f0b3.zip
Use HRMOR-relative addresses for temporary PAYLOAD and HDAT memory
The FSP DMAs-via-TCEs the PAYLOAD and HDAT sections into HRMOR-relative memory on the master node. However, istep21's verifyAndMove() function was not using HRMOR-relative physical addresses and failed when node0 was not configured. These changes should address this and similar code using these address spaces. Change-Id: Idba95a97de9906ba6c0203f797b526eab694b8cf CQ:SW425130 Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/57357 CI-Ready: Michael Baiocchi <mbaiocch@us.ibm.com> Reviewed-by: ILYA SMIRNOV <ismirno@us.ibm.com> Tested-by: Jenkins Server <pfd-jenkins+hostboot@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: Nicholas E. Bofferding <bofferdn@us.ibm.com> Reviewed-by: Daniel M. Crowell <dcrowell@us.ibm.com>
Diffstat (limited to 'src/usr/util')
-rw-r--r--src/usr/util/utilmclmgr.C26
-rw-r--r--src/usr/util/utiltcemgr.C4
2 files changed, 20 insertions, 10 deletions
diff --git a/src/usr/util/utilmclmgr.C b/src/usr/util/utilmclmgr.C
index a89c124b8..5df056299 100644
--- a/src/usr/util/utilmclmgr.C
+++ b/src/usr/util/utilmclmgr.C
@@ -27,6 +27,7 @@
#include <util/util_reasoncodes.H>
#include "utilbase.H"
#include <sys/mm.h>
+#include <sys/misc.h>
#include <errl/errlentry.H>
#include <errl/errlmanager.H>
#include <initservice/initserviceif.H>
@@ -94,21 +95,30 @@ void CompInfo::print() const
////////////////////////////////////////////////////////////////////////////////
MasterContainerLidMgr::MasterContainerLidMgr()
-: iv_mclAddr(MCL_ADDR), iv_mclSize(MCL_SIZE), iv_tmpAddr(MCL_TMP_ADDR),
- iv_tmpSize(MCL_TMP_SIZE), iv_maxSize(0), iv_pMclVaddr(nullptr),
- iv_pTempVaddr(nullptr), iv_pVaddr(nullptr), iv_compInfoCache{},
- iv_hasHeader(true)
+: iv_mclSize(MCL_SIZE), iv_tmpSize(MCL_TMP_SIZE), iv_maxSize(0),
+ iv_pMclVaddr(nullptr), iv_pTempVaddr(nullptr), iv_pVaddr(nullptr),
+ iv_compInfoCache{}, iv_hasHeader(true)
{
+ // Need to make Memory spaces HRMOR-relative
+ uint64_t hrmorVal = cpu_spr_value(CPU_SPR_HRMOR);
+ iv_mclAddr = hrmorVal - VMM_HRMOR_OFFSET + MCL_ADDR;
+ iv_tmpAddr = hrmorVal - VMM_HRMOR_OFFSET + MCL_TMP_ADDR;
+
initMcl();
}
MasterContainerLidMgr::MasterContainerLidMgr(const void* i_pMcl,
const size_t i_size)
-: iv_mclAddr(MCL_ADDR), iv_mclSize(MCL_SIZE), iv_tmpAddr(MCL_TMP_ADDR),
- iv_tmpSize(MCL_TMP_SIZE), iv_maxSize(0), iv_pMclVaddr(nullptr),
- iv_pTempVaddr(nullptr), iv_pVaddr(nullptr), iv_compInfoCache{},
- iv_hasHeader(false)
+: iv_mclSize(MCL_SIZE), iv_tmpSize(MCL_TMP_SIZE), iv_maxSize(0),
+ iv_pMclVaddr(nullptr), iv_pTempVaddr(nullptr), iv_pVaddr(nullptr),
+ iv_compInfoCache{}, iv_hasHeader(false)
{
+ // Need to make Memory spaces HRMOR-relative
+ uint64_t hrmorVal = cpu_spr_value(CPU_SPR_HRMOR);
+ iv_mclAddr = hrmorVal - VMM_HRMOR_OFFSET + MCL_ADDR;
+ iv_tmpAddr = hrmorVal - VMM_HRMOR_OFFSET + MCL_TMP_ADDR;
+
+
initMcl(i_pMcl, i_size);
}
diff --git a/src/usr/util/utiltcemgr.C b/src/usr/util/utiltcemgr.C
index d925c332a..a0a2d58d5 100644
--- a/src/usr/util/utiltcemgr.C
+++ b/src/usr/util/utiltcemgr.C
@@ -201,7 +201,7 @@ errlHndl_t utilSetupPayloadTces(void)
errl = utilAllocateTces(addr, size, token);
if (errl)
{
- TRACFCOMP(g_trac_tce,"utilSetupPayloadTces(): ERROR back from utilAllocateTces() for HDAT using addr=0x%.16llX, size=0x%llX", HDAT_TMP_ADDR, HDAT_TMP_SIZE);
+ TRACFCOMP(g_trac_tce,"utilSetupPayloadTces(): ERROR back from utilAllocateTces() for HDAT using addr=0x%.16llX, size=0x%llX", addr, size);
break;
}
else
@@ -262,7 +262,7 @@ errlHndl_t utilClosePayloadTces(void)
nullptr); //Master Processor
if(errl)
{
- TRACFCOMP(g_trac_tce,"utilClosePayloadTces(): ERROR back from closeUnsecureMemRegion() using start address=0x%016llX",MCL_TMP_ADDR);
+ TRACFCOMP(g_trac_tce,"utilClosePayloadTces(): ERROR back from closeUnsecureMemRegion() using start address=0x%016llX",addr);
break;
}
OpenPOWER on IntegriCloud