summaryrefslogtreecommitdiffstats
path: root/src/usr
diff options
context:
space:
mode:
authornagurram-in <nagendra.g@in.ibm.com>2017-01-25 10:10:54 -0600
committerWilliam G. Hoffa <wghoffa@us.ibm.com>2017-01-26 19:55:40 -0500
commit79dd17bc9347600eeeddacc4e19efafbb5f1fe29 (patch)
tree6a76899a6ad15df84da29e1bdd154b23b31809ed /src/usr
parentad3e1dd8f310e962fce424dff8fd07e5d6a1812e (diff)
downloadtalos-hostboot-79dd17bc9347600eeeddacc4e19efafbb5f1fe29.tar.gz
talos-hostboot-79dd17bc9347600eeeddacc4e19efafbb5f1fe29.zip
Fix for shared flag not getting set for the MSAREA
Change-Id: Ifa0b91ffc3b2e47f88bc2ca8c7b6e701a10d6a53 Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/35394 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: William G. Hoffa <wghoffa@us.ibm.com>
Diffstat (limited to 'src/usr')
-rwxr-xr-xsrc/usr/hdat/hdatmsvpd.C125
1 files changed, 73 insertions, 52 deletions
diff --git a/src/usr/hdat/hdatmsvpd.C b/src/usr/hdat/hdatmsvpd.C
index 7ccb10979..c87d714da 100755
--- a/src/usr/hdat/hdatmsvpd.C
+++ b/src/usr/hdat/hdatmsvpd.C
@@ -1107,6 +1107,73 @@ errlHndl_t HdatMsVpd::hdatLoadMsData(uint32_t &o_size, uint32_t &o_count)
TARGETING::ATTR_ORDINAL_ID_type l_procChipId
= l_pProcTarget->getAttr<TARGETING::ATTR_ORDINAL_ID>();
+
+ //For each MCA
+ TARGETING::PredicateCTM l_allMca(TARGETING::CLASS_UNIT,
+ TARGETING::TYPE_MCA);
+ TARGETING::PredicateHwas l_funcMca;
+ l_funcMca.functional(true);
+ TARGETING::PredicatePostfixExpr l_allFuncMca;
+ l_allFuncMca.push(&l_allMca).push(&l_funcMca).And();
+
+ TARGETING::TargetHandleList l_mcaList;
+
+ TARGETING::targetService().
+ getAssociated(l_mcaList, l_pProcTarget,
+ TARGETING::TargetService::CHILD,
+ TARGETING::TargetService::ALL, &l_allFuncMca);
+
+ TARGETING::ATTR_PROC_MEM_BASES_type l_procMemBases = {0};
+ assert(l_pProcTarget->
+ tryGetAttr<TARGETING::ATTR_PROC_MEM_BASES>(l_procMemBases));
+
+ //Sharing count for each group
+ TARGETING::ATTR_MSS_MEM_MC_IN_GROUP_type l_mcaSharingCount = {0};
+
+ //Group ID for each group, group id will be assigned only
+ //if the group is shared
+ TARGETING::ATTR_MSS_MEM_MC_IN_GROUP_type l_mcsSharingGrpIds = {0};
+
+ //Size configured under each group
+ TARGETING::ATTR_PROC_MEM_SIZES_type l_procMemSizesBytes = {0};
+
+ assert(l_pProcTarget->tryGetAttr<TARGETING::ATTR_PROC_MEM_SIZES>
+ (l_procMemSizesBytes));
+
+
+
+ for(uint32_t l_mcaIdx = 0; l_mcaIdx<l_mcaList.size();
+ ++l_mcaIdx)
+ {
+ uint32_t l_mcaInGrp = 0;
+ TARGETING::Target *l_pMcaTarget =
+ l_mcaList[l_mcaIdx];
+ if(!hdatFindGroupForMc(l_pProcTarget,
+ l_pMcaTarget,
+ l_mcaInGrp))
+ {
+ //Skip this MCA is not in any group
+ continue;
+ }
+
+ //Increment sharing count if mem configured under group.
+ if(l_procMemSizesBytes[l_mcaInGrp] > 0)
+ {
+ l_mcaSharingCount[l_mcaInGrp]++;
+
+ //Assign sharing group id only if shared
+ //And only when first instance of sharing is found
+ if(l_mcaSharingCount[l_mcaInGrp] ==
+ HDAT_MIN_NUM_FOR_SHARING)
+ {
+ l_mcsSharingGrpIds[l_mcaInGrp] =
+ l_nxtSharingGroupId;
+ l_nxtSharingGroupId++;
+ }
+ }
+ }
+
+
// TODO : RTC Story 159682
// Further CHTM support needs to be added which contains the trace
// array for 24 cores
@@ -1114,14 +1181,14 @@ errlHndl_t HdatMsVpd::hdatLoadMsData(uint32_t &o_size, uint32_t &o_count)
hdatMsAddr_t l_hdatNhtmEndAddr;
TARGETING::ATTR_PROC_NHTM_BAR_BASE_ADDR_type l_nhtmStartAddr =
- l_pProcTarget->getAttr<TARGETING::ATTR_PROC_NHTM_BAR_BASE_ADDR>();
+ l_pProcTarget->getAttr<TARGETING::ATTR_PROC_NHTM_BAR_BASE_ADDR>();
TARGETING::ATTR_PROC_NHTM_BAR_SIZE_type l_nhtmSize =
l_pProcTarget->getAttr<TARGETING::ATTR_PROC_NHTM_BAR_SIZE>();
if( 0 != l_nhtmSize )
{
l_hdatNhtmStartAddr.hi =
- (l_nhtmStartAddr & 0xFFFFFFFF00000000ull) >> 32;
+ (l_nhtmStartAddr & 0xFFFFFFFF00000000ull) >> 32;
l_hdatNhtmStartAddr.lo =
l_nhtmStartAddr & 0x00000000FFFFFFFFull;
l_hdatNhtmStartAddr.hi |= HDAT_REAL_ADDRESS_MASK;
@@ -1145,28 +1212,12 @@ errlHndl_t HdatMsVpd::hdatLoadMsData(uint32_t &o_size, uint32_t &o_count)
l_nhtmSize);
}
- TARGETING::ATTR_PROC_MEM_BASES_type l_procMemBases = {0};
- assert(l_pProcTarget->
- tryGetAttr<TARGETING::ATTR_PROC_MEM_BASES>(l_procMemBases));
-
- //Sharing count for each group
- TARGETING::ATTR_MSS_MEM_MC_IN_GROUP_type l_mcaSharingCount = {0};
-
- //Group ID for each group, group id will be assigned only
- //if the group is shared
- TARGETING::ATTR_MSS_MEM_MC_IN_GROUP_type l_mcsSharingGrpIds = {0};
-
- //Size configured under each group
- TARGETING::ATTR_PROC_MEM_SIZES_type l_procMemSizesBytes = {0};
-
- assert(l_pProcTarget->tryGetAttr<TARGETING::ATTR_PROC_MEM_SIZES>
- (l_procMemSizesBytes));
TARGETING::PredicateCTM l_mcbistPredicate(TARGETING::CLASS_UNIT,
TARGETING::TYPE_MCBIST);
TARGETING::PredicatePostfixExpr l_presentMcbist;
- l_presentMcbist.push(&l_mcbistPredicate).
+ l_presentMcbist.push(&l_mcbistPredicate).
push(&l_predHwasFunc).And();
TARGETING::TargetHandleList l_mcbistList;
@@ -1189,7 +1240,7 @@ errlHndl_t HdatMsVpd::hdatLoadMsData(uint32_t &o_size, uint32_t &o_count)
TARGETING::TYPE_MCS);
TARGETING::PredicatePostfixExpr l_funcMcs;
- l_funcMcs.push(&l_mcsPredicate).push(&l_predHwasFunc).And();
+ l_funcMcs.push(&l_mcsPredicate).push(&l_predHwasFunc).And();
TARGETING::TargetHandleList l_mcsList;
@@ -1218,39 +1269,9 @@ errlHndl_t HdatMsVpd::hdatLoadMsData(uint32_t &o_size, uint32_t &o_count)
// Get associated MCAs
TARGETING::targetService().
getAssociated(l_mcaList, l_pMcsTarget,
- TARGETING::TargetService::CHILD_BY_AFFINITY,
- TARGETING::TargetService::ALL, &l_presentMca);
+ TARGETING::TargetService::CHILD_BY_AFFINITY,
+ TARGETING::TargetService::ALL, &l_presentMca);
- for(uint32_t l_mcaIdx = 0; l_mcaIdx<l_mcaList.size();
- ++l_mcaIdx)
- {
- uint32_t l_mcaInGrp = 0;
- TARGETING::Target *l_pMcaTarget =
- l_mcaList[l_mcaIdx];
- if(!hdatFindGroupForMc(l_pProcTarget,
- l_pMcaTarget,
- l_mcaInGrp))
- {
- //Skip this MCA is not in any group
- continue;
- }
-
- //Increment sharing count if mem configured under group.
- if(l_procMemSizesBytes[l_mcaInGrp] > 0)
- {
- l_mcaSharingCount[l_mcaInGrp]++;
-
- //Assign sharing group id only if shared
- //And only when first instance of sharing is found
- if(l_mcaSharingCount[l_mcaInGrp] ==
- HDAT_MIN_NUM_FOR_SHARING)
- {
- l_mcsSharingGrpIds[l_mcaInGrp] =
- l_nxtSharingGroupId;
- l_nxtSharingGroupId++;
- }
- }
- }
for(uint32_t l_mcaIdx = 0; l_mcaIdx<l_mcaList.size();
++l_mcaIdx)
OpenPOWER on IntegriCloud