summaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorSantosh Puranik <santosh.puranik@in.ibm.com>2016-07-28 13:24:10 -0500
committerSachin Gupta <sgupta2m@in.ibm.com>2016-08-01 23:35:22 -0400
commit3c4c747abb8c92c71182968cdf002314de0d5769 (patch)
treee97ee53d5532bcaf6c7223c3adb7fa1b04369ddd /tools
parentc6510c428168eeb379377613868dfa884a653314 (diff)
downloadtalos-sbe-3c4c747abb8c92c71182968cdf002314de0d5769.tar.gz
talos-sbe-3c4c747abb8c92c71182968cdf002314de0d5769.zip
Support getting FAPI Target type and instance
-- Use mirrored target_types.H Change-Id: If6c30b2122980470f8a7a5acffcc59df9304e979 Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/27592 Tested-by: Jenkins Server <pfd-jenkins+hostboot@us.ibm.com> Reviewed-by: Gregory S. Still <stillgs@us.ibm.com> Reviewed-by: Sachin Gupta <sgupta2m@in.ibm.com>
Diffstat (limited to 'tools')
-rwxr-xr-xtools/scripts/ppeCreateAttrGetSetMacros.pl34
-rwxr-xr-xtools/scripts/ppeParseAttributeInfo.pl2
2 files changed, 30 insertions, 6 deletions
diff --git a/tools/scripts/ppeCreateAttrGetSetMacros.pl b/tools/scripts/ppeCreateAttrGetSetMacros.pl
index c5f4a61f..f07d4dc6 100755
--- a/tools/scripts/ppeCreateAttrGetSetMacros.pl
+++ b/tools/scripts/ppeCreateAttrGetSetMacros.pl
@@ -1,4 +1,28 @@
#!/usr/bin/perl -w
+# IBM_PROLOG_BEGIN_TAG
+# This is an automatically generated prolog.
+#
+# $Source: tools/scripts/ppeCreateAttrGetSetMacros.pl $
+#
+# OpenPOWER sbe Project
+#
+# Contributors Listed Below - COPYRIGHT 2015,2016
+# [+] 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.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+# implied. See the License for the specific language governing
+# permissions and limitations under the License.
+#
+# IBM_PROLOG_END_TAG
#find enums in AttributeId
#for each enum check for ${enum}_Type
#check for type and array values
@@ -96,7 +120,7 @@ while (<FILE>) {
} elsif (m/\s*#define\s+(\w+)_SETMACRO\(ID\,\sPTARGET\,\sVAL\)\s(.+)/) {
$setMacros{$1} = $2;
if ($DEBUG) { print "DEBUG:: attribute = $1 : SETMACRO = $2\n"; }
- } elsif (m/\s*const\s*TargetTypes_t\s+(\w+)_TargetTypes\s*=\s*(\S+)\s*;\s*/) {
+ } elsif (m/\s*const\s*TargetType\s+(\w+)_TargetTypes\s*=\s*(\S+)\s*;\s*/) {
$targetMacros{$1} = $2;
# print "DEBUG:: attribute = $1 : TARGET = $2\n";
if ($DEBUG) { print "DEBUG:: attribute = $1 : TARGET = $2\n"; }
@@ -157,7 +181,7 @@ while (<FILE>) {
} elsif (m/\s*#define\s+(\w+)_SETMACRO\s+(\S+)\s*/) {
$setMacros{$1} = $2;
if ($DEBUG) { print "DEBUG:: attribute = $1 : SETMACRO = $2\n"; }
- } elsif (m/\s*const\s*TargetTypes_t\s+(\w+)_TargetTypes\s*=\s*(\S+)\s*;\s*/) {
+ } elsif (m/\s*const\s*TargetType\s+(\w+)_TargetTypes\s*=\s*(\S+)\s*;\s*/) {
$targetMacros{$1} = $2;
if ($DEBUG) { print "DEBUG:: attribute = $1 : TARGET = $2\n"; }
}
@@ -343,15 +367,15 @@ if (@newAttributeDefines != 0) {
__attribute__((always_inline)) inline uint32_t getPervAttrIndex(const fapi2::Target<TARGET_TYPE_PERV> &i_target)
{
uint32_t l_index = i_target.getTargetNumber();
- if(TARGET_TYPE_EQ & i_target.getTargetType())
+ if(PPE_TARGET_TYPE_EQ & i_target.getTargetType())
{
l_index += (EQ_TARGET_OFFSET);
}
- else if(TARGET_TYPE_CORE & i_target.getTargetType())
+ else if(PPE_TARGET_TYPE_CORE & i_target.getTargetType())
{
l_index += (CORE_TARGET_OFFSET);
}
- else if(TARGET_TYPE_MCS & i_target.getTargetType())
+ else if(PPE_TARGET_TYPE_MCS & i_target.getTargetType())
{
l_index += (MCS_TARGET_OFFSET);
}
diff --git a/tools/scripts/ppeParseAttributeInfo.pl b/tools/scripts/ppeParseAttributeInfo.pl
index b137a9b0..a888d42a 100755
--- a/tools/scripts/ppeParseAttributeInfo.pl
+++ b/tools/scripts/ppeParseAttributeInfo.pl
@@ -475,7 +475,7 @@ foreach my $entr (@{$entries->{entry}}) {
exit(1);
}
- print AIFILE "const TargetTypes_t $attr->{id}_TargetTypes = ";
+ print AIFILE "const TargetType $attr->{id}_TargetTypes = ";
# Split on commas
my @targTypes = split(',', $attr->{targetType});
OpenPOWER on IntegriCloud