diff options
author | Chen Du <duchen@us.ibm.com> | 2019-05-22 12:25:51 -0500 |
---|---|---|
committer | Daniel M. Crowell <dcrowell@us.ibm.com> | 2019-06-10 15:33:19 -0500 |
commit | 48c966a99ec1fb58d3a18549b1a67c15bd054791 (patch) | |
tree | 1b412dce6c2ba4ea816c8ceb7dcc0afbc32f6dc1 /src/usr/targeting | |
parent | 09a23939d34ae03425676b358dc70661121cb5c5 (diff) | |
download | talos-hostboot-48c966a99ec1fb58d3a18549b1a67c15bd054791.tar.gz talos-hostboot-48c966a99ec1fb58d3a18549b1a67c15bd054791.zip |
Add OMI BAR calculations to MRW scripts
Need to set the OMI attribute OMI_INBAND_BAR_BASE_ADDR_OFFSET
The algorithm to determine this attribute is explained in
src/usr/mmio/mmio.C
Each OMI BAR is an offset from the base (0x0006030200000000)
The offset for an even OMI is every 8 gigabytes
The offset for an odd OMI is 2 gigabytes after the preceding
even OMI
Change-Id: I08973e0b2952a6ea32dbf4b95ad00cf5bbe92484
RTC: 210315
Reviewed-on: http://rchgit01.rchland.ibm.com/gerrit1/77742
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>
Reviewed-by: Christian R. Geddes <crgeddes@us.ibm.com>
Tested-by: FSP CI Jenkins <fsp-CI-jenkins+hostboot@us.ibm.com>
Reviewed-by: Daniel M. Crowell <dcrowell@us.ibm.com>
Diffstat (limited to 'src/usr/targeting')
-rwxr-xr-x | src/usr/targeting/common/processMrw.pl | 32 | ||||
-rw-r--r-- | src/usr/targeting/common/xmltohb/target_types.xml | 9 |
2 files changed, 41 insertions, 0 deletions
diff --git a/src/usr/targeting/common/processMrw.pl b/src/usr/targeting/common/processMrw.pl index fc8c74b18..f0aaf4518 100755 --- a/src/usr/targeting/common/processMrw.pl +++ b/src/usr/targeting/common/processMrw.pl @@ -1764,6 +1764,38 @@ sub processOmi my $num = $fapi_pos % $numberOfOmiPerProc; $value = "physical:sys-0/node-0/proc-$proc_num/" . $omi_map{$num}; $targetObj->setAttribute($target, "OMIC_PARENT", $value); + + my $omi = Math::BigInt->new($targetObj->getAttribute($target,"FAPI_POS")); + # Base omi bar offset + # We use this base address in simics_AXONE.system.xml and want our + # addresses to match the ones in that xml + my $base = 0x30400000000; + my $gigabyte = 0x40000000; + my $value = 0; + + # This algorithm is explained in src/usr/mmio/mmio.C + if ($omi % 2 eq 0) + { + $value = $base + $omi * 4 * $gigabyte; + } + else + { + $value = $base + (($omi - 1) * 4 + 2) * $gigabyte; + } + + $value = sprintf("0x%016s", substr(($value)->as_hex(),2)); + $targetObj->setAttribute($target, "OMI_INBAND_BAR_BASE_ADDR_OFFSET", + $value); + + # Set the parent MC BAR value to value of first OMI unit + if ($omi % 8 eq 0) + { + my $parent_mcc = $targetObj->getTargetParent($target); + my $parent_mi = $targetObj->getTargetParent($parent_mcc); + my $parent_mc = $targetObj->getTargetParent($parent_mi); + $targetObj->setAttribute($parent_mc, "OMI_INBAND_BAR_BASE_ADDR_OFFSET", + $value); + } } #-------------------------------------------------- diff --git a/src/usr/targeting/common/xmltohb/target_types.xml b/src/usr/targeting/common/xmltohb/target_types.xml index 99519fd94..97927aecc 100644 --- a/src/usr/targeting/common/xmltohb/target_types.xml +++ b/src/usr/targeting/common/xmltohb/target_types.xml @@ -2636,6 +2636,9 @@ <id>MODEL</id> <default>AXONE</default> </attribute> + <attribute> + <id>OMI_INBAND_BAR_BASE_ADDR_OFFSET</id> + </attribute> </targetType> <targetType> @@ -3518,6 +3521,12 @@ <default>AXONE</default> <id>MODEL</id> </attribute> + <attribute> + <id>OMI_INBAND_BAR_BASE_ADDR_OFFSET</id> + </attribute> + <attribute> + <id>ORDINAL_ID</id> + </attribute> </targetType> <!-- OMI (Special has two parents) |