diff options
author | Dean Sanner <dsanner@us.ibm.com> | 2017-01-09 20:59:46 -0600 |
---|---|---|
committer | Matthew A. Ploetz <maploetz@us.ibm.com> | 2017-01-14 16:37:04 -0500 |
commit | 0850fdd82a5fe91d15556932ad905234af404208 (patch) | |
tree | 47b1b6bc7a2996929ced8074b3bde5339775591b /src/usr/targeting | |
parent | b4380fca211feeefe4733b8e70418327dc32c30c (diff) | |
download | talos-hostboot-0850fdd82a5fe91d15556932ad905234af404208.tar.gz talos-hostboot-0850fdd82a5fe91d15556932ad905234af404208.zip |
Support Zaius xml changes for bringup
-Update dimm REL_POS
-Add dimm EEPROM support
-Make dimm numbering logical
-Adhere to correct FAPI_POS numbering
-Add in support for TEMP_SENSOR_I2C_CONFIG
-Remove following ATTR from targets
MCS EEPROM_VPD_PRIMARY_INFO -- MCS
Change-Id: Iac8a065b88088b252b23adb381f6eb79a1cf5bf1
Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/34629
Tested-by: Jenkins Server <pfd-jenkins+hostboot@us.ibm.com>
Tested-by: FSP CI Jenkins <fsp-CI-jenkins+hostboot@us.ibm.com>
Tested-by: Jenkins OP Build CI <op-jenkins+hostboot@us.ibm.com>
Reviewed-by: William G. Hoffa <wghoffa@us.ibm.com>
Reviewed-by: Norman K. James <njames@us.ibm.com>
Reviewed-by: Matthew A. Ploetz <maploetz@us.ibm.com>
Diffstat (limited to 'src/usr/targeting')
-rw-r--r-- | src/usr/targeting/common/Targets.pm | 68 | ||||
-rw-r--r-- | src/usr/targeting/common/processMrw.pl | 74 | ||||
-rwxr-xr-x | src/usr/targeting/common/xmltohb/target_types.xml | 1 |
3 files changed, 103 insertions, 40 deletions
diff --git a/src/usr/targeting/common/Targets.pm b/src/usr/targeting/common/Targets.pm index 8d4bbccf5..aa2f03691 100644 --- a/src/usr/targeting/common/Targets.pm +++ b/src/usr/targeting/common/Targets.pm @@ -5,7 +5,7 @@ # # OpenPOWER HostBoot Project # -# Contributors Listed Below - COPYRIGHT 2015,2016 +# Contributors Listed Below - COPYRIGHT 2015,2017 # [+] International Business Machines Corp. # # @@ -75,6 +75,7 @@ sub new targeting => undef, enumerations => undef, MAX_MCS => 0, + UNIT_COUNTS => undef, master_proc => undef, huid_idx => undef, mru_idx => undef, @@ -367,7 +368,9 @@ sub printAttribute } else { - print $fh "\t\t<default>$value</default>\n"; + if ($value ne "") { + print $fh "\t\t<default>$value</default>\n"; + } } print $fh "\t</attribute>\n"; } @@ -611,6 +614,19 @@ sub buildAffinity $self->{membuf_inst_num}=0; + ## count children target types + foreach my $target (sort keys %{ $self->{data}->{TARGETS} }) + { + my $children = $self->getTargetChildren($target); + if ($children ne "") { + foreach my $child (@{ $children }) + { + my $type = $self->getType($child); + $self->{UNIT_COUNTS}->{$target}->{$type}++; + } + } + } + foreach my $target (sort keys %{ $self->{data}->{TARGETS} }) { my $target_ptr = $self->{data}->{TARGETS}{$target}; @@ -684,6 +700,20 @@ sub buildAffinity elsif ($type eq "PROC") { $proc++; + my $num_mcs = 0; + ### count number of MCSs + foreach my $unit (@{ $self->{data}->{TARGETS}{$target}{CHILDREN} }) + { + my $unit_type = $self->getType($unit); + if ($unit_type eq "MCBIST") + { + $num_mcs+=2; # 2 MCS's per MCBIST + } + } + if ($num_mcs > $self->{MAX_MCS}) + { + $self->{MAX_MCS} = $num_mcs; + } $self->{NUM_PROCS_PER_NODE} = $proc + 1; @@ -978,12 +1008,10 @@ sub processDimms my $proc_target = $self->getTargetParent($mcbist_target); my $dimm_connector_tgt = $self->getTargetParent($dimm); - my $mca = $self->getAttribute($mca_target, "CHIP_UNIT"); - my $mcs = $self->getAttribute($mcs_target, "CHIP_UNIT"); - my $mcbist = $self->getAttribute($mcbist_target, "CHIP_UNIT"); - my $dimm_pos= $self->getAttribute($dimm_connector_tgt, "POSITION"); - - $dimm_pos = ($dimm_pos*2) + $port_num; + my $mca = $self->getAttribute($mca_target, "CHIP_UNIT")%2; + my $mcs = $self->getAttribute($mcs_target, "CHIP_UNIT")%2; + my $mcbist = $self->getAttribute($mcbist_target, "CHIP_UNIT"); + my $dimm_pos= $self->getAttribute($dimm_connector_tgt,"POSITION"); $self->setAttribute($dimm, "AFFINITY_PATH", $self->getAttribute($mcbist_target, "AFFINITY_PATH") @@ -998,10 +1026,31 @@ sub processDimms $self->setAttribute($dimm,"FAPI_NAME", getFapiName($type, $node, $dimm_pos)); - $self->setAttribute($dimm, "FAPI_POS", $dimm_pos); $self->setAttribute($dimm, "ORDINAL_ID",$dimm_pos); $self->setAttribute($dimm, "POSITION", $dimm_pos); $self->setAttribute($dimm, "VPD_REC_NUM", $dimm_pos); + $self->setAttribute($dimm, "REL_POS", $port_num); + $self->setAttribute($dimm, "MBA_DIMM", $port_num); #which dimm + $self->setAttribute($dimm, "MBA_PORT", 0); #0, each MCA is a port + + ## set all FAPI_POS + my $DIMM_PER_CHANNEL = 2; + my $mcbist_pos = $proc * $self->{UNIT_COUNTS}-> + {$proc_target}->{MCBIST} + + $self->getAttribute($mcbist_target,"REL_POS"); + my $mcs_pos = $mcbist_pos * $self->{UNIT_COUNTS}-> + {$mcbist_target}->{MCS} + + $self->getAttribute($mcs_target,"REL_POS"); + my $mca_pos = $mcs_pos * $self->{UNIT_COUNTS}-> + {$mcs_target}->{MCA} + + $self->getAttribute($mca_target,"REL_POS"); + my $dimm_pos = $mca_pos * $DIMM_PER_CHANNEL + + $self->getAttribute($dimm,"REL_POS"); + + $self->setAttribute($mcbist_target, "FAPI_POS", $mcbist_pos); + $self->setAttribute($mcs_target, "FAPI_POS", $mcs_pos); + $self->setAttribute($mca_target, "FAPI_POS", $mca_pos); + $self->setAttribute($dimm, "FAPI_POS", $dimm_pos); $self->{huid_idx}->{$type} = $dimm_pos; $self->setHuid($dimm, $sys, $node); @@ -1015,6 +1064,7 @@ sub processDimms } } + sub processMcs { #@TODO RTC:163874 diff --git a/src/usr/targeting/common/processMrw.pl b/src/usr/targeting/common/processMrw.pl index 9888d7bcf..e9b63663c 100644 --- a/src/usr/targeting/common/processMrw.pl +++ b/src/usr/targeting/common/processMrw.pl @@ -6,7 +6,7 @@ # # OpenPOWER HostBoot Project # -# Contributors Listed Below - COPYRIGHT 2015,2016 +# Contributors Listed Below - COPYRIGHT 2015,2017 # [+] International Business Machines Corp. # # @@ -103,10 +103,6 @@ foreach my $target (sort keys %{ $targetObj->getAllTargets() }) { processProcessor($targetObj, $target); } - elsif ($type eq "MEMBUF") - { - processMembuf($targetObj, $target); - } elsif ($type eq "APSS") { processApss($targetObj, $target); @@ -178,6 +174,11 @@ sub processSystem $targetObj->{NUM_PROCS_PER_NODE}); parseBitwise($targetObj,$target,"CDM_POLICIES"); + my ($num,$base,$group_offset,$proc_offset,$offset) = split(/,/, + $targetObj->getAttribute($target,"XSCOM_BASE_ADDRESS")); + + $targetObj->setAttribute($target, "XSCOM_BASE_ADDRESS", $base); + } sub processIpmiSensors { @@ -570,6 +571,16 @@ sub processI2cSpeeds my $i2cs=$targetObj->findConnections($target,"I2C",""); if ($i2cs ne "") { foreach my $i2c (@{$i2cs->{CONN}}) { + my $dest_type = $targetObj->getTargetType($i2c->{DEST_PARENT}); + my $parent_target =$targetObj->getTargetParent($i2c->{DEST_PARENT}); + if ($dest_type eq "chip-spd-device") { + setEepromAttributes($targetObj, + "EEPROM_VPD_PRIMARY_INFO",$parent_target, + $i2c); + } elsif ($dest_type eq "chip-dimm-thermal-sensor") { + setDimmTempAttributes($targetObj, $parent_target, $i2c); + } + my $port=oct($targetObj->getAttribute($i2c->{SOURCE},"I2C_PORT")); my $engine=oct($targetObj->getAttribute( $i2c->{SOURCE},"I2C_ENGINE")); @@ -663,7 +674,10 @@ sub setupBars my $value=""; if ($num==0) { - $value=$base; + my $b=sprintf("0x%016s",substr(( + $i_base+$i_node_offset*$group+ + $i_proc_offset*$proc)->as_hex(),2)); + $value=$b; } else { @@ -1167,27 +1181,6 @@ sub processMembuf processMembufVpdAssociation($targetObj,$target); - ## finds which gpio expander that controls vddr regs for membufs - my $gpioexp=$targetObj->findConnections($target,"I2C","GPIO_EXPANDER"); - if ($gpioexp ne "" ) { - my $vreg=$targetObj->findConnections( - $gpioexp->{CONN}->[0]->{DEST_PARENT},"GPIO","VOLTAGE_REGULATOR"); - if ($vreg ne "") { - my $vddPin = $targetObj->getAttribute( - $vreg->{CONN}->[0]->{SOURCE},"CHIP_UNIT"); - my $membufs=$targetObj->findConnections( - $vreg->{CONN}->[0]->{DEST_PARENT},"POWER","MEMBUF"); - if ($membufs ne "") { - foreach my $membuf (@{$membufs->{CONN}}) { - my $aff = $targetObj->getAttribute($membuf->{DEST_PARENT}, - "PHYS_PATH"); - setGpioAttributes($targetObj,$membuf->{DEST_PARENT}, - $gpioexp->{CONN}->[0],$vddPin); - - } - } - } - } ## find port mapping my %dimm_portmap; foreach my $child (@{$targetObj->getTargetChildren($target)}) @@ -1286,14 +1279,16 @@ sub setEepromAttributes my $port = $targetObj->getAttribute($conn_target->{SOURCE}, "I2C_PORT"); my $engine = $targetObj->getAttribute($conn_target->{SOURCE}, "I2C_ENGINE"); - my $addr = $targetObj->getBusAttribute($conn_target->{SOURCE}, - $conn_target->{BUS_NUM}, "I2C_ADDRESS"); + #my $addr = $targetObj->getBusAttribute($conn_target->{SOURCE}, + # $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 $mem = $targetObj->getAttribute($conn_target->{DEST_PARENT}, "MEMORY_SIZE_IN_KB"); - my $count = 2; # default for VPD SEEPROMs + my $count = 1; # default for VPD SEEPROMs my $cycle = $targetObj->getAttribute($conn_target->{DEST_PARENT}, "WRITE_CYCLE_TIME"); my $page = $targetObj->getAttribute($conn_target->{DEST_PARENT}, @@ -1316,6 +1311,25 @@ sub setEepromAttributes $targetObj->setAttributeField($target, $name, "fruId", $fru); } } +sub setDimmTempAttributes +{ + my $targetObj = shift; + my $target = shift; + my $conn_target = shift; + my $fru = shift; + + my $name = "TEMP_SENSOR_I2C_CONFIG"; + my $port = $targetObj->getAttribute($conn_target->{SOURCE}, "I2C_PORT"); + my $engine = $targetObj->getAttribute($conn_target->{SOURCE}, "I2C_ENGINE"); + my $addr = $targetObj->getAttribute($conn_target->{DEST},"I2C_ADDRESS"); + my $path = $targetObj->getAttribute($conn_target->{SOURCE_PARENT}, + "PHYS_PATH"); + + $targetObj->setAttributeField($target, $name, "i2cMasterPath", $path); + $targetObj->setAttributeField($target, $name, "port", $port); + $targetObj->setAttributeField($target, $name, "devAddr", $addr); + $targetObj->setAttributeField($target, $name, "engine", $engine); +} sub setGpioAttributes diff --git a/src/usr/targeting/common/xmltohb/target_types.xml b/src/usr/targeting/common/xmltohb/target_types.xml index fabeb397d..efe9906dd 100755 --- a/src/usr/targeting/common/xmltohb/target_types.xml +++ b/src/usr/targeting/common/xmltohb/target_types.xml @@ -1762,7 +1762,6 @@ <attribute><id>MSS_VPD_MT_MC_DQ_ACBOOST_WR_UP</id></attribute> <attribute><id>MSS_VPD_MT_MC_DQ_CTLE_CAP</id></attribute> <attribute><id>MSS_VPD_MT_MC_DQ_CTLE_RES</id></attribute> - <attribute><id>EEPROM_VPD_PRIMARY_INFO</id></attribute> <attribute><id>VPD_REC_NUM</id></attribute> <attribute><id>EFF_DRAM_GEN</id></attribute> <attribute><id>EFF_DIMM_TYPE</id></attribute> |