From 84c88858c89dd9dc8eadc74aa1742337e31ad5bc Mon Sep 17 00:00:00 2001 From: Sumit Kumar Date: Thu, 30 May 2019 12:34:23 -0500 Subject: Fapi_Infra:Add new member to structure ErrorInfoCDG Enabling addition of new member - gardType to the structure to pass on the type of gard when target gets garded. Change-Id: I4c14f8bab585bfbee71b43ee4353b9b243bf7469 CQ: SW462950 Reviewed-on: http://rchgit01.rchland.ibm.com/gerrit1/78076 Tested-by: FSP CI Jenkins Tested-by: Jenkins Server Tested-by: Hostboot CI Tested-by: PPE CI Tested-by: HWSV CI Reviewed-by: Manish K. Chowdhary Reviewed-by: Sumit Kumar Reviewed-on: http://rchgit01.rchland.ibm.com/gerrit1/78092 Reviewed-by: RAJA DAS --- src/import/hwpf/fapi2/include/error_info.H | 8 +++++++- src/import/hwpf/fapi2/include/error_info_defs.H | 23 +++++++++++++++++++++++ src/import/hwpf/fapi2/tools/parseErrorInfo.pl | 12 ++++++++++++ 3 files changed, 42 insertions(+), 1 deletion(-) (limited to 'src/import/hwpf') diff --git a/src/import/hwpf/fapi2/include/error_info.H b/src/import/hwpf/fapi2/include/error_info.H index 8ff3d902..33127a38 100644 --- a/src/import/hwpf/fapi2/include/error_info.H +++ b/src/import/hwpf/fapi2/include/error_info.H @@ -311,12 +311,14 @@ struct ErrorInfoCDG /// @param[in] i_deconfigure True if Target should be deconfigured /// @param[in] i_gard True if Target should be GARDed /// @param[in] i_priority The priority of any callout + /// @param[in] i_gardType Type of GARD /// ErrorInfoCDG(const Target& i_target, const bool i_callout, const bool i_deconfigure, const bool i_gard, - const CalloutPriorities::CalloutPriority i_priority); + const CalloutPriorities::CalloutPriority i_priority, + const GardTypes::GardType i_gardType); #ifdef FAPI_CUSTOM_MALLOC /// @@ -348,6 +350,9 @@ struct ErrorInfoCDG // GARD Information bool iv_gard; + + // GARD Type + GardTypes::GardType iv_gardType; }; /// @@ -598,6 +603,7 @@ struct ErrorInfoEntryTargetCDG uint8_t iv_deconfigure; uint8_t iv_gard; uint8_t iv_calloutPriority; + uint8_t iv_gardType; void addErrorInfo(std::shared_ptr i_info, const void* const* i_object) const; }; diff --git a/src/import/hwpf/fapi2/include/error_info_defs.H b/src/import/hwpf/fapi2/include/error_info_defs.H index e312a84b..0cd853fa 100644 --- a/src/import/hwpf/fapi2/include/error_info_defs.H +++ b/src/import/hwpf/fapi2/include/error_info_defs.H @@ -278,6 +278,29 @@ enum CollectTrace }; } +/// +/// @enum gardType +/// +/// This enumeration defines the possible gard types +/// NOTE:This gardType is same as the gard types defined in HWAS +/// so they should always be kept in sync. +/// +namespace GardTypes +{ +enum GardType +{ + GARD_NULL = 0x00, + GARD_User_Manual = 0xD2, //Manual Guard. + GARD_Unrecoverable = 0xE2, //TODO:RTC-76814 + GARD_Fatal = 0xE3, //IPL Failures, and others. + GARD_Predictive = 0xE6, //Policy flag to disable. + GARD_Power = 0xE9, //Needed since EID is NOT passed in. + GARD_PHYP = 0xEA, //Needed since EID is NOT passed in. + GARD_Reconfig = 0xEB, //Force deconfig on reconfig loop + GARD_Void = 0xFF, +}; +} + // @brief convert the processor relative sbe target instance into a fapi pos // // @param[in] i_targType - type of target from SBE FFDC buffer diff --git a/src/import/hwpf/fapi2/tools/parseErrorInfo.pl b/src/import/hwpf/fapi2/tools/parseErrorInfo.pl index 6888c571..13f21049 100755 --- a/src/import/hwpf/fapi2/tools/parseErrorInfo.pl +++ b/src/import/hwpf/fapi2/tools/parseErrorInfo.pl @@ -1267,6 +1267,10 @@ foreach my $argnum ( 0 .. $#ARGV ) # Add the Target to cdgTargetHash to be processed with any # callout and deconfigure requests $cdgTargetHash{ $gard->{target} }{gard} = 1; + if ( exists $gard->{gardType} ) + { + $cdgTargetHash{ $gard->{target} }{gardType} = $gard->{gardType}; + } $elementsFound++; } if ( exists $gard->{childTargets} ) @@ -1324,6 +1328,7 @@ foreach my $argnum ( 0 .. $#ARGV ) my $priority = 'NONE'; my $deconf = 0; my $gard = 0; + my $gardType = 'GARD_Fatal'; if ( exists $cdgTargetHash{$cdg}->{callout} ) { @@ -1340,6 +1345,11 @@ foreach my $argnum ( 0 .. $#ARGV ) if ( exists $cdgTargetHash{$cdg}->{gard} ) { $gard = 1; + + if ( exists $cdgTargetHash{$cdg}->{gardType} ) + { + $gardType = $cdgTargetHash{$cdg}->{gardType}; + } } # Add the Target to the objectlist if it doesn't already exist @@ -1356,6 +1366,8 @@ foreach my $argnum ( 0 .. $#ARGV ) $eiEntryStr .= " l_entries[$eiEntryCount].target_cdg.iv_gard = $gard; \\\n"; $eiEntryStr .= " l_entries[$eiEntryCount].target_cdg.iv_calloutPriority = fapi2::CalloutPriorities::$priority; \\\n"; + $eiEntryStr .= + " l_entries[$eiEntryCount].target_cdg.iv_gardType = fapi2::GardTypes::$gardType; \\\n"; $eiEntryCount++; } -- cgit v1.2.1