diff options
-rw-r--r-- | src/build/Makefile | 5 | ||||
-rw-r--r-- | src/build/Mirror_WA_attributes.xml | 35 | ||||
-rwxr-xr-x | src/tools/scripts/ppeParseAttributeInfo.pl | 52 |
3 files changed, 27 insertions, 65 deletions
diff --git a/src/build/Makefile b/src/build/Makefile index b6bcbea4..3579a00a 100644 --- a/src/build/Makefile +++ b/src/build/Makefile @@ -230,10 +230,7 @@ buildInfo: $(LINK_OBJS) $(OBJS) $(OBJS:.o=.d) ATTRFILES += $(IMPORT_XML_DIR)/attribute_info/pervasive_attributes.xml -# TODO via RTC 142708 -# Workaound for ATTR_CHIP_UNIT_POS. Remove Mirror_WA_attributes.xml once fapi -# support is in. -ATTRFILES += $(BUILD_DIR)/Mirror_WA_attributes.xml +ATTRFILES += $(BASE_FAPI2_DIR)/xml/attribute_info/unit_attributes.xml ATTRFILES += $(IMPORT_XML_DIR)/attribute_info/p9_sbe_load_bootloader_attributes.xml ATTRFILES += $(IMPORT_XML_DIR)/attribute_info/core_attributes.xml ATTRFILES += $(IMPORT_XML_DIR)/attribute_info/nest_attributes.xml diff --git a/src/build/Mirror_WA_attributes.xml b/src/build/Mirror_WA_attributes.xml deleted file mode 100644 index 286c15bc..00000000 --- a/src/build/Mirror_WA_attributes.xml +++ /dev/null @@ -1,35 +0,0 @@ -<!-- IBM_PROLOG_BEGIN_TAG --> -<!-- This is an automatically generated prolog. --> -<!-- --> -<!-- $Source: src/build/Mirror_WA_attributes.xml $ --> -<!-- --> -<!-- 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 --> -<!-- $Id: proc_pll_ring_attributes.xml,v 1.17 2014/11/13 20:14:02 szhong Exp $ --> -<!-- proc_pll_ring_attributes.xml --> -<attributes> - <attribute> - <id>ATTR_CHIP_UNIT_POS</id> - <targetType>TARGET_TYPE_PERV</targetType> - <description></description> - <valueType>uint8</valueType> - </attribute> - <!-- ********************************************************************* --> -</attributes> diff --git a/src/tools/scripts/ppeParseAttributeInfo.pl b/src/tools/scripts/ppeParseAttributeInfo.pl index 97188e8a..c3f213cd 100755 --- a/src/tools/scripts/ppeParseAttributeInfo.pl +++ b/src/tools/scripts/ppeParseAttributeInfo.pl @@ -480,38 +480,38 @@ foreach my $entr (@{$entries->{entry}}) { print AIFILE "const fapi2::TargetType $attr->{id}_TargetType = "; - if($attr->{id} eq 'ATTR_CHIP_UNIT_POS') - { - # Default CHIP_UNIT_POS to all chiplet class targets - print AIFILE "TARGET_TYPE_CHIPLETS"; - } - else - { - # Split on commas - my @targTypes = split(',', $attr->{targetType}); - my $targType = $targTypes[0]; + # Split on commas + my @targTypes = split(',', $attr->{targetType}); + my $targType = $targTypes[0]; + my $targetTypeCount = 0; - foreach my $targType (@targTypes) + foreach my $targType (@targTypes) + { + # Remove newlines and leading/trailing whitespace + $targType =~ s/\n//; + $targType =~ s/^\s+//; + $targType =~ s/\s+$//; + + # Consider only supported target types. The rest are ignored + if($targType ~~ ["TARGET_TYPE_PROC_CHIP", "TARGET_TYPE_SYSTEM", + "TARGET_TYPE_CORE", "TARGET_TYPE_MCS", "TARGET_TYPE_PERV", + "TARGET_TYPE_EQ", "TARGET_TYPE_EX"]) { - # Remove newlines and leading/trailing whitespace - $targType =~ s/\n//; - $targType =~ s/^\s+//; - $targType =~ s/\s+$//; - - # Consider only supported target types. The rest are ignored - if($targType ~~ ["TARGET_TYPE_PROC_CHIP", "TARGET_TYPE_SYSTEM", - "TARGET_TYPE_CORE", "TARGET_TYPE_MCS", "TARGET_TYPE_PERV", - "TARGET_TYPE_EQ", "TARGET_TYPE_EX"]) + if($targetTypeCount != 0) { - print AIFILE "$targType"; - last; - } - else - { - next; + print AIFILE " | "; } + print AIFILE "$targType"; + $targetTypeCount++; } } + + if($targetTypeCount == 0) + { + print ("fapiParseAttributeInfo.pl ERROR. Unsupported target type $attr->{targetType} for $attr->{id} in $infile\n"); + exit(1); + } + print AIFILE ";\n"; #---------------------------------------------------------------------- |