Skip to content

Commit

Permalink
Fix for signed attribute overrides
Browse files Browse the repository at this point in the history
Change-Id: I8a0dcc86b46ea0fbba03723ebb214419710dda3f
CQ:SW394908
Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/43059
Tested-by: Jenkins Server <pfd-jenkins+hostboot@us.ibm.com>
Tested-by: Jenkins OP Build CI <op-jenkins+hostboot@us.ibm.com>
Tested-by: FSP CI Jenkins <fsp-CI-jenkins+hostboot@us.ibm.com>
Tested-by: Jenkins OP HW <op-hw-jenkins+hostboot@us.ibm.com>
Reviewed-by: Dzuy Nguyen <dzuy@us.ibm.com>
Reviewed-by: Christian R. Geddes <crgeddes@us.ibm.com>
  • Loading branch information
cvswen authored and crgeddes committed Jul 14, 2017
1 parent 3fbd50a commit fddf433
Showing 1 changed file with 32 additions and 6 deletions.
38 changes: 32 additions & 6 deletions src/usr/targeting/common/xmltohb/xmltohb.pl
Expand Up @@ -1708,10 +1708,14 @@ sub writeTargAttrMap {

# Only (initially) support attributes with simple integer types
if ((exists $attribute->{simpleType}) &&
((exists $attribute->{simpleType}->{uint8_t}) ||
((exists $attribute->{simpleType}->{uint8_t}) ||
(exists $attribute->{simpleType}->{uint16_t}) ||
(exists $attribute->{simpleType}->{uint32_t}) ||
(exists $attribute->{simpleType}->{uint64_t})))
(exists $attribute->{simpleType}->{uint64_t}) ||
(exists $attribute->{simpleType}->{int8_t}) ||
(exists $attribute->{simpleType}->{int16_t}) ||
(exists $attribute->{simpleType}->{int32_t}) ||
(exists $attribute->{simpleType}->{int64_t})))
{


Expand All @@ -1727,7 +1731,9 @@ sub writeTargAttrMap {
print $outFile "\t\t$enum->{value},\n";
# iv_attrElemSizeBytes
my @sizes = ( "uint8_t", "uint16_t",
"uint32_t", "uint64_t" );
"uint32_t", "uint64_t",
"int8_t", "int16_t",
"int32_t", "int64_t");

foreach my $size (@sizes)
{
Expand Down Expand Up @@ -2599,7 +2605,7 @@ sub writeAttrInfoCsvFile {
my($attributes,$outFile) = @_;

# Print the file header
print $outFile "# targAttrInfo.cvs\n";
print $outFile "# targAttrInfo.csv\n";
print $outFile "# This file is generated by perl script xmltohb.pl\n";
print $outFile "# It lists information about TARG attributes and is used to\n";
print $outFile "# process FAPI Attribute text files (overrides/syncs)\n";
Expand All @@ -2613,10 +2619,14 @@ sub writeAttrInfoCsvFile {
{
# Only (initially) support attributes with simple integer types
if ((exists $attribute->{simpleType}) &&
((exists $attribute->{simpleType}->{uint8_t}) ||
((exists $attribute->{simpleType}->{uint8_t}) ||
(exists $attribute->{simpleType}->{uint16_t}) ||
(exists $attribute->{simpleType}->{uint32_t}) ||
(exists $attribute->{simpleType}->{uint64_t})))
(exists $attribute->{simpleType}->{uint64_t}) ||
(exists $attribute->{simpleType}->{int8_t}) ||
(exists $attribute->{simpleType}->{int16_t}) ||
(exists $attribute->{simpleType}->{int32_t}) ||
(exists $attribute->{simpleType}->{int64_t})))
{
my $fapiId = "NO-FAPI-ID";

Expand Down Expand Up @@ -2649,6 +2659,22 @@ sub writeAttrInfoCsvFile {
{
print $outFile "u64";
}
elsif (exists $attribute->{simpleType}->{int8_t})
{
print $outFile "s8";
}
elsif (exists $attribute->{simpleType}->{int16_t})
{
print $outFile "s16";
}
elsif (exists $attribute->{simpleType}->{int32_t})
{
print $outFile "s32";
}
elsif (exists $attribute->{simpleType}->{int64_t})
{
print $outFile "s64";
}

if (exists $attribute->{simpleType}->{array})
{
Expand Down

0 comments on commit fddf433

Please sign in to comment.