summaryrefslogtreecommitdiffstats
path: root/src/tools/scripts/ppeCreateAttrGetSetMacros.pl
diff options
context:
space:
mode:
authorSantosh Puranik <santosh.puranik@in.ibm.com>2016-09-13 11:31:46 -0500
committerSantosh S. Puranik <santosh.puranik@in.ibm.com>2016-09-19 01:45:34 -0400
commitd6dcd0125e002508ea665a5b71eb2019a0274c91 (patch)
tree15911e4b3f1722d5bec3083f8030288046329d4d /src/tools/scripts/ppeCreateAttrGetSetMacros.pl
parent84f49a31edbf1f4dbdca4397194a498c97d4244c (diff)
downloadtalos-sbe-d6dcd0125e002508ea665a5b71eb2019a0274c91.tar.gz
talos-sbe-d6dcd0125e002508ea665a5b71eb2019a0274c91.zip
FAPI Plat Cleanup - III
-- Move completely to using FAPI from src/import Change-Id: Ifd27a900fea45ef0e7d6bd4a62192e50812b99ac Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/29581 Tested-by: Jenkins Server <pfd-jenkins+hostboot@us.ibm.com> Reviewed-by: Sachin Gupta <sgupta2m@in.ibm.com> Tested-by: FSP CI Jenkins <fsp-CI-jenkins+hostboot@us.ibm.com> Reviewed-by: Shakeeb A. Pasha B K <shakeebbk@in.ibm.com> Reviewed-by: Santosh S. Puranik <santosh.puranik@in.ibm.com>
Diffstat (limited to 'src/tools/scripts/ppeCreateAttrGetSetMacros.pl')
-rwxr-xr-xsrc/tools/scripts/ppeCreateAttrGetSetMacros.pl16
1 files changed, 8 insertions, 8 deletions
diff --git a/src/tools/scripts/ppeCreateAttrGetSetMacros.pl b/src/tools/scripts/ppeCreateAttrGetSetMacros.pl
index 990a394a..a0004f39 100755
--- a/src/tools/scripts/ppeCreateAttrGetSetMacros.pl
+++ b/src/tools/scripts/ppeCreateAttrGetSetMacros.pl
@@ -120,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*TargetType\s+(\w+)_TargetTypes\s*=\s*(\S+)\s*;\s*/) {
+ } elsif (m/\s*const\s*fapi2::TargetType\s+(\w+)_TargetType\s*=\s*(\S+)\s*;\s*/) {
$targetMacros{$1} = $2;
# print "DEBUG:: attribute = $1 : TARGET = $2\n";
if ($DEBUG) { print "DEBUG:: attribute = $1 : TARGET = $2\n"; }
@@ -181,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*TargetType\s+(\w+)_TargetTypes\s*=\s*(\S+)\s*;\s*/) {
+ } elsif (m/\s*const\s*fapi2::TargetType\s+(\w+)_TargetType\s*=\s*(\S+)\s*;\s*/) {
$targetMacros{$1} = $2;
if ($DEBUG) { print "DEBUG:: attribute = $1 : TARGET = $2\n"; }
}
@@ -302,7 +302,7 @@ for my $attribute (sort keys %{$enums{AttributeId}}) {
}\n";
} else {
-$targetImplementation .= "\n" . $targetFunction . "\n{\n uint32_t index = i_ptarget.getTargetNumber();\n *o_pvalue = object->fapi2attr::${macroTarget}::${attribute}[index];\n}\n"
+$targetImplementation .= "\n" . $targetFunction . "\n{\n uint32_t index = static_cast<plat_target_handle_t>(i_ptarget.get()).getTargetInstance();\n *o_pvalue = object->fapi2attr::${macroTarget}::${attribute}[index];\n}\n"
}
push(@newTargetImplementations, $targetImplementation);
}
@@ -323,7 +323,7 @@ $targetImplementation .= "\n" . $targetFunction . "\n{\n uint32_t index = i_pt
$targetImplementation = "\n" . $targetFunction . "\n{\n object->fapi2attr::${macroTarget}::${attribute} = i_pvalue;\n}\n";
} else {
- $targetImplementation = "\n" . $targetFunction . "\n{\n uint32_t index = i_ptarget.getTargetNumber();\n object->fapi2attr::${macroTarget}::${attribute}[index] = i_pvalue;\n}\n";
+ $targetImplementation = "\n" . $targetFunction . "\n{\n uint32_t index = static_cast<plat_target_handle_t>(i_ptarget.get()).getTargetInstance();\n object->fapi2attr::${macroTarget}::${attribute}[index] = i_pvalue;\n}\n";
}
push(@newTargetImplementations, $targetImplementation);
@@ -366,16 +366,16 @@ if (@newAttributeDefines != 0) {
print OUTFILE "
__attribute__((always_inline)) inline uint32_t getPervAttrIndex(const fapi2::Target<TARGET_TYPE_PERV> &i_target)
{
- uint32_t l_index = i_target.getTargetNumber();
- if(PPE_TARGET_TYPE_EQ & i_target.getTargetType())
+ uint32_t l_index = static_cast<plat_target_handle_t>(i_target.get()).getTargetInstance();
+ if(PPE_TARGET_TYPE_EQ & static_cast<plat_target_handle_t>(i_target.get()).getTargetType())
{
l_index += (EQ_TARGET_OFFSET);
}
- else if(PPE_TARGET_TYPE_CORE & i_target.getTargetType())
+ else if(PPE_TARGET_TYPE_CORE & static_cast<plat_target_handle_t>(i_target.get()).getTargetType())
{
l_index += (CORE_TARGET_OFFSET);
}
- else if(PPE_TARGET_TYPE_MCBIST & i_target.getTargetType())
+ else if(PPE_TARGET_TYPE_MCBIST & static_cast<plat_target_handle_t>(i_target.get()).getTargetType())
{
l_index += (MCBIST_TARGET_OFFSET);
}
OpenPOWER on IntegriCloud