summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/usr/runtime/populate_hbruntime.C13
-rwxr-xr-xsrc/usr/targeting/attrrp.C12
2 files changed, 16 insertions, 9 deletions
diff --git a/src/usr/runtime/populate_hbruntime.C b/src/usr/runtime/populate_hbruntime.C
index f394f58bf..e3eaffdc1 100644
--- a/src/usr/runtime/populate_hbruntime.C
+++ b/src/usr/runtime/populate_hbruntime.C
@@ -154,9 +154,12 @@ errlHndl_t populate_RtDataByNode(uint64_t iNodeId)
//Create a block map of memory so we can save a copy of the attribute
//data incase we need to MPIPL
+ //Account HRMOR (non 0 base addr)
+ uint64_t l_attr_data_addr = cpu_spr_value(CPU_SPR_HRMOR)
+ + MPIPL_ATTR_DATA_ADDR;
uint64_t l_attrCopyVmemAddr =
reinterpret_cast<uint64_t>(mm_block_map(
- reinterpret_cast<void*>(MPIPL_ATTR_DATA_ADDR),
+ reinterpret_cast<void*>(l_attr_data_addr),
MPIPL_ATTR_VMM_SIZE ));
//Make sure the address returned from the block map call is not NULL
@@ -173,7 +176,7 @@ errlHndl_t populate_RtDataByNode(uint64_t iNodeId)
{
TRACFCOMP( g_trac_runtime,
"populate_RtDataByNode fail to unmap physical addr %p, virt addr %p",
- reinterpret_cast<void*>(MPIPL_ATTR_DATA_ADDR),
+ reinterpret_cast<void*>(l_attr_data_addr),
reinterpret_cast<void*>(l_attrCopyVmemAddr));
/*@ errorlog tag
* @errortype ERRORLOG::ERRL_SEV_UNRECOVERABLE
@@ -188,7 +191,7 @@ errlHndl_t populate_RtDataByNode(uint64_t iNodeId)
l_elog = new ERRORLOG::ErrlEntry(ERRORLOG::ERRL_SEV_UNRECOVERABLE,
RUNTIME::MOD_POPULATE_RTDATABYNODE,
RUNTIME::RC_UNMAP_FAIL,
- MPIPL_ATTR_DATA_ADDR,
+ l_attr_data_addr,
l_attrCopyVmemAddr,
true);
}
@@ -197,7 +200,7 @@ errlHndl_t populate_RtDataByNode(uint64_t iNodeId)
{
TRACFCOMP( g_trac_runtime,
"populate_RtDataByNode fail to map physical addr %p, size %lx",
- reinterpret_cast<void*>(MPIPL_ATTR_DATA_ADDR),
+ reinterpret_cast<void*>(l_attr_data_addr),
MPIPL_ATTR_VMM_SIZE );
/*@ errorlog tag
* @errortype ERRORLOG::ERRL_SEV_UNRECOVERABLE
@@ -212,7 +215,7 @@ errlHndl_t populate_RtDataByNode(uint64_t iNodeId)
l_elog = new ERRORLOG::ErrlEntry(ERRORLOG::ERRL_SEV_UNRECOVERABLE,
RUNTIME::MOD_POPULATE_RTDATABYNODE,
RUNTIME::RC_CANNOT_MAP_MEMORY,
- MPIPL_ATTR_DATA_ADDR,
+ l_attr_data_addr,
MPIPL_ATTR_VMM_SIZE,
true);
}
diff --git a/src/usr/targeting/attrrp.C b/src/usr/targeting/attrrp.C
index ec670ec0c..df99291c3 100755
--- a/src/usr/targeting/attrrp.C
+++ b/src/usr/targeting/attrrp.C
@@ -45,6 +45,7 @@
#include <targeting/common/trace.H>
#include <initservice/initserviceif.H>
#include <util/align.H>
+#include <sys/misc.h>
using namespace INITSERVICE;
using namespace ERRORLOG;
@@ -300,14 +301,17 @@ namespace TARGETING
"Reading attributes from memory, NOT PNOR");
//Create a block map of the address space we used to store
//attribute information on the initial IPL
+ //Account HRMOR (non 0 base addr)
+ uint64_t l_attr_data_addr = cpu_spr_value(CPU_SPR_HRMOR)
+ + MPIPL_ATTR_DATA_ADDR;
l_header = reinterpret_cast<TargetingHeader*>(
- mm_block_map(reinterpret_cast<void*>(MPIPL_ATTR_DATA_ADDR),
+ mm_block_map(reinterpret_cast<void*>(l_attr_data_addr),
MPIPL_ATTR_VMM_SIZE));
if(l_header == 0)
{
TRACFCOMP(g_trac_targeting,
"Failed mapping phys addr: %p for %lx bytes",
- MPIPL_ATTR_DATA_ADDR,
+ l_attr_data_addr,
MPIPL_ATTR_VMM_SIZE);
//Error mm_block_map returned invalid ptr
/*@
@@ -325,14 +329,14 @@ namespace TARGETING
l_errl = new ErrlEntry(ERRL_SEV_UNRECOVERABLE,
TARG_PARSE_ATTR_SECT_HEADER,
TARG_RC_MM_BLOCK_FAIL,
- MPIPL_ATTR_DATA_ADDR,
+ l_attr_data_addr,
MPIPL_ATTR_VMM_SIZE,
true);
break;
}
TRACFCOMP(g_trac_targeting,
"Mapped phys addr: %p to virt addr: %p",
- reinterpret_cast<void*>(MPIPL_ATTR_DATA_ADDR),
+ reinterpret_cast<void*>(l_attr_data_addr),
l_header);
}
OpenPOWER on IntegriCloud