summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorRaja Das <rajadas2@in.ibm.com>2014-11-04 08:41:11 -0600
committerAndrew J. Geissler <andrewg@us.ibm.com>2014-11-05 12:15:06 -0600
commit12b9ca8651e96ffc03b9e3581d829427e8dddfce (patch)
treeff60de6c56357fabb802194204ac7ac656878e32 /src
parent089ba507adabd68d9db2ca1862213948b3a42aa2 (diff)
downloadblackbird-hostboot-12b9ca8651e96ffc03b9e3581d829427e8dddfce.tar.gz
blackbird-hostboot-12b9ca8651e96ffc03b9e3581d829427e8dddfce.zip
Added Support for 2node and 4node Brazos binary generation
Change-Id: I7ad2bc4a7aafa0c303a8915db0296a7a6feada40 RTC: 114760 CMVC-Coreq: 938662 Reviewed-on: http://gfw160.aus.stglabs.ibm.com:8080/gerrit/14314 Tested-by: Jenkins Server Reviewed-by: Andrew J. Geissler <andrewg@us.ibm.com> Reviewed-by: A. Patrick Williams III <iawillia@us.ibm.com> Reviewed-by: Nicholas E. Bofferding <bofferdn@us.ibm.com>
Diffstat (limited to 'src')
-rw-r--r--src/usr/targeting/common/attributeTank.C24
-rw-r--r--src/usr/targeting/common/genHwsvMrwXml.pl31
-rwxr-xr-xsrc/usr/targeting/common/genNodeMrwXml.pl25
-rw-r--r--src/usr/targeting/common/targetservice.C5
4 files changed, 60 insertions, 25 deletions
diff --git a/src/usr/targeting/common/attributeTank.C b/src/usr/targeting/common/attributeTank.C
index 0ec8fd761..17f6375d7 100644
--- a/src/usr/targeting/common/attributeTank.C
+++ b/src/usr/targeting/common/attributeTank.C
@@ -332,7 +332,8 @@ void AttributeTank::serializeAttributes(
// requested chunk size, this should not happen, if it does,
// just move to the next attribute
TRACFCOMP(g_trac_targeting,
- "serializeAttributes: Error, attr too big to serialize (0x%x)",
+ "serializeAttributes: Error, attr too big to serialize "
+ "(0x%x)",
(*l_itr)->iv_hdr.iv_valSize);
l_itr++;
}
@@ -432,8 +433,9 @@ void AttributeTank::deserializeAttributes(
{
// Remaining chunk smaller than attribute header, quit
TRACFCOMP(g_trac_targeting,
- "deserializeAttributes: Error, header too big for chunk (0x%x)",
- (i_attributes.iv_size - l_index));
+ "deserializeAttributes: Error, header too big for chunk "
+ "(0x%x)",
+ (i_attributes.iv_size - l_index));
break;
}
@@ -443,7 +445,8 @@ void AttributeTank::deserializeAttributes(
{
// Remaining chunk smaller than attribute value, quit
TRACFCOMP(g_trac_targeting,
- "deserializeAttributes: Error, attr too big for chunk (0x%x:0x%x)",
+ "deserializeAttributes: Error, attr too big for chunk "
+ "(0x%x:0x%x)",
l_pAttrHdr->iv_valSize, (i_attributes.iv_size - l_index));
break;
}
@@ -516,7 +519,9 @@ errlHndl_t AttributeTank::writePermAttributes()
if (l_success)
{
- TRACFCOMP(g_trac_targeting, "writePermAttributes: Successful permanent override of Attr ID:0x%X Value:0x%lX applied to target 0x%X",
+ TRACFCOMP(g_trac_targeting, "writePermAttributes: Successful "
+ "permanent override of Attr ID:0x%X Value:0x%llX applied "
+ "to target 0x%X",
l_attrHdr.iv_attrId,
*reinterpret_cast<uint64_t *>(l_attr->iv_pVal),
(*l_permTargetList)->getAttr<ATTR_HUID>() );
@@ -531,7 +536,10 @@ errlHndl_t AttributeTank::writePermAttributes()
if (l_found)
{
- TRACFCOMP(g_trac_targeting, "writePermAttributes: Value NOT applied to target, override failed for Attr ID:0x%X Value:0x%lX on target 0x%X - current value 0x%lX",
+ TRACFCOMP(g_trac_targeting, "writePermAttributes: Value "
+ "NOT applied to target, override failed for Attr "
+ "ID:0x%X Value:0x%llX on target 0x%X - current value "
+ "0x%llX",
l_attrHdr.iv_attrId,
*reinterpret_cast<uint64_t *>(l_attr->iv_pVal),
(*l_permTargetList)->getAttr<ATTR_HUID>(),
@@ -556,7 +564,9 @@ errlHndl_t AttributeTank::writePermAttributes()
}
else
{
- TRACFCOMP(g_trac_targeting, "writePermAttributes: Target does not have attribute, override NOT applied for Attr ID:0x%X on target 0x%X",
+ TRACFCOMP(g_trac_targeting, "writePermAttributes: Target "
+ "does not have attribute, override NOT applied for "
+ "Attr ID:0x%X on target 0x%X",
l_attrHdr.iv_attrId,
(*l_permTargetList)->getAttr<ATTR_HUID>() );
/*@
diff --git a/src/usr/targeting/common/genHwsvMrwXml.pl b/src/usr/targeting/common/genHwsvMrwXml.pl
index 603910cae..25e9f4843 100644
--- a/src/usr/targeting/common/genHwsvMrwXml.pl
+++ b/src/usr/targeting/common/genHwsvMrwXml.pl
@@ -31,6 +31,8 @@
# [--build=hb] [--outfile=XmlFilename]
# --system=systemname
# Specify which system MRW XML to be generated
+# --systemnodes=systemnodesinbrazos
+# Specify number of nodes for brazos system, by default it is 4
# --mrwdir=pathname
# Specify the complete dir pathname of the MRW. Colon-delimited
# list accepted to specify multiple directories to search.
@@ -84,6 +86,7 @@ use constant SPI_APSS_RID_FIELD => 6;
our $mrwdir = "";
my $sysname = "";
+my $sysnodes = "";
my $usage = 0;
my $DEBUG = 0;
my $outFile = "";
@@ -93,6 +96,7 @@ my $build = "fsp";
use Getopt::Long;
GetOptions( "mrwdir:s" => \$mrwdir,
"system:s" => \$sysname,
+ "systemnodes:s" => \$sysnodes,
"outfile:s" => \$outFile,
"build:s" => \$build,
"DEBUG" => \$DEBUG,
@@ -127,6 +131,15 @@ if ($sysname =~ /brazos/)
$MAXNODE = 4;
}
+my $NODECONF = "";
+if( ($sysnodes) && ($sysnodes =~ /2/) )
+{
+ $NODECONF = "2-node";
+}
+else
+{
+ $NODECONF = "3-and-4-node";
+}
my $mru_ids_file = open_mrw_file($mrwdir, "${sysname}-mru-ids.xml");
my $mruAttr = parse_xml_file($mru_ids_file);
@@ -306,7 +319,6 @@ foreach my $policy ( keys %optTargPolicies )
}
}
-
#------------------------------------------------------------------------------
# Process the pm-settings MRW file
#------------------------------------------------------------------------------
@@ -645,12 +657,12 @@ foreach my $i (@{$powerbus->{'power-bus'}})
my $endpoint2_ipath = $i->{'endpoint'}[1]->{'instance-path'};
#print STDOUT "powerbus: $endp1, $endp2, $dwnstrm_swap, $upstrm_swap\n";
- # Brazos: Populate power bus list only for "2-node" & "all" configuration
- # for ABUS. Populate all entries for other bus type.
+ # Brazos: Populate power bus list only for "2-node", 3-and-4-node & "all"
+ # configuration for ABUS. Populate all entries for other bus type.
# Other targets(tuleta, alphine..etc) : nodeconfig will be "all".
- if ( (lc($bustype) ne "a") || ($nodeconfig eq "2-node") ||
+ if ( (lc($bustype) ne "a") || ($nodeconfig eq $NODECONF) ||
($nodeconfig eq "all") )
{
push @pbus, [ lc($endp1), lc($endp2), $dwnstrm_swap,
@@ -3252,11 +3264,12 @@ sub generate_ax_buses
if ( $type eq "a" )
{
- # Brazos : Generate ABUS peer info only for "2-node" and "all"
- # configuration.
+ # Brazos : Generate ABUS peer info only for "2-node",
+ # "3-and-4-node" and "all" configuration.
# All other targets(tuleta,alphine..etc) will have "all"
# configuration.
- if( ($node_config eq "2-node") || ($node_config eq "all") )
+
+ if( ($node_config eq $NODECONF) || ($node_config eq "all") )
{
print "
<attribute>
@@ -4653,10 +4666,12 @@ sub display_help
Usage:
$scriptname --help
- $scriptname --system=sysname --mrwdir=pathname
+ $scriptname --system=sysname --systemnodes=2 --mrwdir=pathname
[--build=hb] [--outfile=XmlFilename]
--system=systemname
Specify which system MRW XML to be generated
+ --systemnodes=systemnodesinbrazos
+ Specify number of nodes for brazos system, by default it is 4
--mrwdir=pathname
Specify the complete dir pathname of the MRW. Colon-delimited
list accepted to specify multiple directories to search.
diff --git a/src/usr/targeting/common/genNodeMrwXml.pl b/src/usr/targeting/common/genNodeMrwXml.pl
index 3236e91bc..cd27af354 100755
--- a/src/usr/targeting/common/genNodeMrwXml.pl
+++ b/src/usr/targeting/common/genNodeMrwXml.pl
@@ -6,7 +6,9 @@
#
# OpenPOWER HostBoot Project
#
-# COPYRIGHT International Business Machines Corp. 2013,2014
+# Contributors Listed Below - COPYRIGHT 2013,2014
+# [+] International Business Machines Corp.
+#
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
@@ -24,13 +26,15 @@
#
# Usage:
#
-# genNodeMrwXml.pl --system=systemname --mrwdir=pathname
+# genNodeMrwXml.pl --system=systemname --systemnodes=2 --mrwdir=pathname
# --build=hb/fsp --nodeCount=nodeCount
# [--help]
#
# --system=systemname
# Specify which system MRW XML to be generated.
# The file name will be set as uppercase
+# --systemnodes=systemnodesinbrazos
+# Specify number of nodes for brazos system, by default it is 4
# --mrwdir=pathname
# Specify the complete dir pathname of the MRW. Colon-delimited
# list accepted to specify multiple directories to search.
@@ -66,6 +70,7 @@ $XML::Simple::PREFERRED_PARSER = 'XML::Parser';
################################################################################
my $mrwdir = "";
my $sysname = "";
+my $sysnodes = "";
my $usage = 0;
my $nodeCount = 0;
my $outFileDir = "";
@@ -74,6 +79,7 @@ use Getopt::Long;
GetOptions( "mrwdir:s" => \$mrwdir,
"system:s" => \$sysname,
+ "systemnodes:s" => \$sysnodes,
"nodeCount:i" => \$nodeCount,
"outfileDir:s" => \$outFileDir,
"build:s" => \$build,
@@ -113,15 +119,22 @@ else
die "ERROR: $build is not valid. Valid values are fsp or hb\n";
}
+my $nodeSuffix = "";
+if( ($sysnodes) && ($sysnodes =~ /2/) )
+{
+ $nodeSuffix = "2N_"
+}
#create files
-my $mrw_file = open_mrw_file($mrwdir, "${SYSNAME}_${fileSuffix}.mrw.xml");
+my $mrw_file =
+ open_mrw_file($mrwdir, "${SYSNAME}_${nodeSuffix}${fileSuffix}.mrw.xml");
$sysInfo = XMLin($mrw_file,
ForceArray=>1);
#print Dumper($sysInfo);
for my $j(0..($nodeCount))
{
- $outFile = "$outFileDir/${SYSNAME}_node_$j"."_${fileSuffix}.mrw.xml";
+ $outFile =
+ "$outFileDir/${SYSNAME}_${nodeSuffix}node_$j"."_${fileSuffix}.mrw.xml";
push @nodeOutFiles, [$outFile];
}
@@ -235,11 +248,13 @@ Usage:
displays usage
- $scriptname --system=sysname --mrwdir=pathname
+ $scriptname --system=sysname --systemnodes=2 --mrwdir=pathname
--build=hb --nodeCount=nodeCount
--system=systemname
Specify which system MRW XML to be generated
The system name will be set as uppercase
+ --systemnodes=systemnodesinbrazos
+ Specify number of nodes for brazos system, by default it is 4
--mrwdir=pathname
Specify the complete dir pathname of the MRW. Colon-delimited
list accepted to specify multiple directories to search.
diff --git a/src/usr/targeting/common/targetservice.C b/src/usr/targeting/common/targetservice.C
index d7b512d30..cd3870ded 100644
--- a/src/usr/targeting/common/targetservice.C
+++ b/src/usr/targeting/common/targetservice.C
@@ -69,12 +69,7 @@ namespace TARGETING
// It is defined here to limit the scope
#define MAX_NODE_ID iv_nodeInfo.size()
-#ifdef MULTINODE_TARGETING
#define MAX_ENABLED_NODE_ID iv_nodeInfo.size()
-#else
-#define MAX_ENABLED_NODE_ID 2
-#endif
-
//******************************************************************************
// targetService
OpenPOWER on IntegriCloud