summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorSantosh Puranik <santosh.puranik@in.ibm.com>2016-09-12 11:55:14 -0500
committerSantosh S. Puranik <santosh.puranik@in.ibm.com>2016-09-19 01:44:56 -0400
commit84f49a31edbf1f4dbdca4397194a498c97d4244c (patch)
tree9750d58dfff69c7d51e88203b9109dc8b262b8cc /src
parent420d37d4a25344e5a7ba31c3c150d08eccf331a4 (diff)
downloadtalos-sbe-84f49a31edbf1f4dbdca4397194a498c97d4244c.tar.gz
talos-sbe-84f49a31edbf1f4dbdca4397194a498c97d4244c.zip
FAPI Plat Cleanup - II
-- Changed names of some generated files -- Names in line with the ones use in EKB Change-Id: Id14e97e3b3a062246596eaed9e008f5dc3570d77 Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/29495 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')
-rw-r--r--src/build/Makefile4
-rw-r--r--src/build/utils/proc_sbe_fixed.H2
-rw-r--r--src/hwpf/include/fapi2_attribute_service.H (renamed from src/hwpf/include/fapi2AttributeService.H)9
-rw-r--r--src/hwpf/include/plat/hw_access.H (renamed from src/hwpf/include/hw_access.H)3
-rw-r--r--src/hwpf/include/plat/plat_attributes.H5
-rw-r--r--src/hwpf/src/plat/plat_attribute_service.H (renamed from src/tools/scripts/src/fapi2PlatAttributeService.H)7
-rw-r--r--src/hwpf/src/plat/plat_utils.C98
-rw-r--r--src/hwpf/src/plat_ring_traverse.C44
-rwxr-xr-xsrc/tools/scripts/ppeCreateAttrGetSetMacros.pl4
-rwxr-xr-xsrc/tools/scripts/ppeCreateIfAttrService.pl241
-rw-r--r--src/tools/scripts/ppeParseAttrGetSetMacros.pl13
-rwxr-xr-xsrc/tools/scripts/ppeParseAttributeInfo.pl14
-rwxr-xr-xsrc/tools/scripts/ppeSetFixed.pl17
13 files changed, 52 insertions, 409 deletions
diff --git a/src/build/Makefile b/src/build/Makefile
index d2f7d66f..ba0f8fd0 100644
--- a/src/build/Makefile
+++ b/src/build/Makefile
@@ -237,7 +237,7 @@ $(OBJDIR):
mkdir -p $(OBJDIR)/genfiles
$(TOOLS_ATTR_DIR)/ppeParseProcSbeFixed.pl $(GENFILES_DIR) $(IMPORT_XML_DIR)/attribute_info/p9_sbe_attributes.xml $(ATTRFILES)
$(TOOLS_ATTR_DIR)/ppeParseAttributeInfo.pl $(GENFILES_DIR) $(IMPORT_XML_DIR)/attribute_info/p9_sbe_attributes.xml $(ATTRFILES)
- $(TOOLS_ATTR_DIR)/ppeCreateAttrGetSetMacros.pl --path $(TOOLS_ATTR_DIR)/src --inc $(GENFILES_DIR) --src $(GENFILES_DIR)
+ $(TOOLS_ATTR_DIR)/ppeCreateAttrGetSetMacros.pl --path $(PLAT_FAPI2_DIR)/src/plat --inc $(GENFILES_DIR) --src $(GENFILES_DIR)
topfixedheaders:
$(TOOLS_ATTR_DIR)/ppeParseProcSbeFixed.pl . $(IMPORT_XML_DIR)/attribute_info/p9_sbe_attributes.xml $(ATTRFILES)
@@ -246,7 +246,7 @@ attrids:
$(TOOLS_ATTR_DIR)/ppeParseAttributeInfo.pl $(PLAT_FAPI2_DIR)/include $(IMPORT_XML_DIR)/attribute_info/p9_sbe_attributes.xml $(ATTRFILES)
platattr:
- $(TOOLS_ATTR_DIR)/ppeCreateAttrGetSetMacros.pl --path $(TOOLS_ATTR_DIR)/src --inc $(GENFILES_DIR) --src $(GENFILES_DIR)
+ $(TOOLS_ATTR_DIR)/ppeCreateAttrGetSetMacros.pl --path $(PLAT_FAPI2_DIR)/src/plat --inc $(GENFILES_DIR) --src $(GENFILES_DIR)
# Build the subdirectories
$(SUBDIRS):
diff --git a/src/build/utils/proc_sbe_fixed.H b/src/build/utils/proc_sbe_fixed.H
index 68cda59a..8bd4e13c 100644
--- a/src/build/utils/proc_sbe_fixed.H
+++ b/src/build/utils/proc_sbe_fixed.H
@@ -72,7 +72,7 @@
#include "p9_sbe.H"
#include "plat_target_parms.H"
-#include "fapi2AttributeIds.H"
+#include "attribute_ids.H"
#ifdef __ASSEMBLER__
.macro .proc_sbe_fixed_system
diff --git a/src/hwpf/include/fapi2AttributeService.H b/src/hwpf/include/fapi2_attribute_service.H
index 6b0300c7..b1c7a668 100644
--- a/src/hwpf/include/fapi2AttributeService.H
+++ b/src/hwpf/include/fapi2_attribute_service.H
@@ -1,12 +1,11 @@
/* IBM_PROLOG_BEGIN_TAG */
/* This is an automatically generated prolog. */
/* */
-/* $Source: src/hwpf/include/fapi2AttributeService.H $ */
+/* $Source: src/hwpf/include/fapi2_attribute_service.H $ */
/* */
/* OpenPOWER sbe Project */
/* */
/* Contributors Listed Below - COPYRIGHT 2016 */
-/* [+] International Business Machines Corp. */
/* */
/* */
/* Licensed under the Apache License, Version 2.0 (the "License"); */
@@ -33,12 +32,10 @@
#ifndef FAPI2ATTRIBUTESERVICE_H_
#define FAPI2ATTRIBUTESERVICE_H_
#include <stdint.h>
-//#include <attribute_ids.H>
-#include <fapi2AttributeIds.H>
+#include <attribute_ids.H>
#include <target.H>
#include <target_types.H>
-//#include <plat_attribute_service.H>
-#include <fapi2PlatAttributeService.H>
+#include <plat_attribute_service.H>
/// @brief Macros called by user to get/set attributes for FAPI2 targets
///
diff --git a/src/hwpf/include/hw_access.H b/src/hwpf/include/plat/hw_access.H
index 0501970c..24f826a3 100644
--- a/src/hwpf/include/hw_access.H
+++ b/src/hwpf/include/plat/hw_access.H
@@ -1,12 +1,11 @@
/* IBM_PROLOG_BEGIN_TAG */
/* This is an automatically generated prolog. */
/* */
-/* $Source: src/hwpf/include/hw_access.H $ */
+/* $Source: src/hwpf/include/plat/hw_access.H $ */
/* */
/* OpenPOWER sbe Project */
/* */
/* Contributors Listed Below - COPYRIGHT 2012,2016 */
-/* [+] International Business Machines Corp. */
/* */
/* */
/* Licensed under the Apache License, Version 2.0 (the "License"); */
diff --git a/src/hwpf/include/plat/plat_attributes.H b/src/hwpf/include/plat/plat_attributes.H
index e89062d3..781cbd56 100644
--- a/src/hwpf/include/plat/plat_attributes.H
+++ b/src/hwpf/include/plat/plat_attributes.H
@@ -30,8 +30,7 @@
#ifndef __PLAT_ATTTRIBUTE_H__
#define __PLAT_ATTTRIBUTE_H__
-#include <fapi2AttributeService.H>
-#include <fapi2AttributeIds.H> // Generated file
-//#include <plat_target_pg_attributes.H>
+#include <fapi2_attribute_service.H>
+#include <attribute_ids.H> // Generated file
#endif // __PLAT_ATTTRIBUTE_H__
diff --git a/src/tools/scripts/src/fapi2PlatAttributeService.H b/src/hwpf/src/plat/plat_attribute_service.H
index 69976a3e..9e2a26a2 100644
--- a/src/tools/scripts/src/fapi2PlatAttributeService.H
+++ b/src/hwpf/src/plat/plat_attribute_service.H
@@ -1,12 +1,11 @@
/* IBM_PROLOG_BEGIN_TAG */
/* This is an automatically generated prolog. */
/* */
-/* $Source: src/tools/scripts/src/fapi2PlatAttributeService.H $ */
+/* $Source: src/hwpf/src/plat/plat_attribute_service.H $ */
/* */
/* OpenPOWER sbe Project */
/* */
/* Contributors Listed Below - COPYRIGHT 2015,2016 */
-/* [+] International Business Machines Corp. */
/* */
/* */
/* Licensed under the Apache License, Version 2.0 (the "License"); */
@@ -37,8 +36,8 @@
#include <stdint.h>
#include <stddef.h>
#include <type_traits>
-#include <fapi2AttributeIds.H>
-#include <fapi2ChipEcFeature.H>
+#include <attribute_ids.H>
+#include <fapi2_chip_ec_feature.H>
#include <plat_includes.H>
#include "proc_sbe_fixed.H"
#include "plat_target_parms.H"
diff --git a/src/hwpf/src/plat/plat_utils.C b/src/hwpf/src/plat/plat_utils.C
index 93a0cb2f..f9bbea9a 100644
--- a/src/hwpf/src/plat/plat_utils.C
+++ b/src/hwpf/src/plat/plat_utils.C
@@ -29,109 +29,15 @@
*/
#include <stdint.h>
-#include <fapi2AttributeService.H>
-#include <fapi2AttributeIds.H>
+#include <fapi2_attribute_service.H>
+#include <attribute_ids.H>
#include <return_code.H>
#include <plat_trace.H>
#include <target.H>
-#ifndef __PPE__
-#include <error_info.H>
-#endif
-
namespace fapi2
{
-#ifndef __PPE__
- ///
- /// @brief Log an error.
- ///
- void logError(
- fapi2::ReturnCode & io_rc,
- fapi2::errlSeverity_t i_sev = fapi2::FAPI2_ERRL_SEV_UNRECOVERABLE,
- bool i_unitTestError = false )
- {
- // To keep the compiler from complaing about i_sevbeing unused.
- static_cast<void>(i_sev);
- static_cast<void>(i_unitTestError);
-
- FAPI_DBG("logging 0x%lx.", uint64_t(io_rc));
-
- // Iterate over the vectors and output what is in them.
- const ErrorInfo* ei = io_rc.getErrorInfo();
-
- FAPI_DBG("ffdcs: %lu", ei->iv_ffdcs.size());
- for( auto i = ei->iv_ffdcs.begin(); i != ei->iv_ffdcs.end(); ++i )
- {
- uint32_t sz;
- (*i)->getData(sz);
- FAPI_DBG("\tid: 0x%x size %d", (*i)->getFfdcId(), sz);
- }
-
- FAPI_DBG("hwCallouts: %lu", ei->iv_hwCallouts.size());
- for( auto i = ei->iv_hwCallouts.begin(); i != ei->iv_hwCallouts.end();
- ++i )
- {
- FAPI_DBG("\thw: %d pri %d target: 0x%lx",
- (*i)->iv_hw, (*i)->iv_calloutPriority,
- (*i)->iv_refTarget.get());
- }
-
- FAPI_DBG("procedureCallouts: %lu", ei->iv_procedureCallouts.size());
- for( auto i = ei->iv_procedureCallouts.begin();
- i != ei->iv_procedureCallouts.end(); ++i )
- {
- FAPI_DBG("\tprocedure: %d pri %d",
- (*i)->iv_procedure, (*i)->iv_calloutPriority);
- }
-
-e FAPI_DBG("busCallouts: %lu", ei->iv_busCallouts.size());
- for( auto i = ei->iv_busCallouts.begin(); i != ei->iv_busCallouts.end();
- ++i )
- {
- FAPI_DBG("\tbus: t1: 0x%lx t2: 0x%lx pri: %d",
- (*i)->iv_target1.get(), (*i)->iv_target2.get(),
- (*i)->iv_calloutPriority);
- }
-
-
- FAPI_DBG("cdgs: %lu", ei->iv_CDGs.size());
- for( auto i = ei->iv_CDGs.begin(); i != ei->iv_CDGs.end(); ++i )
- {
- FAPI_DBG("\ttarget: 0x%lx co: %d dc: %d gard: %d pri: %d",
- (*i)->iv_target.get(),
- (*i)->iv_callout,
- (*i)->iv_deconfigure,
- (*i)->iv_gard,
- (*i)->iv_calloutPriority);
-
- }
-
- FAPI_DBG("childrenCDGs: %lu", ei->iv_childrenCDGs.size());
- for( auto i = ei->iv_childrenCDGs.begin();
- i != ei->iv_childrenCDGs.end(); ++i )
- {
- FAPI_DBG("\tchildren: parent 0x%lx co: %d dc: %d gard: %d pri: %d",
- (*i)->iv_parent.get(),
- (*i)->iv_callout,
- (*i)->iv_deconfigure,
- (*i)->iv_gard,
- (*i)->iv_calloutPriority);
- }
-
- FAPI_DBG("traces: %lu", ei->iv_traces.size());
- for( auto i = ei->iv_traces.begin(); i != ei->iv_traces.end(); ++i )
- {
- FAPI_DBG("\ttraces: 0x%x", (*i)->iv_eiTraceId);
- }
-
- // Release the ffdc information now that we're done with it.
- io_rc.forgetData();
-
- }
-#endif
-
- ///
/// @brief Delay this thread.
///
ReturnCode delay(uint64_t i_nanoSeconds, uint64_t i_simCycles, bool i_fixed /* = false*/)
diff --git a/src/hwpf/src/plat_ring_traverse.C b/src/hwpf/src/plat_ring_traverse.C
index 42dab1b2..86c6515d 100644
--- a/src/hwpf/src/plat_ring_traverse.C
+++ b/src/hwpf/src/plat_ring_traverse.C
@@ -27,7 +27,7 @@
#include <p9_putRingUtils.H> // for RS4 decompression utilities
#include <sbeXipUtils.H>
-#include <fapi2AttributeService.H> // for FAPI_ATTR_GET
+#include <fapi2_attribute_service.H> // for FAPI_ATTR_GET
#include <plat_target_utils.H> // for plat_getChipTarget
// SEEPROM start address
@@ -64,7 +64,7 @@ fapi2::ReturnCode findRS4InImageAndApply(
// Get the address of the Section-TOR
P9XipHeader *l_hdr = getXipHdr();
- P9XipSection *l_section =
+ P9XipSection *l_section =
&(l_hdr->iv_section[P9_XIP_SECTION_SBE_RINGS]);
if (!(l_section->iv_offset))
@@ -73,7 +73,7 @@ fapi2::ReturnCode findRS4InImageAndApply(
break;
}
- SectionTOR *l_sectionTOR = (SectionTOR *)(g_seepromAddr +
+ SectionTOR *l_sectionTOR = (SectionTOR *)(g_seepromAddr +
l_section->iv_offset);
l_rc = getRS4ImageFromTor(i_target,i_ringID,l_sectionTOR,
@@ -89,7 +89,7 @@ fapi2::ReturnCode findRS4InImageAndApply(
//Apply scanring from .ring section
l_applyOverride = true;
l_section = NULL;
- l_section =
+ l_section =
&(l_hdr->iv_section[P9_XIP_SECTION_SBE_OVERRIDES]);
if (!(l_section->iv_offset))
@@ -99,7 +99,7 @@ fapi2::ReturnCode findRS4InImageAndApply(
}
l_sectionTOR = NULL;
- l_sectionTOR = (SectionTOR *)(g_seepromAddr +
+ l_sectionTOR = (SectionTOR *)(g_seepromAddr +
l_section->iv_offset);
@@ -149,10 +149,10 @@ fapi2::ReturnCode getRS4ImageFromTor(
{
case PERV_TYPE: // PERV
l_chipletData = PERV::g_pervData;
- l_cpltRingVariantSz = i_applyOverride ? OVERRIDE_VARIANT_SIZE :
- (sizeof(PERV::RingVariants) /
+ l_cpltRingVariantSz = i_applyOverride ? OVERRIDE_VARIANT_SIZE :
+ (sizeof(PERV::RingVariants) /
sizeof(l_cpltRingVariantSz));
-
+
l_sectionOffset = i_sectionTOR->TOC_PERV_COMMON_RING;
if(INSTANCE_RING == l_ringType)
{
@@ -164,7 +164,7 @@ fapi2::ReturnCode getRS4ImageFromTor(
case N0_TYPE: // Nest - N0
l_chipletData = N0::g_n0Data;
l_cpltRingVariantSz = i_applyOverride ? OVERRIDE_VARIANT_SIZE :
- (sizeof(N0::RingVariants) /
+ (sizeof(N0::RingVariants) /
sizeof(l_cpltRingVariantSz));
l_sectionOffset = i_sectionTOR->TOC_N0_COMMON_RING;
@@ -206,7 +206,7 @@ fapi2::ReturnCode getRS4ImageFromTor(
case N3_TYPE: // Nest - N3
l_chipletData = N3::g_n3Data;
l_cpltRingVariantSz = i_applyOverride ? OVERRIDE_VARIANT_SIZE :
- (sizeof(N3::RingVariants) /
+ (sizeof(N3::RingVariants) /
sizeof(l_cpltRingVariantSz));
l_sectionOffset = i_sectionTOR->TOC_N3_COMMON_RING;
@@ -234,7 +234,7 @@ fapi2::ReturnCode getRS4ImageFromTor(
case MC_TYPE: // MC - MC23
l_chipletData = MC::g_mcData;
l_cpltRingVariantSz = i_applyOverride ? OVERRIDE_VARIANT_SIZE :
- (sizeof(MC::RingVariants)/
+ (sizeof(MC::RingVariants)/
sizeof(l_cpltRingVariantSz));
l_sectionOffset = i_sectionTOR->TOC_MC_COMMON_RING;
@@ -248,7 +248,7 @@ fapi2::ReturnCode getRS4ImageFromTor(
case OB0_TYPE: // OB0
l_chipletData = OB0::g_ob0Data;
l_cpltRingVariantSz = i_applyOverride ? OVERRIDE_VARIANT_SIZE :
- (sizeof(OB0::RingVariants) /
+ (sizeof(OB0::RingVariants) /
sizeof(l_cpltRingVariantSz));
l_sectionOffset = i_sectionTOR->TOC_OB0_COMMON_RING;
@@ -261,7 +261,7 @@ fapi2::ReturnCode getRS4ImageFromTor(
case OB1_TYPE: // OB1
l_chipletData = OB1::g_ob1Data;
l_cpltRingVariantSz = i_applyOverride ? OVERRIDE_VARIANT_SIZE :
- (sizeof(OB1::RingVariants) /
+ (sizeof(OB1::RingVariants) /
sizeof(l_cpltRingVariantSz));
l_sectionOffset = i_sectionTOR->TOC_OB1_COMMON_RING;
@@ -274,7 +274,7 @@ fapi2::ReturnCode getRS4ImageFromTor(
case OB2_TYPE: // OB2
l_chipletData = OB2::g_ob2Data;
l_cpltRingVariantSz = i_applyOverride ? OVERRIDE_VARIANT_SIZE :
- (sizeof(OB2::RingVariants) /
+ (sizeof(OB2::RingVariants) /
sizeof(l_cpltRingVariantSz));
l_sectionOffset = i_sectionTOR->TOC_OB2_COMMON_RING;
@@ -287,7 +287,7 @@ fapi2::ReturnCode getRS4ImageFromTor(
case OB3_TYPE: // OB3
l_chipletData = OB3::g_ob3Data;
l_cpltRingVariantSz = i_applyOverride ? OVERRIDE_VARIANT_SIZE :
- (sizeof(OB3::RingVariants) /
+ (sizeof(OB3::RingVariants) /
sizeof(l_cpltRingVariantSz));
l_sectionOffset = i_sectionTOR->TOC_OB3_COMMON_RING;
@@ -316,7 +316,7 @@ fapi2::ReturnCode getRS4ImageFromTor(
case PCI1_TYPE: // PCI - PCI1
l_chipletData = PCI1::g_pci1Data;
l_cpltRingVariantSz = i_applyOverride ? OVERRIDE_VARIANT_SIZE :
- (sizeof(PCI1::RingVariants) /
+ (sizeof(PCI1::RingVariants) /
sizeof(l_cpltRingVariantSz));
l_sectionOffset = i_sectionTOR->TOC_PCI1_COMMON_RING;
@@ -330,7 +330,7 @@ fapi2::ReturnCode getRS4ImageFromTor(
case PCI2_TYPE: // PCI - PCI2
l_chipletData = PCI2::g_pci2Data;
l_cpltRingVariantSz = i_applyOverride ? OVERRIDE_VARIANT_SIZE :
- (sizeof(PCI2::RingVariants) /
+ (sizeof(PCI2::RingVariants) /
sizeof(l_cpltRingVariantSz));
l_sectionOffset = i_sectionTOR->TOC_PCI2_COMMON_RING;
@@ -344,7 +344,7 @@ fapi2::ReturnCode getRS4ImageFromTor(
case EQ_TYPE: // EQ - Quad 0 - Quad 5
l_chipletData = EQ::g_eqData;
l_cpltRingVariantSz = i_applyOverride ? OVERRIDE_VARIANT_SIZE :
- ( sizeof(EQ::RingVariants) /
+ ( sizeof(EQ::RingVariants) /
sizeof(l_cpltRingVariantSz));
l_sectionOffset = i_sectionTOR->TOC_EQ_COMMON_RING;
@@ -383,7 +383,7 @@ fapi2::ReturnCode getRS4ImageFromTor(
FAPI_INF("l_sectionOffset %08x",l_sectionOffset);
// Determine the section TOR address for the ring
- uint32_t *l_sectionAddr = reinterpret_cast<uint32_t *>(g_seepromAddr +
+ uint32_t *l_sectionAddr = reinterpret_cast<uint32_t *>(g_seepromAddr +
i_sectionOffset + l_sectionOffset);
SBE_TRACE ("l_sectionAddr %08X",l_sectionAddr);
@@ -395,7 +395,7 @@ fapi2::ReturnCode getRS4ImageFromTor(
{
uint8_t l_chipletOffset =
(l_chipletID - l_chipletData.iv_base_chiplet_number);
- l_sectionAddr += (l_chipletOffset *
+ l_sectionAddr += (l_chipletOffset *
(l_chipletData.iv_num_instance_rings ));
}
}
@@ -408,8 +408,8 @@ fapi2::ReturnCode getRS4ImageFromTor(
SBE_TRACE ("l_sectionAddr %08X",l_sectionAddr);
// TOR records of Ring TOR are 2 bytes in size.
- uint16_t *l_ringTorAddr = reinterpret_cast<uint16_t *>(l_sectionAddr) +
- (l_torOffset * l_cpltRingVariantSz);
+ uint16_t *l_ringTorAddr = reinterpret_cast<uint16_t *>(l_sectionAddr) +
+ (l_torOffset * l_cpltRingVariantSz);
SBE_TRACE ("ring tor address %04X\n",l_ringTorAddr);
// If there are non-base variants of the ring, we'll have to check
diff --git a/src/tools/scripts/ppeCreateAttrGetSetMacros.pl b/src/tools/scripts/ppeCreateAttrGetSetMacros.pl
index 487d84d0..990a394a 100755
--- a/src/tools/scripts/ppeCreateAttrGetSetMacros.pl
+++ b/src/tools/scripts/ppeCreateAttrGetSetMacros.pl
@@ -55,8 +55,8 @@ my %targetMacros;
-my $fapiAttributeIdsFile = "fapi2AttributeIds.H";
-my $fapiPlatAttributeServiceFile= "fapi2PlatAttributeService.H";
+my $fapiAttributeIdsFile = "attribute_ids.H";
+my $fapiPlatAttributeServiceFile= "plat_attribute_service.H";
my $includePath = "./";
diff --git a/src/tools/scripts/ppeCreateIfAttrService.pl b/src/tools/scripts/ppeCreateIfAttrService.pl
deleted file mode 100755
index e27a05d1..00000000
--- a/src/tools/scripts/ppeCreateIfAttrService.pl
+++ /dev/null
@@ -1,241 +0,0 @@
-#!/usr/bin/perl
-# IBM_PROLOG_BEGIN_TAG
-# This is an automatically generated prolog.
-#
-# $Source: src/tools/scripts/ppeCreateIfAttrService.pl $
-#
-# OpenPOWER sbe Project
-#
-# Contributors Listed Below - COPYRIGHT 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
-# Purpose: This perl script will parse HWP Attribute XML files and
-# initfile attr files and create the fapiGetInitFileAttr() function
-# in a file called fapi2AttributeService.C
-
-use strict;
-
-#------------------------------------------------------------------------------
-# Print Command Line Help
-#------------------------------------------------------------------------------
-my $numArgs = $#ARGV + 1;
-if ($numArgs < 3)
-{
- print ("Usage: fapi2CreateIfAttrService.pl <output dir>\n");
- print (" [<if-attr-file1> <if-attr-file2> ...]\n");
- print (" -a <attr-xml-file1> [<attr-xml-file2> ...]\n");
- print (" This perl script will parse if-attr files (containing the\n");
- print (" attributes used by the initfile) and attribute XML files\n");
- print (" (containing all HWPF attributes) and create the\n");
- print (" fapiGetInitFileAttr() function in a file called\n");
- print (" fapiAttributeService.C. Only the attributes specified in\n");
- print (" the if-attr files are supported. If no if-attr files are\n");
- print (" specified then all attributes are supported\n");
- exit(1);
-}
-
-#------------------------------------------------------------------------------
-# Specify perl modules to use
-#------------------------------------------------------------------------------
-use XML::Simple;
-my $xml = new XML::Simple (KeyAttr=>[]);
-
-# Uncomment to enable debug output
-#use Data::Dumper;
-
-#------------------------------------------------------------------------------
-# Open output file for writing
-#------------------------------------------------------------------------------
-my $asFile = $ARGV[0];
-$asFile .= "/";
-$asFile .= "fapi2AttributeService.C";
-open(ASFILE, ">", $asFile);
-
-#------------------------------------------------------------------------------
-# Print Start of file information to fapiAttributeService.C
-#------------------------------------------------------------------------------
-print ASFILE "// fapi2AttributeService.C\n";
-print ASFILE "// This file is generated by perl script fapi2CreateIfAttrService.pl\n\n";
-print ASFILE "#include <fapi2AttributeService.H>\n";
-print ASFILE "//#include <fapi2ChipEcFeature.H>\n";
-print ASFILE "//#include <fapi2PlatTrace.H>\n\n";
-print ASFILE "namespace fapi2\n";
-print ASFILE "{\n\n";
-print ASFILE "ReturnCode fapiGetInitFileAttr(const AttributeId i_id,\n";
-print ASFILE " const Target * i_pTarget,\n";
-print ASFILE " uint64_t & o_val,\n";
-print ASFILE " const uint32_t i_arrayIndex1,\n";
-print ASFILE " const uint32_t i_arrayIndex2,\n";
-print ASFILE " const uint32_t i_arrayIndex3,\n";
-print ASFILE " const uint32_t i_arrayIndex4)\n";
-print ASFILE "{\n";
-print ASFILE " ReturnCode l_rc;\n\n";
-
-my $xmlFiles = 0;
-my $attCount = 0;
-my $numIfAttrFiles = 0;
-my @attrIds;
-
-#------------------------------------------------------------------------------
-# Element names
-#------------------------------------------------------------------------------
-my $attribute = 'attribute';
-
-#------------------------------------------------------------------------------
-# For each argument
-#------------------------------------------------------------------------------
-my $argfile = $ARGV[1];
-my $entries = $xml->XMLin($argfile, ForceArray => ['entry']);
-foreach my $entr (@{$entries->{entry}}) {
-
- my $inname = $entr->{name};
-
- # read XML file. The ForceArray option ensures that there is an array of
- # elements even if there is only one such element in the file
-
- foreach my $argnum (2 .. $#ARGV)
- {
- my $infile = $ARGV[$argnum];
-
- my $attributes = $xml->XMLin($infile, ForceArray => ['attribute']);
-
- # Uncomment to get debug output of all attributes
- #print "\nFile: ", $infile, "\n", Dumper($attributes), "\n";
-
- #--------------------------------------------------------------------------
- # For each Attribute
- #--------------------------------------------------------------------------
- foreach my $attr (@{$attributes->{attribute}})
- {
-
-
-
- if($attr->{id} eq $inname) {
-
- #------------------------------------------------------------------
- # Check that the AttributeId exists
- #------------------------------------------------------------------
- if (! exists $attr->{id})
- {
- print ("fapiParseAttributeInfo.pl ERROR. Att 'id' missing\n");
- exit(1);
- }
-
-
- #------------------------------------------------------------------
- # Figure out the number of attribute array dimensions
- #------------------------------------------------------------------
- my $numArrayDimensions = 0;
- if ($attr->{array})
- {
- # Remove leading whitespace
- my $dimText = $attr->{array};
- $dimText =~ s/^\s+//;
-
- # Split on commas or whitespace
- my @vals = split(/\s*,\s*|\s+/, $dimText);
-
- $numArrayDimensions=@vals;
- }
-
- #------------------------------------------------------------------
- # Print the attribute get code to fapiAttributeService.C
- #------------------------------------------------------------------
- if ($attCount > 0)
- {
- print ASFILE " else ";
- }
- else
- {
- print ASFILE " ";
- }
- $attCount++;
-
- print ASFILE "if (i_id == $attr->{id})\n";
- print ASFILE " {\n";
- print ASFILE " $attr->{id}_Type l_attr;\n";
-
- if (exists $attr->{privileged})
- {
- print ASFILE " l_rc = FAPI_ATTR_GET_PRIVILEGED($attr->{id}, i_pTarget, l_attr);\n";
- }
- else
- {
- print ASFILE " l_rc = FAPI_ATTR_GET($attr->{id}, i_pTarget, l_attr);\n";
- }
- print ASFILE " o_val = l_attr";
-
- if ($numArrayDimensions >= 5)
- {
- print ("fapiParseAttributeInfo.pl ERROR. More than 4 array dimensions!!\n");
- exit(1);
- }
- else
- {
- for (my $i = 0; $i < $numArrayDimensions; $i++)
- {
- print ASFILE "[i_arrayIndex";
- print ASFILE $i+1;
- print ASFILE "]";
- }
- }
-
- print ASFILE ";\n";
- print ASFILE " }\n";
-
-
-
- }
- }
- }
-
-}
-
-#------------------------------------------------------------------------------
-# Print End of file information to fapiAttributeService.C
-#--------------------------------------------------------------------------
-if ($attCount > 0)
-{
- print ASFILE " else\n";
-}
-print ASFILE " {\n";
-print ASFILE " FAPI_ERR(\"fapiGetInitFileAttr: Unrecognized attr ID: 0x%x\", i_id);\n";
-print ASFILE " l_rc.setFapiError(FAPI_RC_INVALID_ATTR_GET);\n";
-print ASFILE " l_rc.addEIFfdc(0, &i_id, sizeof(i_id));\n";
-print ASFILE " }\n\n";
-print ASFILE " if (l_rc)\n";
-print ASFILE " {\n";
-print ASFILE " if (i_pTarget)\n";
-print ASFILE " {\n";
-print ASFILE " FAPI_ERR(\"fapiGetInitFileAttr: Error getting attr ID 0x%x from targType 0x%x\",\n";
-print ASFILE " i_id, i_pTarget->getType());\n";
-print ASFILE " }\n";
-print ASFILE " else\n";
-print ASFILE " {\n";
-print ASFILE " FAPI_ERR(\"fapiGetInitFileAttr: Error getting attr ID 0x%x from system target\",\n";
-print ASFILE " i_id);\n";
-print ASFILE " }\n";
-print ASFILE " }\n\n";
-print ASFILE " return l_rc;\n";
-print ASFILE "}\n\n";
-print ASFILE "}\n";
-
-
-#------------------------------------------------------------------------------
-# Close output file
-#------------------------------------------------------------------------------
-close(ASFILE);
diff --git a/src/tools/scripts/ppeParseAttrGetSetMacros.pl b/src/tools/scripts/ppeParseAttrGetSetMacros.pl
index 3c8095ec..016d6db4 100644
--- a/src/tools/scripts/ppeParseAttrGetSetMacros.pl
+++ b/src/tools/scripts/ppeParseAttrGetSetMacros.pl
@@ -85,19 +85,6 @@ $pervFile .= "/";
$pervFile .= "proc_sbe_fixed_perv.H";
open(PEFILE, ">", $pervFile);
-
-#------------------------------------------------------------------------------
-# Print Start of file information to fapiAttributeService.C
-#------------------------------------------------------------------------------
-#print ASFILE "// proc_sbe_func.H\n";
-#print ASFILE "// This file is generated by perl script fapi2ParseProcSbeFixed.pl\n\n";
-#print ASFILE "#ifndef __PROC_SBE_FIXED_H__\n";
-#print ASFILE "#define __PROC_SBE_FIXED_H__\n";
-#print ASFILE "#include \"p9_sbe.H\"\n";
-#print ASFILE "#include \"plat_target_parms.H\"\n";
-#print ASFILE "#include \"fapi2AttributeIds.H\"\n\n";
-
-
my $xmlFiles = 0;
my $attCount = 0;
my $numIfAttrFiles = 0;
diff --git a/src/tools/scripts/ppeParseAttributeInfo.pl b/src/tools/scripts/ppeParseAttributeInfo.pl
index 95873c29..a2568937 100755
--- a/src/tools/scripts/ppeParseAttributeInfo.pl
+++ b/src/tools/scripts/ppeParseAttributeInfo.pl
@@ -24,14 +24,14 @@
#
# IBM_PROLOG_END_TAG
# Purpose: This perl script will parse HWP Attribute XML files
-# and add attribute information to a file called fapi2AttributeIds.H
+# and add attribute information to a file called attribute_ids.H
use strict;
sub help {
print ("Usage: ppeParseAttributeInfo.pl <output dir> <attr-xml-file1> [<attr-xml-file2> ...]\n");
print (" This perl script will parse attribute XML files and create the following files:\n");
- print (" - fapi2AttributeIds.H. Contains IDs, type, value enums and other information\n");
+ print (" - attribute_ids.H. Contains IDs, type, value enums and other information\n");
print (" - fapi2ChipEcFeature.C. Contains a function to query chip EC features\n");
print (" - fapi2AttributePlatCheck.H. Contains compile time checks that all attributes are\n");
print (" handled by the platform\n");
@@ -94,12 +94,12 @@ $XML::Simple::PREFERRED_PARSER = 'XML::Parser';
#------------------------------------------------------------------------------
my $aiFile = $ARGV[0];
$aiFile .= "/";
-$aiFile .= "fapi2AttributeIds.H";
+$aiFile .= "attribute_ids.H";
open(AIFILE, ">", $aiFile);
my $echFile = $ARGV[0];
$echFile .= "/";
-$echFile .= "fapi2ChipEcFeature.H";
+$echFile .= "fapi2_chip_ec_feature.H";
open(ECHFILE, ">", $echFile);
my $acFile = $ARGV[0];
@@ -125,7 +125,7 @@ open(ETFILE, ">", $etFile);
#------------------------------------------------------------------------------
# Print Start of file information to fapiAttributeIds.H
#------------------------------------------------------------------------------
-print AIFILE "// fapi2AttributeIds.H\n";
+print AIFILE "// attribute_ids.H\n";
print AIFILE "// This file is generated by perl script fapiParseAttributeInfo.pl\n\n";
print AIFILE "#ifndef FAPI2ATTRIBUTEIDS_H_\n";
print AIFILE "#define FAPI2ATTRIBUTEIDS_H_\n\n";
@@ -146,8 +146,8 @@ print ECHFILE "// This file is generated by perl script parseAttributeInfo.pl\n"
print ECHFILE "// It implements the fapi2_chip_ec_feature function\n\n";
print ECHFILE "#ifndef __FAPI2_CHIP_EC_FEATURE_H_\n";
print ECHFILE "#define __FAPI2_CHIP_EC_FEATURE_H_\n";
-print ECHFILE "#include <fapi2AttributeService.H>\n";
-print ECHFILE "#include <fapi2AttributeIds.H>\n";
+print ECHFILE "#include <fapi2_attribute_service.H>\n";
+print ECHFILE "#include <attribute_ids.H>\n";
print ECHFILE "namespace fapi2\n";
print ECHFILE "{\n\n";
print ECHFILE "// create a unique type from an int ( or attribute id) \n";
diff --git a/src/tools/scripts/ppeSetFixed.pl b/src/tools/scripts/ppeSetFixed.pl
index 52880258..a562469d 100755
--- a/src/tools/scripts/ppeSetFixed.pl
+++ b/src/tools/scripts/ppeSetFixed.pl
@@ -28,9 +28,6 @@
use strict;
-my $attrpath = "../../importtemp/xml";
-my $sbedefaultpath = "../../../images";
-
#------------------------------------------------------------------------------
# Print Command Line Help
#------------------------------------------------------------------------------
@@ -45,13 +42,13 @@ if ($numArgs < 3)
print ("./ppeSetFixed.pl \\\n" );
print (". \\\n" );
print (" ../../obj/seeprom_main.bin \\\n" );
- print ("$attrpath/p9_ppe_attributes.xml \\\n" );
- print ("$attrpath/attribute_info/perv_attributes.xml \\\n" );
- print ("$attrpath/attribute_info/proc_attributes.xml \\\n" );
- print ("$attrpath/attribute_info/ex_attributes.xml \\\n" );
- print ("$attrpath/attribute_info/eq_attributes.xml \\\n" );
- print ("$attrpath/attribute_info/core_attributes.xml \\ \n");
- print ("$attrpath/attribute_info/nest_attributes.xml \n");
+ print ("p9_ppe_attributes.xml \\\n" );
+ print ("perv_attributes.xml \\\n" );
+ print ("proc_attributes.xml \\\n" );
+ print ("ex_attributes.xml \\\n" );
+ print ("eq_attributes.xml \\\n" );
+ print ("core_attributes.xml \\ \n");
+ print ("nest_attributes.xml \n");
exit(1);
}
OpenPOWER on IntegriCloud