From b260ff28f93c32a7cf1abf2001903813ea09e8eb Mon Sep 17 00:00:00 2001 From: Doug Gilbert Date: Tue, 26 Aug 2014 16:20:55 -0500 Subject: HTMGT new attributes Change-Id: I75860340800b28f83e53f020beea4bd71af6f38d RTC:114813 CMVC-Coreq: 938591 Reviewed-on: http://gfw160.aus.stglabs.ibm.com:8080/gerrit/13307 Tested-by: Jenkins Server Reviewed-by: Daniel M. Crowell Reviewed-by: Nicholas E. Bofferding Reviewed-by: A. Patrick Williams III --- src/build/citest/etc/patches/attribute_types.patch | 16 ++ src/build/citest/etc/patches/genHwsvMrwXml.patch | 236 +++++++++++++++++++++ src/build/citest/etc/patches/target_types.patch | 22 ++ src/build/citest/etc/workarounds.presimsetup | 22 ++ 4 files changed, 296 insertions(+) create mode 100644 src/build/citest/etc/patches/attribute_types.patch create mode 100644 src/build/citest/etc/patches/genHwsvMrwXml.patch create mode 100644 src/build/citest/etc/patches/target_types.patch (limited to 'src/build') diff --git a/src/build/citest/etc/patches/attribute_types.patch b/src/build/citest/etc/patches/attribute_types.patch new file mode 100644 index 000000000..04a5c7edd --- /dev/null +++ b/src/build/citest/etc/patches/attribute_types.patch @@ -0,0 +1,16 @@ +1413,1427d1412 +< +< OCC_MASTER_CAPABLE +< +< This attribute is to determine whether an occ is master capable. +< An OCC is master capable if it's parent processor is wired to the +< APSS. +< +< +< +< +< +< non-volatile +< +< +< diff --git a/src/build/citest/etc/patches/genHwsvMrwXml.patch b/src/build/citest/etc/patches/genHwsvMrwXml.patch new file mode 100644 index 000000000..c621435a7 --- /dev/null +++ b/src/build/citest/etc/patches/genHwsvMrwXml.patch @@ -0,0 +1,236 @@ +68c68,69 +< # xml parsing +--- +> # xml parsing +> # F 938591 dgilbert Sep 25, 2014 Make OCC target type common to HB +96,104d96 +< # for SPI connections in the @SPIs array +< use constant SPI_PROC_PATH_FIELD => 0; +< use constant SPI_NODE_FIELD => 1; +< use constant SPI_POS_FIELD => 2; +< use constant SPI_ENDPOINT_PATH_FIELD => 3; +< use constant SPI_APSS_POS_FIELD => 4; +< use constant SPI_APSS_ORD_FIELD => 5; +< use constant SPI_APSS_RID_FIELD => 6; +< +1830,1860d1821 +< # Compares two Apss instances based on the node and position # +< ################################################################################ +< sub byApssNodePos($$) +< { +< my $retVal = -1; +< +< my $lhsInstance_node = $_[0][SPI_NODE_FIELD]; +< my $rhsInstance_node = $_[1][SPI_NODE_FIELD]; +< if(int($lhsInstance_node) eq int($rhsInstance_node)) +< { +< my $lhsInstance_pos = $_[0][SPI_APSS_POS_FIELD]; +< my $rhsInstance_pos = $_[1][SPI_APSS_POS_FIELD]; +< if(int($lhsInstance_pos) eq int($rhsInstance_pos)) +< { +< die "ERROR: Duplicate apss positions: 2 apss with same +< node and position, \ +< NODE: $lhsInstance_node POSITION: $lhsInstance_pos\n"; +< } +< elsif(int($lhsInstance_pos) > int($rhsInstance_pos)) +< { +< $retVal = 1; +< } +< } +< elsif(int($lhsInstance_node) > int($rhsInstance_node)) +< { +< $retVal = 1; +< } +< return $retVal; +< } +< +< ################################################################################ +1891,1948d1851 +< my @SPIs; +< my $apssInit = 0; +< my $getBaseRidApss = 0; +< my $ridApssBase = 0; +< +< sub init_apss +< { +< my $proc_spi_busses = +< open_mrw_file($::mrwdir, "${sysname}-proc-spi-busses.xml"); +< my $spiBus = ::parse_xml_file($proc_spi_busses, +< forcearray=>['processor-spi-bus']); +< +< # Capture all SPI connections into the @SPIs array +< my @rawSPIs; +< foreach my $i (@{$spiBus->{'processor-spi-bus'}}) +< { +< if($getBaseRidApss == 0) +< { +< my $locCode = $i->{endpoint}->{'location-code'}; +< my @locCodeComp = split( '-', $locCode ); +< $ridApssBase = (@locCodeComp > 2) ? 0x4900 : 0x800; +< $getBaseRidApss = 1; +< } +< +< if ($i->{endpoint}->{'instance-path'} =~ /.*APSS-[0-9]+$/i) +< { +< my $pos = $i->{endpoint}->{'instance-path'}; +< while (chop($pos) ne '/') {}; +< $pos = chop($pos); +< push @rawSPIs, [ +< $i->{processor}->{'instance-path'}, +< $i->{processor}->{target}->{node}, +< $i->{processor}->{target}->{position}, +< $i->{endpoint}->{'instance-path'}, +< $pos, 0, 0 +< ]; +< } +< } +< +< @SPIs = sort byApssNodePos @rawSPIs; +< +< my $ordinalApss = 0; +< my $apssPos = 0; +< my $currNode = -1; +< for my $i (0 .. $#SPIs) +< { +< $SPIs[$i][SPI_APSS_ORD_FIELD] = $ordinalApss; +< $ordinalApss++; +< if($currNode != $SPIs[$i][SPI_NODE_FIELD]) +< { +< $apssPos = 0; +< $currNode = $SPIs[$i][SPI_NODE_FIELD]; +< } +< $SPIs[$i][SPI_APSS_RID_FIELD] +< = sprintf("0x%08X", $ridApssBase + (2*$currNode) + $apssPos++); +< } +< } +< +2025a1929 +> fsp_occ=>\&generate_fsp_occ, +2561d2464 +< generate_occ($proc, $ordinalId); +2719,2744c2622 +< my $occInit = 0; +< my %occList = (); +< sub occ_init +< { +< my $targets_file = open_mrw_file($::mrwdir, "${sysname}-targets.xml"); +< my $occTargets = ::parse_xml_file($targets_file); +< +< #get the OCC details +< foreach my $Target (@{$occTargets->{target}}) +< { +< if($Target->{'ecmd-common-name'} eq "occ") +< { +< my $ipath = $Target->{'instance-path'}; +< my $node = $Target->{node}; +< my $position = $Target->{position}; +< +< $occList{$node}{$position} = { +< 'node' => $node, +< 'position' => $position, +< 'instancePath' => $ipath, +< } +< } +< } +< } +< +< sub generate_occ +--- +> sub generate_fsp_occ +2747c2625 +< my ($proc, $ordinalId) = @_; +--- +> my ($ordinalId) = @_; +2749,2781d2626 +< if ($apssInit == 0) +< { +< init_apss; +< $apssInit = 1; +< } +< +< # RTC: 49574 +< # The calculations for HUID and ordinal ID are not correct for multi-node +< # configurations, since HUID doesn't take into account the node value, and +< # the oridinal ID repeats on every node. Fix these with the multi-node +< # story +< my $uidstr = sprintf("0x%02X13%04X",${node},$proc); +< my $mastercapable = 0; +< +< for my $spi ( 0 .. $#SPIs ) +< { +< my $ipath = $SPIs[$spi][SPI_ENDPOINT_PATH_FIELD]; +< if(($SPIs[$spi][SPI_ENDPOINT_PATH_FIELD] =~ /.*APSS-[0-9]+$/i) && +< ($node eq $SPIs[$spi][SPI_NODE_FIELD]) && +< ($proc eq $SPIs[$spi][SPI_POS_FIELD])) +< { +< $mastercapable = 1; +< last; +< } +< } +< +< # Get the OCC info +< if ($occInit == 0) +< { +< occ_init; +< $occInit = 1; +< } +< my $mruData = get_mruid($occList{$node}{$proc}->{'instancePath'}); +2784,2811c2629 +< +< +< +< sys${sys}node${node}proc${proc}occ0 +< occ +< HUID${uidstr} +< ORDINAL_ID$ordinalId +< +< PHYS_PATH +< physical:sys-$sys/node-$node/proc-$proc/occ-0 +< +< +< MRU_ID +< $mruData +< +< +< AFFINITY_PATH +< affinity:sys-$sys/node-$node/proc-$proc/occ-0 +< +< +< INSTANCE_PATH +< instance:$occList{$node}{$proc}->{'instancePath'} +< +< +< OCC_MASTER_CAPABLE +< $mastercapable +< +< \n"; +--- +> ORDINAL_ID$ordinalId"; +2912c2730 +< if ($apssInit == 0) +--- +> if ($::apssInit == 0) +2914,2915c2732,2733 +< init_apss; +< $apssInit = 1; +--- +> ::init_apss; +> $::apssInit = 1; +2918c2736 +< for my $i ( 0 .. $#SPIs ) +--- +> for my $i ( 0 .. $#::SPIs ) +2920c2738 +< if ($SPIs[$i][SPI_NODE_FIELD] eq $node) +--- +> if ($::SPIs[$i][::SPI_NODE_FIELD] eq $node) +2923,2926c2741,2744 +< my $instanceId = $SPIs[$i][SPI_APSS_POS_FIELD]; +< my $ordinalId = $SPIs[$i][SPI_APSS_ORD_FIELD]; +< my $ridstr = $SPIs[$i][SPI_APSS_RID_FIELD]; +< my $ipath = $SPIs[$i][SPI_ENDPOINT_PATH_FIELD]; +--- +> my $instanceId = $::SPIs[$i][::SPI_APSS_POS_FIELD]; +> my $ordinalId = $::SPIs[$i][::SPI_APSS_ORD_FIELD]; +> my $ridstr = $::SPIs[$i][::SPI_APSS_RID_FIELD]; +> my $ipath = $::SPIs[$i][::SPI_ENDPOINT_PATH_FIELD]; diff --git a/src/build/citest/etc/patches/target_types.patch b/src/build/citest/etc/patches/target_types.patch new file mode 100644 index 000000000..ae55b5391 --- /dev/null +++ b/src/build/citest/etc/patches/target_types.patch @@ -0,0 +1,22 @@ +69,89d68 +< occ +< unit +< +< TYPE +< OCC +< +< +< MODEL +< POWER8 +< +< +< OCC_MASTER_CAPABLE +< +< DECONFIG_GARDABLE0 +< HWAS_STATE_CHANGED_SUBSCRIPTION_MASK +< 0x00000000 +< +< +< +< +< diff --git a/src/build/citest/etc/workarounds.presimsetup b/src/build/citest/etc/workarounds.presimsetup index f251c0b32..cad6632d5 100755 --- a/src/build/citest/etc/workarounds.presimsetup +++ b/src/build/citest/etc/workarounds.presimsetup @@ -55,3 +55,25 @@ mkdir -p $sb/hbfw/fsp/targeting cp $BACKING_BUILD/src/hbfw/fsp/targeting/makefile $sb/hbfw/fsp/targeting patch $sb/hbfw/fsp/targeting/makefile \ ${HOSTBOOTROOT}/src/build/citest/etc/patches/attrPredicate.patch + +echo "+++ Patching attribute_types_fsp.xml for HTMGT attribute support." +mkdir -p $sb/hbfw/fsp/targeting/xmltohb + +cp $BACKING_BUILD/src/hbfw/fsp/targeting/xmltohb/attribute_types_fsp.xml \ + $sb/hbfw/fsp/targeting/xmltohb +patch $sb/hbfw/fsp/targeting/xmltohb/attribute_types_fsp.xml \ + ${HOSTBOOTROOT}/src/build/citest/etc/patches/attribute_types.patch + +echo "+++ Patching target_types_fsp.xml for HTMGT attribute support." +cp $BACKING_BUILD/src/hbfw/fsp/targeting/xmltohb/target_types_fsp.xml \ + $sb/hbfw/fsp/targeting/xmltohb +patch $sb/hbfw/fsp/targeting/xmltohb/target_types_fsp.xml \ + ${HOSTBOOTROOT}/src/build/citest/etc/patches/target_types.patch + +echo "+++ Patching genHwsvMrwXml_fsp.pm for OCC attribute support" + +mkdir -p $sb/mrw/tools +cp $BACKING_BUILD/src/mrw/tools/genHwsvMrwXml_fsp.pm $sb/mrw/tools +patch $sb/mrw/tools/genHwsvMrwXml_fsp.pm \ + ${HOSTBOOTROOT}/src/build/citest/etc/patches/genHwsvMrwXml.patch + -- cgit v1.2.1