diff options
author | Elizabeth Liner <eliner@us.ibm.com> | 2016-01-15 16:16:34 -0600 |
---|---|---|
committer | WILLIAM G. HOFFA <wghoffa@us.ibm.com> | 2016-02-25 14:30:53 -0600 |
commit | 1560a63e5b23627e46d124c8735113afc6c803f2 (patch) | |
tree | 79922aaeeba7e082ffa93293f2180eb050594934 /src/usr/targeting | |
parent | a1ddf6f9224993cc9175afcbdb79674542e15304 (diff) | |
download | talos-hostboot-1560a63e5b23627e46d124c8735113afc6c803f2.tar.gz talos-hostboot-1560a63e5b23627e46d124c8735113afc6c803f2.zip |
Adding DIMM targets to the ZZ genHwsvMrwXml script
Change-Id: Id4c2289dcbe473098c993c96fd778b303fd57701
RTC:142535
Reviewed-on: http://gfw160.aus.stglabs.ibm.com:8080/gerrit/23212
Tested-by: Jenkins Server
Reviewed-by: Daniel M. Crowell <dcrowell@us.ibm.com>
Reviewed-by: Dhruvaraj Subhashchandran <dhruvaraj@in.ibm.com>
Reviewed-by: WILLIAM G. HOFFA <wghoffa@us.ibm.com>
Diffstat (limited to 'src/usr/targeting')
-rwxr-xr-x | src/usr/targeting/common/genHwsvMrwXml.pl | 78 |
1 files changed, 18 insertions, 60 deletions
diff --git a/src/usr/targeting/common/genHwsvMrwXml.pl b/src/usr/targeting/common/genHwsvMrwXml.pl index db8113bec..894a6483a 100755 --- a/src/usr/targeting/common/genHwsvMrwXml.pl +++ b/src/usr/targeting/common/genHwsvMrwXml.pl @@ -6,7 +6,7 @@ # # OpenPOWER HostBoot Project # -# Contributors Listed Below - COPYRIGHT 2013,2015 +# Contributors Listed Below - COPYRIGHT 2013,2016 # [+] International Business Machines Corp. # # @@ -1278,16 +1278,17 @@ my $memory_busses_file = open_mrw_file($mrwdir, "${sysname}-memory-busses.xml"); my $memBus = parse_xml_file($memory_busses_file); # Capture all memory buses info into the @Membuses array -use constant MCS_TARGET_FIELD => 0; -use constant CENTAUR_TARGET_FIELD => 1; -use constant DIMM_TARGET_FIELD => 2; -use constant DIMM_PATH_FIELD => 3; -use constant BUS_NODE_FIELD => 4; -use constant BUS_POS_FIELD => 5; -use constant BUS_ORDINAL_FIELD => 6; -use constant DIMM_POS_FIELD => 7; -use constant MBA_SLOT_FIELD => 8; -use constant MBA_PORT_FIELD => 9; +use constant MCS_TARGET_FIELD => 0; +use constant MCA_TARGET_FIELD => 1; +use constant CENTAUR_TARGET_FIELD => 2; +use constant DIMM_TARGET_FIELD => 3; +use constant DIMM_PATH_FIELD => 4; +use constant BUS_NODE_FIELD => 5; +use constant BUS_POS_FIELD => 6; +use constant BUS_ORDINAL_FIELD => 7; +use constant DIMM_POS_FIELD => 8; +use constant MBA_SLOT_FIELD => 9; +use constant MBA_PORT_FIELD => 10; use constant CDIMM_RID_NODE_MULTIPLIER => 32; @@ -1297,6 +1298,8 @@ foreach my $i (@{$memBus->{'memory-bus'}}) push @Membuses, [ "n$i->{mcs}->{target}->{node}:p$i->{mcs}->{target}->{position}:mcs" . $i->{mcs}->{target}->{chipUnit}, + "n$i->{mca}->{target}->{node}:p$i->{mca}->{target}->{position}:mca" . + $i->{mca}->{target}->{chipUnit}, "n$i->{mba}->{target}->{node}:p$i->{mba}->{target}->{position}:mba" . $i->{mba}->{target}->{chipUnit}, "n$i->{dimm}->{target}->{node}:p$i->{dimm}->{target}->{position}", @@ -5044,9 +5047,6 @@ sub generate_l4 sub generate_is_dimm { - # keyed by $mba, keeps track of which dimm on each mba we're working on - my $dimmCounter = {}; - # From the i2c busses, grab the information for the DIMMs, if any. my @dimmI2C; my $i2c_file = open_mrw_file($mrwdir, "${sysname}-i2c-busses.xml"); @@ -5082,13 +5082,10 @@ 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/; - my $ctaur = $SMembuses[$i][CENTAUR_TARGET_FIELD]; - my $mba = $ctaur; - $ctaur =~ s/.*:p(.*):mba.*$/$1/; - $mba =~ s/.*:mba(.*)$/$1/; - $dimmCounter->{$mba} = 0 if ($dimmCounter->{$mba} eq undef); + $mca =~ s/.*mca(.*)/$1/; my $pos = $SMembuses[$i][DIMM_TARGET_FIELD]; $pos =~ s/.*:p(.*)/$1/; my $dimm = $SMembuses[$i][DIMM_PATH_FIELD]; @@ -5113,51 +5110,13 @@ sub generate_is_dimm <attribute> <id>AFFINITY_PATH</id> <default>affinity:sys-$sys/node-$node/proc-$proc/mcs-$mcs/" - . "membuf-$ctaur/mba-$mba/dimm-$dimmCounter->{$mba}</default> + . "mca-$mca/dimm-$dimm</default> </attribute> <compileAttribute> <id>INSTANCE_PATH</id> <default>$ipath</default> </compileAttribute> <attribute> - <id>MBA_DIMM</id> - <default>$SMembuses[$i][MBA_SLOT_FIELD]</default> - </attribute> - <attribute> - <id>MBA_PORT</id> - <default>$SMembuses[$i][MBA_PORT_FIELD]</default> - </attribute>"; - - # Map MemBus DIMM instance path to I2C Busses DIMM instace path - # and then add the correct VPD data - for my $j ( 0 .. $#dimmI2C ) - { - if ( $ipath eq $dimmI2C[$j]{ipath} ) - { - # @todo RTC 119382 - eventually read the last 4 values from MRW - print " - <attribute> - <id>EEPROM_VPD_PRIMARY_INFO</id> - <default> - <field><id>i2cMasterPath</id><value>physical:sys-$sys/" - . "node-$node/membuf-$ctaur</value></field> - <field><id>port</id><value>$dimmI2C[$j]{port}</value></field> - <field><id>devAddr</id><value>0x$dimmI2C[$j]{devAddr}" - . "</value></field> - <field><id>engine</id><value>$dimmI2C[$j]{engine}</value></field> - <field><id>byteAddrOffset</id><value>0x01</value></field> - <field><id>maxMemorySizeKB</id><value>0x01</value></field> - <field><id>writePageSize</id><value>0x50</value></field> - <field><id>writeCycleTime</id><value>0x05</value></field> - </default> - </attribute>"; - - last; - } - } - - print " - <attribute> <id>VPD_REC_NUM</id> <default>$pos</default> </attribute>"; @@ -5165,7 +5124,7 @@ sub generate_is_dimm # call to do any fsp per-dimm attributes my $dimmHex = sprintf("0xD0%02X",$dimmPos); - do_plugin('fsp_dimm', $proc, $ctaur, $dimm, $dimm, $dimmHex ); + do_plugin('fsp_dimm', $proc, $dimm, $dimm, $dimmHex ); # $TODO RTC:110399 if( $haveFSPs == 0 ) @@ -5201,7 +5160,6 @@ sub generate_is_dimm print "\n</targetInstance>\n"; - $dimmCounter->{$mba} += 1; } } |