summaryrefslogtreecommitdiffstats
path: root/src/usr/targeting
diff options
context:
space:
mode:
authorMengze Liao <liaomz@cn.ibm.com>2018-02-28 16:13:17 +0800
committerDaniel M. Crowell <dcrowell@us.ibm.com>2018-11-01 16:10:24 -0500
commit61bcb01d6fd51dec3f1d86bd9e942fe86fe2b855 (patch)
treeda62b371e8e6e2bf4dc1776c1bfc3577ca3f9779 /src/usr/targeting
parent4c1c0fa7007888c5a3f7161a3c33d8c397b9b0eb (diff)
downloadtalos-hostboot-61bcb01d6fd51dec3f1d86bd9e942fe86fe2b855.tar.gz
talos-hostboot-61bcb01d6fd51dec3f1d86bd9e942fe86fe2b855.zip
Add PCIe dynamic bifurcation function for barreleye G2
Adds support to query the BMC (via sensor) to determine the bifurcation settings of the PCI slots. Resolves #125 Change-Id: Ibb4333140c6209a4a04c5f1a8adf3bd278899a8b Reviewed-on: http://rchgit01.rchland.ibm.com/gerrit1/52992 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: Matt Derksen <mderkse1@us.ibm.com> Reviewed-by: DHRUVARAJ SUBHASH CHANDRAN <dhruvaraj@in.ibm.com> Reviewed-by: Daniel M. Crowell <dcrowell@us.ibm.com>
Diffstat (limited to 'src/usr/targeting')
-rw-r--r--src/usr/targeting/common/Targets.pm10
-rwxr-xr-xsrc/usr/targeting/common/processMrw.pl31
-rwxr-xr-xsrc/usr/targeting/common/xmltohb/attribute_types_hb.xml4
-rw-r--r--src/usr/targeting/common/xmltohb/hb_customized_attrs.xml5
4 files changed, 35 insertions, 15 deletions
diff --git a/src/usr/targeting/common/Targets.pm b/src/usr/targeting/common/Targets.pm
index 662380348..48cc85a70 100644
--- a/src/usr/targeting/common/Targets.pm
+++ b/src/usr/targeting/common/Targets.pm
@@ -1027,12 +1027,10 @@ sub iterateOverChiplets
}
else
{
- # This is our "bug" scenerio. We have found a
- # connection, but that PHB element is already
- # filled in the array. We need to kill the
- # program.
- printf("Found a duplicate connection for PEC %s PHB %s.\n",$pec_num,$phb_num);
- die "Duplicate PHB bus connection found\n";
+ # The dynamic bifurcation feature will make duplicate connection
+ # for single PEC. So just post warning message for the possible
+ # error in other scenario.
+ printf("Warning: Found a duplicate connection for PEC %s PHB %s.\n",$pec_num,$phb_num);
}
}
}
diff --git a/src/usr/targeting/common/processMrw.pl b/src/usr/targeting/common/processMrw.pl
index b6eac4e5f..ead7ee620 100755
--- a/src/usr/targeting/common/processMrw.pl
+++ b/src/usr/targeting/common/processMrw.pl
@@ -1957,13 +1957,23 @@ sub processPec
$pec_iop_swap |= 1 << $bitshift;
}
+ my $pcie_bifurcated = "0";
+ if ($targetObj->isBusAttributeDefined($phb_config_child, 0, "PCIE_BIFURCATED")) {
+ $pcie_bifurcated = $targetObj->getBusAttribute
+ ($phb_config_child, 0, "PCIE_BIFURCATED");
+ }
# Set the lane swap for the PEC. If we find more swaps as
# we process the other PCI busses then we will overwrite
# the overall swap value with the newly computed one.
- $targetObj->setAttribute($target,
- "PEC_PCIE_IOP_SWAP_NON_BIFURCATED", $pec_iop_swap);
- $targetObj->setAttribute($target,
- "PROC_PCIE_IOP_SWAP", $pec_iop_swap);
+ if ($pcie_bifurcated eq "1") {
+ $targetObj->setAttribute($target,
+ "PEC_PCIE_IOP_SWAP_BIFURCATED", $pec_iop_swap);
+ } else {
+ $targetObj->setAttribute($target,
+ "PEC_PCIE_IOP_SWAP_NON_BIFURCATED", $pec_iop_swap);
+ $targetObj->setAttribute($target,
+ "PROC_PCIE_IOP_SWAP", $pec_iop_swap);
+ }
$lane_mask[$lane_group][0] =
$targetObj->getAttribute
@@ -1973,10 +1983,15 @@ sub processPec
$lane_mask[0][0], $lane_mask[1][0],
$lane_mask[2][0], $lane_mask[3][0]);
- $targetObj->setAttribute($target, "PROC_PCIE_LANE_MASK",
- $lane_mask_attr);
- $targetObj->setAttribute($target,
- "PEC_PCIE_LANE_MASK_NON_BIFURCATED", $lane_mask_attr);
+ if ($pcie_bifurcated eq "1") {
+ $targetObj->setAttribute($target,
+ "PEC_PCIE_LANE_MASK_BIFURCATED", $lane_mask_attr);
+ } else {
+ $targetObj->setAttribute($target, "PROC_PCIE_LANE_MASK",
+ $lane_mask_attr);
+ $targetObj->setAttribute($target,
+ "PEC_PCIE_LANE_MASK_NON_BIFURCATED", $lane_mask_attr);
+ }
# Only compute the HDAT attributes if they are available
# and have default values
diff --git a/src/usr/targeting/common/xmltohb/attribute_types_hb.xml b/src/usr/targeting/common/xmltohb/attribute_types_hb.xml
index fcef2071a..5f88bbce1 100755
--- a/src/usr/targeting/common/xmltohb/attribute_types_hb.xml
+++ b/src/usr/targeting/common/xmltohb/attribute_types_hb.xml
@@ -1109,6 +1109,10 @@
<name>TPM_REQUIRED</name>
<value>0xCC03</value>
</enumerator>
+ <enumerator>
+ <name>PCI_BIFURCATED</name>
+ <value>0xCD03</value>
+ </enumerator>
</enumerationType>
<attribute>
diff --git a/src/usr/targeting/common/xmltohb/hb_customized_attrs.xml b/src/usr/targeting/common/xmltohb/hb_customized_attrs.xml
index 5c9b80970..cd7f14833 100644
--- a/src/usr/targeting/common/xmltohb/hb_customized_attrs.xml
+++ b/src/usr/targeting/common/xmltohb/hb_customized_attrs.xml
@@ -736,7 +736,10 @@
<id>ATTR_REL_POS</id>
<no_export/>
</attribute>
-
+ <attribute>
+ <id>ATTR_PROC_PCIE_IOP_SWAP</id>
+ <writeable/>
+ </attribute>
<!-- =====================================================================
End of customizations definitions
================================================================= -->
OpenPOWER on IntegriCloud