summaryrefslogtreecommitdiffstats
path: root/src/usr/targeting
diff options
context:
space:
mode:
authorPrachi Gupta <pragupta@us.ibm.com>2018-05-21 14:17:20 -0500
committerDaniel M. Crowell <dcrowell@us.ibm.com>2018-05-23 09:59:43 -0400
commitbbee47025c110746b8bd4291d283ed2fba3fc7e1 (patch)
treed19db55f49eb98ad81e9b73cf2365e085a55c674 /src/usr/targeting
parenta3cf4f273a3ee1a2f91091f653eec7f4e8623c77 (diff)
downloadtalos-hostboot-bbee47025c110746b8bd4291d283ed2fba3fc7e1.tar.gz
talos-hostboot-bbee47025c110746b8bd4291d283ed2fba3fc7e1.zip
Fixup all the voltage rail's ID attribute for both proc and cent
HWSV uses the following voltage rail ID attributes to determine the right FSP_DEVICE_PATH (i2c path) and calls the power api to set the voltages for each of the rails correctly. Since, all the IDs were 0, we were setting only proc0/membuf0's voltages correctly. Everyone else was getting standby voltage. This change looks at the vrm connectors in the system xml and use their position as the voltage rail IDs as they are unique per node, which is what HWSV is expecting. The rails are: VDD_ID/VCS_ID/VDN_ID/VDDR_ID/VPP_ID/etc. Change-Id: Ib23eaa43045fa77137c5ce5e477d007bf0c757dc CQ:SW428817 Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/59140 Reviewed-by: ILYA SMIRNOV <ismirno@us.ibm.com> Tested-by: Jenkins Server <pfd-jenkins+hostboot@us.ibm.com> Tested-by: Jenkins OP Build CI <op-jenkins+hostboot@us.ibm.com> Tested-by: Jenkins OP HW <op-hw-jenkins+hostboot@us.ibm.com> Tested-by: FSP CI Jenkins <fsp-CI-jenkins+hostboot@us.ibm.com> Reviewed-by: Roland Veloz <rveloz@us.ibm.com> Reviewed-by: Daniel M. Crowell <dcrowell@us.ibm.com>
Diffstat (limited to 'src/usr/targeting')
-rwxr-xr-xsrc/usr/targeting/common/processMrw.pl74
1 files changed, 74 insertions, 0 deletions
diff --git a/src/usr/targeting/common/processMrw.pl b/src/usr/targeting/common/processMrw.pl
index a30c80c41..0f28c8ff5 100755
--- a/src/usr/targeting/common/processMrw.pl
+++ b/src/usr/targeting/common/processMrw.pl
@@ -1138,8 +1138,80 @@ sub processProcessor
$targetObj->setAttribute($target,
"PROC_MEM_TO_USE", ( $targetObj->getAttribute($target,
"FABRIC_GROUP_ID") << 3));
+ processPowerRails ($targetObj, $target);
}
+sub processPowerRails
+{
+ my $targetObj = shift;
+ my $target = shift;
+
+ #Example of how system xml is getting parsed into data structures here
+ #and eventually into the attribute
+ #
+ #System XML has this:
+ #<bus>
+ # <bus_id>vrm3-connector-22/vrm-type3-10/35219-3-8/IR35219_special.vout-0 => fcdimm-connector-69/fcdimm-14/membuf-0/MemIO</bus_id>
+ # <bus_type>POWER</bus_type>
+ # <cable>no</cable>
+ # <source_path>vrm3-connector-22/vrm-type3-10/35219-3-8/</source_path>
+ # <source_target>IR35219_special.vout-0</source_target>
+ # <dest_path>fcdimm-connector-69/fcdimm-14/membuf-0/</dest_path>
+ # <dest_target>MemIO</dest_target>
+ # <bus_attribute>
+ # <id>CLASS</id>
+ # <default>BUS</default>
+ # </bus_attribute>
+ #</bus>
+ #
+ #each of the connection comes up like this (this is $rail variable)
+ # 'BUS_NUM' => 0,
+ # 'DEST_PARENT' => '/sys/node-4/calliope-1/fcdimm-connector-69/fcdimm-14/membuf-0',
+ # 'DEST' => '/sys/node-4/calliope-1/fcdimm-connector-69/fcdimm-14/membuf-0/MemIO',
+ # 'SOURCE_PARENT' => '/sys/node-4/calliope-1/vrm3-connector-22/vrm-type3-10/35219-3-8',
+ # 'SOURCE' => '/sys/node-4/calliope-1/vrm3-connector-22/vrm-type3-10/35219-3-8/IR35219_special.vout-0'
+ #
+ #So, for 'SOURCE' target, we walk up the hierarchy till we get to
+ #vrm3-connector-22 as that is the first target in the hierarchy that
+ #is unique per instance of a given volate rail. We get vrm connector's
+ #POSITION and set it as the ID for that rail.
+ #
+ #The 'DEST' target also has an attribute called "RAIL_NAME" that we can use
+ #to figure out which rail we are working with. But, for rails that are
+ #common between proc and centaur have "Cent" or "Mem" as a prefix.
+ #
+ my $rails=$targetObj->findDestConnections($target,"POWER","");
+ if ($rails ne "")
+ {
+ foreach my $rail (@{$rails->{CONN}})
+ {
+ my $rail_dest = $rail->{DEST};
+ my $rail_src = $rail->{SOURCE};
+ my $rail_name = $targetObj->getAttribute($rail_dest, "RAIL_NAME");
+ #Need to get the connector's position and set the ID to that
+ #As it is unique for every new connection in the MRW
+ my $rail_connector = $targetObj->getTargetParent( #VRM connector
+ ($targetObj->getTargetParent #VRM type
+ ($targetObj->getTargetParent($rail_src))));
+
+
+ my $position = $targetObj->getAttribute($rail_connector,"POSITION");
+ my $rail_attr_id =
+ ($targetObj->getAttribute($target, "TYPE") eq "PROC") ?
+ "NEST_" : "";
+
+ #The rails that are common between proc and centaur have a "Cent"
+ #prefix in the system xml. We don't care for "Cent" in our attribute
+ #as it is scoped to the right target. But, for VIO, we decided to
+ #use MemIO rather than CentIO. The attribute is named as VIO_ID.
+ $rail_name =~ s/Cent//g;
+ $rail_name =~ s/Mem/V/g;
+ $rail_attr_id .= $rail_name . "_ID";
+
+ $targetObj->setAttribute($target, $rail_attr_id, $position);
+ }
+ }
+}
sub processI2cSpeeds
{
@@ -2223,6 +2295,8 @@ sub processMembuf
my $dimmconn=$targetObj->getTargetParent($dimm);
}
}
+
+ processPowerRails($targetObj, $target);
}
sub getI2cMapField
OpenPOWER on IntegriCloud