summaryrefslogtreecommitdiffstats
path: root/src/usr
diff options
context:
space:
mode:
authorZane Shelley <zshelle@us.ibm.com>2017-01-05 16:03:42 -0600
committerZane C. Shelley <zshelle@us.ibm.com>2017-01-12 15:22:49 -0500
commit6d8dd3b17e703e5e6106f2ceea4f646fb9b152fc (patch)
tree1b6066e5dc9afd2e355ffdf28fe0a9241529b933 /src/usr
parentacabb0c8ccc4c3c5742b23cea4abb7609dc8b761 (diff)
downloadtalos-hostboot-6d8dd3b17e703e5e6106f2ceea4f646fb9b152fc.tar.gz
talos-hostboot-6d8dd3b17e703e5e6106f2ceea4f646fb9b152fc.zip
Updated IS DIMM HUID and affinity path in genHwsvMrwXml.pl
We want these values to remain consistent for all machine types. Change-Id: I9e946945abe32d31d227d24843fdc93598304d55 Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/34453 Tested-by: Jenkins Server <pfd-jenkins+hostboot@us.ibm.com> Tested-by: Jenkins OP Build CI <op-jenkins+hostboot@us.ibm.com> Tested-by: FSP CI Jenkins <fsp-CI-jenkins+hostboot@us.ibm.com> Reviewed-by: Daniel M. Crowell <dcrowell@us.ibm.com> Reviewed-by: Benjamin J. Weisenbeck <bweisenb@us.ibm.com> Reviewed-by: Caleb N. Palmer <cnpalmer@us.ibm.com> Reviewed-by: Brian J. Stegmiller <bjs@us.ibm.com> Reviewed-by: Zane C. Shelley <zshelle@us.ibm.com>
Diffstat (limited to 'src/usr')
-rwxr-xr-xsrc/usr/targeting/common/genHwsvMrwXml.pl39
1 files changed, 22 insertions, 17 deletions
diff --git a/src/usr/targeting/common/genHwsvMrwXml.pl b/src/usr/targeting/common/genHwsvMrwXml.pl
index d74860bea..afe9e5f00 100755
--- a/src/usr/targeting/common/genHwsvMrwXml.pl
+++ b/src/usr/targeting/common/genHwsvMrwXml.pl
@@ -6116,34 +6116,39 @@ sub generate_is_dimm
}
my $ipath = $SMembuses[$i][DIMM_PATH_FIELD];
- my $proc = $SMembuses[$i][MCS_TARGET_FIELD];
- my $mcs = $proc;
- my $mca = $SMembuses[$i][MCA_TARGET_FIELD];
- $proc =~ s/.*:p(.*):.*/$1/;
- $mcs =~ s/.*mcs(.*)/$1/;
- $mca =~ s/.*mca(.*)/$1/;
my $pos = $SMembuses[$i][DIMM_TARGET_FIELD];
$pos =~ s/.*:p(.*)/$1/;
my $dimm = $SMembuses[$i][DIMM_PATH_FIELD];
$dimm =~ s/.*dimm-(.*)/$1/;
- my $dimmPos = $SMembuses[$i][DIMM_POS_FIELD];
- $dimmPos =~ s/.*dimm-(.*)/$1/;
-
- my $uidstr = sprintf("0x%02X03%04X",${node},$dimm+${node}*512);
my $fapi_name = sprintf("dimm:k0:n%d:s0:p%02d",
$node, $dimm);
- $mcs = (($mca - ($mca%2))/2)%2;
- my $mcbist = ($mca - ($mca%4))/4;
- $mca = $mca % 2;
- my $dimm_rel_mca = $dimm % 2;
+ # PROC position relative to node and MCA position relative to PROC.
+ my $tmp = $SMembuses[$i][MCA_TARGET_FIELD];
+ my ( $proc, $mca ) = ( $1, $2 ) if ( $tmp =~ ":p([0-9]+):mca([0-9]+)" );
+
+ # MCBIST, MCS, MCA, and DIMM relative positions for affinity path.
+ my $mcb_rel_proc = int($mca/4) % ARCH_LIMIT_MCBIST_PER_PROC;
+ my $mcs_rel_mcb = int($mca/2) % ARCH_LIMIT_MCS_PER_MCBIST;
+ my $mca_rel_mcs = $mca % ARCH_LIMIT_MCA_PER_MCS;
+ my $dimm_rel_mca = $dimm % ARCH_LIMIT_DIMM_PER_MCA;
+
+ my $affinityPath = "affinity:sys-$sys/node-$node/proc-$proc" .
+ "/mcbist-$mcb_rel_proc/mcs-$mcs_rel_mcb" .
+ "/mca-$mca_rel_mcs/dimm-$dimm_rel_mca";
+
+ # DIMM relative to NODE using affinity path for HUID. Note that this is
+ # different than the DIMM position used in $dimm, which is from the
+ # instance path and changes based on board configuation.
+ my $dimm_rel_node = $proc * MAX_MCA_PER_PROC * ARCH_LIMIT_DIMM_PER_MCA +
+ $mca * ARCH_LIMIT_DIMM_PER_MCA +
+ $dimm_rel_mca;
- my $affinityPath = "affinity:sys-$sys/node-$node/proc-$proc"
- . "/mcbist-$mcbist/mcs-$mcs/mca-$mca/dimm-$dimm_rel_mca";
+ my $uidstr = sprintf( "0x%02X03%04X", $node, $dimm_rel_node );
# add dimm to mcbist array
- push(@{$mcbist_dimms{$node . $proc."_".$mcbist}}, "n${node}:p${pos}");
+ push(@{$mcbist_dimms{$node . $proc."_".$mcb_rel_proc}}, "n${node}:p${pos}");
print "\n<!-- DIMM n${node}:p${pos} -->\n";
print "
OpenPOWER on IntegriCloud