summaryrefslogtreecommitdiffstats
path: root/tools/scripts
diff options
context:
space:
mode:
authorSantosh Puranik <santosh.puranik@in.ibm.com>2015-11-26 09:50:39 -0600
committerGregory S. Still <stillgs@us.ibm.com>2015-12-07 12:26:22 -0600
commitf55221ba25ce801088973feb959635f7d77640c9 (patch)
tree3af636cc0e6ee2fa2821303dfe4cf04276d54fea /tools/scripts
parent6c83004785b99fa088369ee7835e913fe9403ccb (diff)
downloadtalos-sbe-f55221ba25ce801088973feb959635f7d77640c9.tar.gz
talos-sbe-f55221ba25ce801088973feb959635f7d77640c9.zip
Support PERV attributes also for EQ and CORE targets
-- CHIP_UNIT_POS==chiplet number for all pervasive chiplets -- Split erstwhile PERV targets into two NEST groups + MCS targets Change-Id: I034bc9f09e1afcd8c204f00a2b8ae5489d81a47a Reviewed-on: http://gfw160.aus.stglabs.ibm.com:8080/gerrit/22344 Tested-by: Jenkins Server Reviewed-by: Gregory S. Still <stillgs@us.ibm.com>
Diffstat (limited to 'tools/scripts')
-rwxr-xr-xtools/scripts/ppeCreateAttrGetSetMacros.pl33
1 files changed, 30 insertions, 3 deletions
diff --git a/tools/scripts/ppeCreateAttrGetSetMacros.pl b/tools/scripts/ppeCreateAttrGetSetMacros.pl
index bdbbcae3..7ac64372 100755
--- a/tools/scripts/ppeCreateAttrGetSetMacros.pl
+++ b/tools/scripts/ppeCreateAttrGetSetMacros.pl
@@ -271,10 +271,15 @@ for my $attribute (sort keys %{$enums{AttributeId}}) {
$targetImplementation .= "\n" . $targetFunction . "\n{\n *o_pvalue = object->fapi2attr::${macroTarget}::${attribute};\n}\n";
- } else {
+ } elsif($targetMacro eq "TARGET_TYPE_PERV") {
- $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{
+ *o_pvalue = object->fapi2attr::${macroTarget}::${attribute}[getPervAttrIndex(i_ptarget)];
+}\n";
+ } else {
+$targetImplementation .= "\n" . $targetFunction . "\n{\n uint32_t index = i_ptarget.getTargetNumber();\n *o_pvalue = object->fapi2attr::${macroTarget}::${attribute}[index];\n}\n"
}
push(@newTargetImplementations, $targetImplementation);
}
@@ -363,7 +368,29 @@ if (@newAttributeDefines != 0) {
print OUTFILE "#include \"proc_sbe_fixed.H\"\n";
print OUTFILE "#include \"plat_target_parms.H\"\n\n";
print OUTFILE "namespace fapi2 {\n";
-
+ print OUTFILE "
+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())
+ {
+ l_index += (EQ_TARGET_OFFSET);
+ }
+ else if(TARGET_TYPE_CORE & i_target.getTargetType())
+ {
+ l_index += (CORE_TARGET_OFFSET);
+ }
+ else if(TARGET_TYPE_MCS & i_target.getTargetType())
+ {
+ l_index += (MCS_TARGET_OFFSET);
+ }
+ else
+ {
+ l_index += (NEST_GROUP1_TARGET_OFFSET);
+ }
+ return (l_index - NEST_GROUP1_TARGET_OFFSET);
+}
+";
foreach my $impl (@newTargetImplementations) {
OpenPOWER on IntegriCloud