Skip to content

Commit

Permalink
Fix how processMrw sets FAPI_POS number on memory sub system
Browse files Browse the repository at this point in the history
Change-Id: Ife6c2145c06794361d60b8d9c536079ab3a07a99
Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/35845
Reviewed-by: Norman K. James <njames@us.ibm.com>
Reviewed-by: Prachi Gupta <pragupta@us.ibm.com>
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>
  • Loading branch information
sannerd authored and wghoffa committed Feb 3, 2017
1 parent 47278f0 commit 1a26cf4
Showing 1 changed file with 17 additions and 12 deletions.
29 changes: 17 additions & 12 deletions src/usr/targeting/common/Targets.pm
Expand Up @@ -1049,9 +1049,6 @@ sub processDimms

my $type = $self->getType($dimm);

$self->setAttribute($dimm,"FAPI_NAME",
getFapiName($type, $node, $dimm_pos));

$self->setAttribute($dimm, "ORDINAL_ID",$dimm_pos);
$self->setAttribute($dimm, "POSITION", $dimm_pos);
$self->setAttribute($dimm, "VPD_REC_NUM", $dimm_pos);
Expand All @@ -1060,18 +1057,26 @@ sub processDimms
$self->setAttribute($dimm, "MBA_PORT", 0); #0, each MCA is a port

## set all FAPI_POS
my $DIMM_PER_CHANNEL = 2;
my $mcbist_pos = $proc * $self->{UNIT_COUNTS}->
{$proc_target}->{MCBIST} +
my $MCBIST_PER_CHIP = $self->{UNIT_COUNTS}->
{$proc_target}->{MCBIST};
my $MCS_PER_CHIP = $self->{UNIT_COUNTS}->
{$mcbist_target}->{MCS} * $MCBIST_PER_CHIP;
my $MCA_PER_CHIP = $self->{UNIT_COUNTS}->
{$mcs_target}->{MCA} * $MCS_PER_CHIP;
my $DIMM_PER_MCA = 2;

my $mcbist_pos = ($proc * $MCBIST_PER_CHIP) +
$self->getAttribute($mcbist_target,"REL_POS");
my $mcs_pos = $mcbist_pos * $self->{UNIT_COUNTS}->
{$mcbist_target}->{MCS} +
my $mcs_pos = ($proc * $MCS_PER_CHIP) +
$self->getAttribute($mcs_target,"REL_POS");
my $mca_pos = $mcs_pos * $self->{UNIT_COUNTS}->
{$mcs_target}->{MCA} +
my $mca_pos = ($proc * $MCA_PER_CHIP) +
$self->getAttribute($mca_target,"REL_POS");
my $dimm_pos = $mca_pos * $DIMM_PER_CHANNEL +
$self->getAttribute($dimm,"REL_POS");
my $dimm_pos = ($mca_pos * $DIMM_PER_MCA) +
$self->getAttribute($dimm,"REL_POS");


$self->setAttribute($dimm,"FAPI_NAME",
getFapiName($type, $node, $dimm_pos));

$self->setAttribute($mcbist_target, "FAPI_POS", $mcbist_pos);
$self->setAttribute($mcs_target, "FAPI_POS", $mcs_pos);
Expand Down

0 comments on commit 1a26cf4

Please sign in to comment.