summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorNick Bofferding <bofferdn@us.ibm.com>2012-08-16 13:52:49 -0500
committerA. Patrick Williams III <iawillia@us.ibm.com>2012-08-22 12:34:59 -0500
commit005d9cbf75dcc516ea48c7a83289bd4671deac25 (patch)
treeb12fe9c213e3d982d9199a36f999ce07688ca1dd /src
parente6473c5ae134bac575b1db0c3a797c5833f56ce2 (diff)
downloadtalos-hostboot-005d9cbf75dcc516ea48c7a83289bd4671deac25.tar.gz
talos-hostboot-005d9cbf75dcc516ea48c7a83289bd4671deac25.zip
Locate FSP specific targets' attributes in FSP section
- Changed image compiler to locate FSP specific targets' attributes in the FSP specific section Change-Id: Ic6e55612458338446b707f26cc25fe9c8ec00c82 Reviewed-on: http://gfw160.austin.ibm.com:8080/gerrit/1545 Tested-by: Jenkins Server Reviewed-by: A. Patrick Williams III <iawillia@us.ibm.com>
Diffstat (limited to 'src')
-rwxr-xr-xsrc/usr/targeting/common/xmltohb/xmltohb.pl32
1 files changed, 31 insertions, 1 deletions
diff --git a/src/usr/targeting/common/xmltohb/xmltohb.pl b/src/usr/targeting/common/xmltohb/xmltohb.pl
index c162e3899..f333234f8 100755
--- a/src/usr/targeting/common/xmltohb/xmltohb.pl
+++ b/src/usr/targeting/common/xmltohb/xmltohb.pl
@@ -2784,6 +2784,30 @@ sub enumNameToValue {
}
################################################################################
+# Query if target instance is an FSP target
+################################################################################
+
+my %g_fspTargetTypesCache = ();
+
+sub isFspTargetInstance {
+ my($attributes,$targetInstance) = @_;
+ my $fspTargetInstance = 0;
+
+ if(%g_fspTargetTypesCache)
+ {
+ $fspTargetInstance = %g_fspTargetTypesCache->{$targetInstance->{type}};
+ }
+ else
+ {
+ %g_fspTargetTypesCache =
+ map { $_->{id} => exists $_->{fspOnly} ? 1:0 }
+ @{$attributes->{targetType}};
+ }
+
+ return $fspTargetInstance;
+}
+
+################################################################################
# Object which accumulates/flushes bit field data
################################################################################
@@ -3458,6 +3482,11 @@ sub generateTargetingImage {
}
}
+ # Flag if target is FSP specific; in that case store all of its
+ # attributes in the FSP section, regardless of whether they are
+ # themselves FSP specific. Only need to do this 1x per target instance
+ my $fspTarget = isFspTargetInstance($attributes,$targetInstance);
+
my %attributeDefCache =
map { $_->{id} => $_} @{$attributes->{attribute}};
@@ -3472,7 +3501,8 @@ sub generateTargetingImage {
my $section;
# TODO RTC: 35451
# Split "fsp" into more sections later
- if( exists $attributeDef->{fspOnly} )
+ if( (exists $attributeDef->{fspOnly})
+ || ($fspTarget))
{
$section = "fsp";
}
OpenPOWER on IntegriCloud