summaryrefslogtreecommitdiffstats
path: root/src/build
diff options
context:
space:
mode:
authorDoug Gilbert <dgilbert@us.ibm.com>2014-08-26 16:20:55 -0500
committerA. Patrick Williams III <iawillia@us.ibm.com>2014-10-13 16:22:29 -0500
commitb260ff28f93c32a7cf1abf2001903813ea09e8eb (patch)
treeab5a5688424c854edb3b0c218b7336d26b452c95 /src/build
parented751d7dc757487c927f55518afe334b47d0c49a (diff)
downloadtalos-hostboot-b260ff28f93c32a7cf1abf2001903813ea09e8eb.tar.gz
talos-hostboot-b260ff28f93c32a7cf1abf2001903813ea09e8eb.zip
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 <dcrowell@us.ibm.com> Reviewed-by: Nicholas E. Bofferding <bofferdn@us.ibm.com> Reviewed-by: A. Patrick Williams III <iawillia@us.ibm.com>
Diffstat (limited to 'src/build')
-rw-r--r--src/build/citest/etc/patches/attribute_types.patch16
-rw-r--r--src/build/citest/etc/patches/genHwsvMrwXml.patch236
-rw-r--r--src/build/citest/etc/patches/target_types.patch22
-rwxr-xr-xsrc/build/citest/etc/workarounds.presimsetup22
4 files changed, 296 insertions, 0 deletions
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
+< <attribute>
+< <id>OCC_MASTER_CAPABLE</id>
+< <description>
+< 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.
+< </description>
+< <simpleType>
+< <uint8_t>
+< </uint8_t>
+< </simpleType>
+< <persistency>non-volatile</persistency>
+< <readable/>
+< <fspOnly/>
+< </attribute>
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
+< <!-- $SYSNAME n${node}p${proc} OCC units -->
+<
+< <targetInstance>
+< <id>sys${sys}node${node}proc${proc}occ0</id>
+< <type>occ</type>
+< <attribute><id>HUID</id><default>${uidstr}</default></attribute>
+< <attribute><id>ORDINAL_ID</id><default>$ordinalId</default></attribute>
+< <attribute>
+< <id>PHYS_PATH</id>
+< <default>physical:sys-$sys/node-$node/proc-$proc/occ-0</default>
+< </attribute>
+< <attribute>
+< <id>MRU_ID</id>
+< <default>$mruData</default>
+< </attribute>
+< <attribute>
+< <id>AFFINITY_PATH</id>
+< <default>affinity:sys-$sys/node-$node/proc-$proc/occ-0</default>
+< </attribute>
+< <compileAttribute>
+< <id>INSTANCE_PATH</id>
+< <default>instance:$occList{$node}{$proc}->{'instancePath'}</default>
+< </compileAttribute>
+< <attribute>
+< <id>OCC_MASTER_CAPABLE</id>
+< <default>$mastercapable</default>
+< </attribute>
+< </targetInstance>\n";
+---
+> <attribute><id>ORDINAL_ID</id><default>$ordinalId</default></attribute>";
+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
+< <id>occ</id>
+< <parent>unit</parent>
+< <attribute>
+< <id>TYPE</id>
+< <default>OCC</default>
+< </attribute>
+< <attribute>
+< <id>MODEL</id>
+< <default>POWER8</default>
+< </attribute>
+< <attribute>
+< <id>OCC_MASTER_CAPABLE</id>
+< </attribute>
+< <attribute><id>DECONFIG_GARDABLE</id><default>0</default></attribute>
+< <attribute><id>HWAS_STATE_CHANGED_SUBSCRIPTION_MASK</id>
+< <default>0x00000000</default>
+< </attribute>
+< <fspOnly/>
+< </targetType>
+<
+< <targetType>
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
+
OpenPOWER on IntegriCloud