diff options
author | Erich Hauptli <ejhauptl@us.ibm.com> | 2015-08-18 17:11:03 -0500 |
---|---|---|
committer | A. Patrick Williams III <iawillia@us.ibm.com> | 2015-08-31 11:20:20 -0500 |
commit | ede318f5bb934d7df251d7c16d137f443267a850 (patch) | |
tree | 2f70366bf125b9ca4cc3e96469f4c0ebdc1d877b /src/usr/targeting | |
parent | 500b18263e24bb22ad16456acbd5583ac25dacf7 (diff) | |
download | talos-hostboot-ede318f5bb934d7df251d7c16d137f443267a850.tar.gz talos-hostboot-ede318f5bb934d7df251d7c16d137f443267a850.zip |
Added support for additional Naples IOP
Added support for Naples IOP and fixed 32bit build machine overflow issue.
Change-Id: I9fb374acb55126196d5d362b300640cfc23c7364
Reviewed-on: http://gfw160.aus.stglabs.ibm.com:8080/gerrit/20091
Tested-by: Jenkins Server
Tested-by: Jenkins OP Build CI
Tested-by: Jenkins OP HW
Tested-by: FSP CI Jenkins
Reviewed-by: MATTHEW A. PLOETZ <maploetz@us.ibm.com>
Reviewed-by: A. Patrick Williams III <iawillia@us.ibm.com>
Diffstat (limited to 'src/usr/targeting')
-rw-r--r-- | src/usr/targeting/common/processMrw.pl | 58 |
1 files changed, 42 insertions, 16 deletions
diff --git a/src/usr/targeting/common/processMrw.pl b/src/usr/targeting/common/processMrw.pl index 80703c8dc..e9ff1d085 100644 --- a/src/usr/targeting/common/processMrw.pl +++ b/src/usr/targeting/common/processMrw.pl @@ -607,8 +607,10 @@ sub setupBars { for (my $i=0;$i<$num;$i++) { - my $b=sprintf("0x%016X", - $i_base+$i_node_offset*$node+$i_proc_offset*$proc+$i_offset*$i); + #Note: Hex convert method avoids overflow on 32bit machine + my $b=sprintf("0x%016s",substr(( + $i_base+$i_node_offset*$node+ + $i_proc_offset*$proc+$i_offset*$i)->as_hex(),2)); my $sep=","; if ($i==$num-1) { @@ -641,8 +643,10 @@ sub processMcs my $i_offset = Math::BigInt->new($offset); my $mcs = $targetObj->getAttribute($target, "MCS_NUM"); - my $mcsStr=sprintf("0x%016X", - $i_base+$i_node_offset*$node+$i_proc_offset*$proc+$i_offset*$mcs); + #Note: Hex convert method avoids overflow on 32bit machines + my $mcsStr=sprintf("0x%016s",substr(( + $i_base+$i_node_offset*$node+ + $i_proc_offset*$proc+$i_offset*$mcs)->as_hex(),2)); $targetObj->setAttribute($target, "IBSCOM_MCS_BASE_ADDR", $mcsStr); } @@ -770,33 +774,38 @@ sub processPcie ## this is a special target whose children are the different ways ## to configure iop/phb's - # TODO RTC: TBD - # add a 3rd IOP for Naples - ## Get config children my @lane_swap; $lane_swap[0][0] = 0; $lane_swap[0][1] = 0; $lane_swap[1][0] = 0; $lane_swap[1][1] = 0; + $lane_swap[2][0] = 0; + $lane_swap[2][1] = 0; my @lane_mask; $lane_mask[0][0] = "0x0000"; $lane_mask[0][1] = "0x0000"; $lane_mask[1][0] = "0x0000"; $lane_mask[1][1] = "0x0000"; + $lane_mask[2][0] = "0x0000"; + $lane_mask[2][1] = "0x0000"; my @lane_rev; $lane_rev[0][0] = ""; $lane_rev[0][1] = ""; $lane_rev[1][0] = ""; $lane_rev[1][1] = ""; + $lane_rev[2][0] = ""; + $lane_rev[2][1] = ""; my @is_slot; $is_slot[0][0] = 0; $is_slot[0][1] = 0; $is_slot[1][0] = 0; $is_slot[1][1] = 0; + $is_slot[2][0] = 0; + $is_slot[2][1] = 0; my $phb_config = "00000000"; @@ -830,6 +839,16 @@ sub processPcie $iop_swap{1}{1}{'01'}=$t[14]; $iop_swap{1}{1}{'11'}=$t[15]; + + $iop_swap{2}{0}{'00'}=$t[16]; + $iop_swap{2}{0}{'01'}=$t[17]; + $iop_swap{2}{0}{'10'}=$t[18]; + $iop_swap{2}{0}{'11'}=$t[19]; + $iop_swap{2}{1}{'00'}=$t[20]; + $iop_swap{2}{1}{'10'}=$t[21]; + $iop_swap{2}{1}{'01'}=$t[22]; + $iop_swap{2}{1}{'11'}=$t[23]; + my @lane_eq; my $NUM_PHBS=4; for (my $p=0;$p<$NUM_PHBS;$p++) @@ -901,9 +920,10 @@ sub processPcie my $hex = sprintf('%X', oct("0b$phb_config")); $targetObj->setAttribute($parentTarget, "PROC_PCIE_PHB_ACTIVE","0x" . $hex); - my $lane_mask_attr = sprintf("%s,%s,%s,%s", + my $lane_mask_attr = sprintf("%s,%s,%s,%s,%s,%s", $lane_mask[0][0], $lane_mask[0][1], - $lane_mask[1][0], $lane_mask[1][1]); + $lane_mask[1][0], $lane_mask[1][1], + $lane_mask[2][0], $lane_mask[2][1]); $targetObj->setAttribute($parentTarget, "PROC_PCIE_LANE_MASK", $lane_mask_attr); $targetObj->setAttribute($parentTarget,"PROC_PCIE_LANE_MASK_NON_BIFURCATED", @@ -913,7 +933,7 @@ sub processPcie my @iop_swap_lu; my @iop_lane_swap; - for (my $iop=0;$iop<2;$iop++) + for (my $iop=0;$iop<3;$iop++) { $iop_lane_swap[$iop] = $lane_swap[$iop][0] | $lane_swap[$iop][1]; my $lane_rev = $lane_rev[$iop][0].$lane_rev[$iop][1]; @@ -924,10 +944,14 @@ sub processPcie } } - my $lane_rev_attr0 = sprintf("%s,%s", - oct($iop_swap_lu[0]),oct($iop_swap_lu[1])); - my $lane_rev_attr1 = sprintf("%s,0,%s,0", - oct($iop_swap_lu[0]),oct($iop_swap_lu[1])); + my $lane_rev_attr0 = sprintf("%s,%s,%s", + oct($iop_swap_lu[0]), + oct($iop_swap_lu[1]), + oct($iop_swap_lu[2])); + my $lane_rev_attr1 = sprintf("%s,0,%s,0,%s,0", + oct($iop_swap_lu[0]), + oct($iop_swap_lu[1]), + oct($iop_swap_lu[2])); $targetObj->setAttribute($parentTarget, "PROC_PCIE_IOP_SWAP", $lane_rev_attr0); @@ -942,8 +966,10 @@ sub processPcie $targetObj->setAttribute($parentTarget, "PROC_PCIE_IOP_REVERSAL_BIFURCATED", "0,0,0,0"); - my $is_slot_attr = sprintf("%s,%s,%s,%s", - $is_slot[0][0], $is_slot[0][1], $is_slot[1][0], $is_slot[1][1]); + my $is_slot_attr = sprintf("%s,%s,%s,%s,%s,%s", + $is_slot[0][0], $is_slot[0][1], + $is_slot[1][0], $is_slot[1][1], + $is_slot[2][0], $is_slot[2][1]); $targetObj->setAttribute($parentTarget, "PROC_PCIE_IS_SLOT", $is_slot_attr); ## don't support DSMP |