diff options
author | Prachi Gupta <pragupta@us.ibm.com> | 2017-05-11 11:14:49 -0500 |
---|---|---|
committer | Matthew A. Ploetz <maploetz@us.ibm.com> | 2017-05-26 14:29:48 -0400 |
commit | 0a93d50afd11cc82fc3b8df0128cbcd2e8303392 (patch) | |
tree | 0414dfd0680fac75c5f1a22d144abbf299dc7c4c /src/usr | |
parent | 00b17ec7c38c7304440d999dc9a88fefc8510ae9 (diff) | |
download | talos-hostboot-0a93d50afd11cc82fc3b8df0128cbcd2e8303392.tar.gz talos-hostboot-0a93d50afd11cc82fc3b8df0128cbcd2e8303392.zip |
processMrw changes to add Obus slot index
Change-Id: I1b922605942deb17f87eb99af902082cef4c833f
Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/40405
Reviewed-by: William G. Hoffa <wghoffa@us.ibm.com>
Reviewed-by: Elizabeth K. Liner <eliner@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: FSP CI Jenkins <fsp-CI-jenkins+hostboot@us.ibm.com>
Reviewed-by: Matthew A. Ploetz <maploetz@us.ibm.com>
Diffstat (limited to 'src/usr')
-rw-r--r-- | src/usr/targeting/common/Targets.pm | 11 | ||||
-rw-r--r-- | src/usr/targeting/common/processMrw.pl | 60 | ||||
-rw-r--r-- | src/usr/targeting/common/xmltohb/attribute_types.xml | 22 | ||||
-rwxr-xr-x | src/usr/targeting/common/xmltohb/target_types.xml | 1 |
4 files changed, 94 insertions, 0 deletions
diff --git a/src/usr/targeting/common/Targets.pm b/src/usr/targeting/common/Targets.pm index f10e4bddb..6c58d7188 100644 --- a/src/usr/targeting/common/Targets.pm +++ b/src/usr/targeting/common/Targets.pm @@ -1258,6 +1258,13 @@ sub setFsiAttributes } +## remove target +sub removeTarget +{ + my $self = shift; + my $target = shift; + delete $self->{data}->{TARGETS}->{$target}; +} ## returns pointer to target from target name sub getTarget @@ -1977,6 +1984,10 @@ C</sys-0/node-0/motherboard-0/dimm-0> Reads ServerWiz2 XML C<FILENAME> and stores into a data structure for manipulation and printing. +=item removeTarget(C<TARGET_STRING>) + +Removes the given target from the data structure (C<TARGET>) + =item getTarget(C<TARGET_STRING>) Returns pointer to data structure (C<TARGET>) diff --git a/src/usr/targeting/common/processMrw.pl b/src/usr/targeting/common/processMrw.pl index 8ae25699c..56cfe4572 100644 --- a/src/usr/targeting/common/processMrw.pl +++ b/src/usr/targeting/common/processMrw.pl @@ -506,6 +506,10 @@ sub processProcessor { processXbus($targetObj, $child); } + elsif ($child_type eq "OBUS") + { + processObus($targetObj, $child); + } elsif ($child_type eq "FSIM" || $child_type eq "FSICM") { processFsi($targetObj, $child, $target); @@ -888,6 +892,62 @@ sub processMcbist # $targetObj->setAttribute($target, "IBSCOM_MCS_BASE_ADDR", $mcsStr); } #-------------------------------------------------- +## OBUS +## +## Finds OBUS connections and copy the slot position to obus brick target + +sub processObus +{ + my $targetObj = shift; + my $target = shift; + + my $obus = $targetObj->findConnections($target,"OBUS", ""); + + if ($obus eq "") + { + #No connections mean, we need to remove all the children and the obus + $targetObj->log($target,"no bus connection found"); + $targetObj->log($target,"removing target and it's children"); + foreach my $obrick (@{ $targetObj->getTargetChildren($target) }) + { + $targetObj->removeTarget($obrick); + } + $targetObj->removeTarget($target); + } + else + { + #Loop through all the bricks and figure out if it connected to an + #obusslot. If it is connected, then store the slot information (position) + #in the obus_brick target as OBUS_SLOT_INDEX. If it is not connected, + #remove obus brick target. + my $match = 0; + foreach my $obrick (@{ $targetObj->getTargetChildren($target) }) + { + foreach my $obrick_conn (@{$obus->{CONN}}) + { + $match = ($obrick_conn->{SOURCE} eq $obrick); + if ($match eq 1) + { + my $obus_slot = $targetObj->getTargetParent( + $obrick_conn->{DEST_PARENT}); + my $obus_slot_pos = $targetObj->getAttribute( + $obus_slot, "POSITION"); + $targetObj->setAttribute($obrick, "OBUS_SLOT_INDEX", + $obus_slot_pos); + last; + } + } + + #This brick is not connected to anything, remove + if ($match eq 0) + { + $targetObj->log($target,"no bus conn, removing target"); + $targetObj->removeTarget($obrick); + } + } + } +} +#-------------------------------------------------- ## XBUS ## ## Finds XBUS connections and creates PEER TARGET attributes diff --git a/src/usr/targeting/common/xmltohb/attribute_types.xml b/src/usr/targeting/common/xmltohb/attribute_types.xml index d3d99b856..2ea4cf498 100644 --- a/src/usr/targeting/common/xmltohb/attribute_types.xml +++ b/src/usr/targeting/common/xmltohb/attribute_types.xml @@ -21993,6 +21993,28 @@ Measured in GB</description> </hwpfToHbAttrMap> </attribute> +<attribute> + <id>OBUS_SLOT_INDEX</id> + <description> + Position of the obus slot that the Obus brick is connected to + (represented in decimal). There is only one slot that a given + brick connects to and there are only 6 slots per proc, + so, we just need a single uint8_t representing the position + of the slot. + Provided by the MRW. + </description> + <simpleType> + <uint8_t> + </uint8_t> + </simpleType> + <persistency>non-volatile</persistency> + <readable/> + <hwpfToHbAttrMap> + <id>ATTR_OBUS_SLOT_INDEX</id> + <macro>DIRECT</macro> + </hwpfToHbAttrMap> +</attribute> + <enumerationType> <id>PROC_FABRIC_SMP_OPTICS_MODE</id> <description> diff --git a/src/usr/targeting/common/xmltohb/target_types.xml b/src/usr/targeting/common/xmltohb/target_types.xml index 48b412b34..cfba022be 100755 --- a/src/usr/targeting/common/xmltohb/target_types.xml +++ b/src/usr/targeting/common/xmltohb/target_types.xml @@ -2204,6 +2204,7 @@ <default>0</default> <!-- GARD --> </attribute> <attribute><id>OBUS_BRICK_LANE_MASK</id></attribute> + <attribute><id>OBUS_SLOT_INDEX</id></attribute> <attribute><id>OPTICS_CONFIG_MODE</id></attribute> <attribute><id>PARENT_PERVASIVE</id></attribute> </targetType> |