diff options
author | Chen Du <duchen@us.ibm.com> | 2019-04-08 12:47:06 -0500 |
---|---|---|
committer | Daniel M. Crowell <dcrowell@us.ibm.com> | 2019-05-15 11:49:15 -0500 |
commit | 54a570f06c63ae18c6eca5ee9e48fe5c3c755625 (patch) | |
tree | bd2c3a5b0f5deca03a6ce2d1c930b98ce7f71613 /src/usr/targeting/common/processMrw.pl | |
parent | bda479bb756377e5237ef8be451ad5db6073a11f (diff) | |
download | talos-hostboot-54a570f06c63ae18c6eca5ee9e48fe5c3c755625.tar.gz talos-hostboot-54a570f06c63ae18c6eca5ee9e48fe5c3c755625.zip |
MRW parsing updates for Axone+UB task 2
Task 2: Deal with chip-ocmb
Code parses out chip-ocmb information from the swift.xml
and checks for validity of the data. Code processed the correct
affinity path based on a modulo algorithm. All other information
was taken from our current simics_AXONE.system.xml
Code also parses the i2c_mux information because it highly
correlates with the chip-ocmb
Change-Id: I97ce375280c268837135fd16c13399f662f1c8dc
RTC: 196808
Reviewed-on: http://rchgit01.rchland.ibm.com/gerrit1/75673
Reviewed-by: Matthew Raybuck <matthew.raybuck@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>
Tested-by: Jenkins OP HW <op-hw-jenkins+hostboot@us.ibm.com>
Reviewed-by: Daniel M. Crowell <dcrowell@us.ibm.com>
Tested-by: Daniel M. Crowell <dcrowell@us.ibm.com>
Diffstat (limited to 'src/usr/targeting/common/processMrw.pl')
-rwxr-xr-x | src/usr/targeting/common/processMrw.pl | 54 |
1 files changed, 30 insertions, 24 deletions
diff --git a/src/usr/targeting/common/processMrw.pl b/src/usr/targeting/common/processMrw.pl index a507dc1a8..ac1365c62 100755 --- a/src/usr/targeting/common/processMrw.pl +++ b/src/usr/targeting/common/processMrw.pl @@ -47,24 +47,7 @@ my $build = "hb"; my $system_config = ""; my $output_filename = ""; -# Map for omi to omic parent -# OMI | OMIC -# -------------- -# 1 | 2 -# 2 | 1 -# 3 | 1 -# 4 | 0 -# 5 | 0 -# 6 | 0 -# 7 | 1 -# 8 | 2 -# 9 | 2 -# 10 | 1 -# 11 | 1 -# 12 | 0 -# 13 | 0 -# 14 | 0 -# 15 | 1 +# Map the OMI instance to its corresponding OMIC parent my %omi_map = (4 => "physical:sys-0/node-0/proc-0/mc-0/omic-0", 5 => "physical:sys-0/node-0/proc-0/mc-0/omic-0", 6 => "physical:sys-0/node-0/proc-0/mc-0/omic-0", @@ -413,7 +396,10 @@ foreach my $target (@targets) { processUcd($targetObj, $target); } - + } + elsif ($type eq "OCMB_CHIP") + { + processOcmbChip($targetObj, $target); } processIpmiSensors($targetObj,$target); @@ -1170,7 +1156,6 @@ sub processProcessor ## update path for mvpd's and sbe's my $path = $targetObj->getAttribute($target, "PHYS_PATH"); my $model = $targetObj->getAttribute($target, "MODEL"); - $targetObj->setAttributeField($target, "EEPROM_VPD_PRIMARY_INFO","i2cMasterPath",$path); $targetObj->setAttributeField($target, @@ -1797,7 +1782,31 @@ sub processOmic $targetObj->setAttribute( $target, "CHIPLET_ID", $value); } + #-------------------------------------------------- +## OCMB_CHIP +## +## +sub processOcmbChip +{ + my $targetObj = shift; + my $target = shift; + + use integer; + # processMrw parses all of the values in the input xml + # Here we delete the values that are not needed + $targetObj->deleteAttribute($target, "CLASS"); + $targetObj->deleteAttribute($target, "DIRECTION"); + $targetObj->deleteAttribute($target, "FSI_OPTION_FLAGS"); + $targetObj->deleteAttribute($target, "INSTANCE_PATH"); + $targetObj->deleteAttribute($target, "MRW_TYPE"); + $targetObj->deleteAttribute($target, "PRIMARY_CAPABILITIES"); + $targetObj->deleteAttribute($target, "FRU_ID"); + + $targetObj->setEepromAttributesForOcmbChip($targetObj, $target); +} + +#-------------------------------------------------g ## MI ## ## @@ -3069,7 +3078,6 @@ sub processI2C \@i2cSpeed, \@i2cType, \@i2cPurpose, \@i2cLabel); } - sub setEepromAttributes { my $targetObj = shift; @@ -3084,9 +3092,7 @@ sub setEepromAttributes # $conn_target->{BUS_NUM}, "I2C_ADDRESS"); my $addr = $targetObj->getAttribute($conn_target->{DEST},"I2C_ADDRESS"); - - my $path = $targetObj->getAttribute($conn_target->{SOURCE_PARENT}, - "PHYS_PATH"); + my $path = $targetObj->getAttribute($conn_target->{SOURCE_PARENT}, "PHYS_PATH"); my $mem = $targetObj->getAttribute($conn_target->{DEST_PARENT}, "MEMORY_SIZE_IN_KB"); my $count = 1; # default for VPD SEEPROMs |