diff options
Diffstat (limited to 'src/usr/diag/prdf/common/framework')
19 files changed, 141 insertions, 457 deletions
diff --git a/src/usr/diag/prdf/common/framework/config/iipSystem.h b/src/usr/diag/prdf/common/framework/config/iipSystem.h index ef4ed9322..b1b6ad1f4 100755 --- a/src/usr/diag/prdf/common/framework/config/iipSystem.h +++ b/src/usr/diag/prdf/common/framework/config/iipSystem.h @@ -5,7 +5,7 @@ /* */ /* OpenPOWER HostBoot Project */ /* */ -/* Contributors Listed Below - COPYRIGHT 1996,2018 */ +/* Contributors Listed Below - COPYRIGHT 1996,2019 */ /* [+] International Business Machines Corp. */ /* */ /* */ @@ -87,9 +87,7 @@ #include <vector> #include <map> -#ifndef IIPCONST_H #include <iipconst.h> //TARGETING::TargetHandle_t, DOMAIN_ID_TYPE -#endif #include <iipsdbug.h> // Include file for ATTENTION_TYPE diff --git a/src/usr/diag/prdf/common/framework/register/iipCaptureData.h b/src/usr/diag/prdf/common/framework/register/iipCaptureData.h index e65e94d3f..9aae2880c 100755 --- a/src/usr/diag/prdf/common/framework/register/iipCaptureData.h +++ b/src/usr/diag/prdf/common/framework/register/iipCaptureData.h @@ -78,9 +78,7 @@ #include <list> -#ifndef IIPCONST_H #include <iipconst.h> -#endif #include <prdfPlatServices.H> #include <functional> // @jl04 a Needed for the unary function in new predicate. diff --git a/src/usr/diag/prdf/common/framework/register/iipErrorRegisterMask.h b/src/usr/diag/prdf/common/framework/register/iipErrorRegisterMask.h index fb1443df8..af67c68aa 100755 --- a/src/usr/diag/prdf/common/framework/register/iipErrorRegisterMask.h +++ b/src/usr/diag/prdf/common/framework/register/iipErrorRegisterMask.h @@ -5,7 +5,7 @@ /* */ /* OpenPOWER HostBoot Project */ /* */ -/* Contributors Listed Below - COPYRIGHT 2012,2017 */ +/* Contributors Listed Below - COPYRIGHT 2012,2019 */ /* [+] International Business Machines Corp. */ /* */ /* */ @@ -70,9 +70,7 @@ #include <iipErrorRegisterFilter.h> #endif -#ifndef IIPBITS_H -#include <iipbits.h> -#endif +#include <prdfBitString.H> namespace PRDF { diff --git a/src/usr/diag/prdf/common/framework/register/iipMopRegisterAccess.h b/src/usr/diag/prdf/common/framework/register/iipMopRegisterAccess.h deleted file mode 100755 index 1e7ad5947..000000000 --- a/src/usr/diag/prdf/common/framework/register/iipMopRegisterAccess.h +++ /dev/null @@ -1,184 +0,0 @@ -/* IBM_PROLOG_BEGIN_TAG */ -/* This is an automatically generated prolog. */ -/* */ -/* $Source: src/usr/diag/prdf/common/framework/register/iipMopRegisterAccess.h $ */ -/* */ -/* OpenPOWER HostBoot Project */ -/* */ -/* Contributors Listed Below - COPYRIGHT 2012,2017 */ -/* [+] 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 */ - -#ifndef iipMopRegisterAccess_h -#define iipMopRegisterAccess_h - -// Class Specification ************************************************* -// -// Class name: MopRegisterAccess -// Parent class: None. -// -// Summary: This class provides access to hardware register via -// a MOP routine. A single pure virtual function Access() -// is declared for this purpose. -// -// Cardinality: 0 -// -// Performance/Implementation: -// Space Complexity: Constant -// Time Complexity: All member functions constant unless otherwise -// stated. -// -// Usage Examples: -// -// -// void foo(MopRegisterAccess & mra) -// { -// BitStringBuffer bitString(80); // 80 bits -// -// mra.Access(bitString, READ); -// ... -// -// } -// -// -// End Class Specification ********************************************* - -// Includes -#if !defined(IIPCONST_H) -#include <iipconst.h> -#endif -#include <prdfPlatServices.H> - -namespace PRDF -{ -// Forward References -class BitString; - -class MopRegisterAccess -{ -public: - - enum Operation - { - READ = 0, - WRITE = 1 - }; - - // MopRegisterAccess(void); - // Function Specification ******************************************** - // - // Purpose: Initialization - // Parameters: None. - // Returns: No value returned. - // Requirements: None. - // Promises: All data members are initialized. - // Exceptions: None. - // Concurrency: N/A - // Notes: This constructor is not declared. This compiler generated - // default definition is sufficient. - // - // End Function Specification ////////////////////////////////////// - - // MopRegisterAccess(const MopRegisterAccess & scr); - // Function Specification ******************************************** - // - // Purpose: Copy - // Parameters: scr: Reference to instance to copy - // Returns: No value returned. - // Requirements: None. - // Promises: All data members will be copied (Deep copy). - // Exceptions: None. - // Concurrency: N/A. - // Notes: This constructor is not declared. This compiler generated - // default definition is sufficient. - // - // End Function Specification **************************************** - - virtual ~MopRegisterAccess() {} - - // Function Specification ******************************************** - // - // Purpose: Destruction - // Parameters: None. - // Returns: No value returned - // Requirements: None. - // Promises: None. - // Exceptions: None. - // Concurrency: N/A - // - // End Function Specification **************************************** - - // MopRegisterAccess & operator=(const MopRegisterAccess & scr); - // Function Specification ******************************************** - // - // Purpose: Assigment - // Parameters: d: Reference to instance to assign from - // Returns: Reference to this instance - // Requirements: None. - // Promises: All data members are assigned to - // Exceptions: None. - // Concurrency: N/A. - // Notes: This assingment operator is not declared. The compiler - // generated default definition is sufficient. - // - // End Function Specification **************************************** - - virtual uint32_t Access(BitString & bs, - uint64_t registerId, - Operation operation) const = 0; - // Function Specification ******************************************** - // - // Purpose: This function reads or writes the hardware according - // to the specified operation. - // Parameters: bs: Bit string to retrieve(for write) or store data - // (from read) - // registerId: SCR Address or scan offset - // operation: Indicates either read or write operation - // Returns: Hardware OPs return code - // Requirements: bs.Length() == long enough - // Promises: For read operation, bs is modified to reflect hardware - // register state - // Exceptions: None. - // Concurrency: Nonreentrant. - // Note: The first bs.Length() bits from the Hardware OPs read - // are set/reset in bs (from left to right) - // For a write, the first bs.Length() bits are written - // to the hardware register with right padded 0's if - // needed - // - // End Function Specification **************************************** - //Get Ids and count - virtual const TARGETING::TargetHandle_t * GetChipIds(int & count) const = 0; - // Function Specification ******************************************** - // - // Purpose: Access Chip Ids and # of chips to access - // Parameters: count: Var to return chip count of valid IDs - // Returns: ptr to Chip ids - // Requirements: None - // Promises: None - // Exceptions: None. - // Concurrency: Reentrant. - // - // End Function Specification **************************************** - - private: - - }; - -} // end namespace PRDF - -#endif diff --git a/src/usr/diag/prdf/common/framework/register/iipMopRegisterAccessScanComm.h b/src/usr/diag/prdf/common/framework/register/iipMopRegisterAccessScanComm.h deleted file mode 100755 index e87d70210..000000000 --- a/src/usr/diag/prdf/common/framework/register/iipMopRegisterAccessScanComm.h +++ /dev/null @@ -1,158 +0,0 @@ -/* IBM_PROLOG_BEGIN_TAG */ -/* This is an automatically generated prolog. */ -/* */ -/* $Source: src/usr/diag/prdf/common/framework/register/iipMopRegisterAccessScanComm.h $ */ -/* */ -/* OpenPOWER HostBoot Project */ -/* */ -/* Contributors Listed Below - COPYRIGHT 1996,2017 */ -/* [+] 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 */ - -#ifndef iipMopRegisterAccessScanComm_h -#define iipMopRegisterAccessScanComm_h - -// Class Specification ************************************************* -// -// Class name: MopRegisterAccessScanComm -// Parent class: MopRegisterAccess. -// -// Summary: This class provides access to hardware register data via -// a MOP Scan Comm routine. -// -// Cardinality: 0 -// -// Performance/Implementation: -// Space Complexity: Constant -// Time Complexity: All member functions constant unless otherwise -// stated. -// -// Usage Examples: -// -// -// -// End Class Specification ********************************************* - -// Includes - -#pragma interface - -#ifndef iipMopRegisterAccess_h -#include <iipMopRegisterAccess.h> -#endif - -namespace PRDF -{ - -// Forward References -class MopRegisterAccessScanComm : public MopRegisterAccess -{ -public: - - // Function Specification ******************************************** - // - // Purpose: CTOR - // Parameters: None - // Returns: No value returned. - // Requirements: None. - // Promises: All data members are initialized. - // Exceptions: None. - // Concurrency: N/A - // Note: Multiple chip IDs are for chips that MOPs must - // access at the same time when performing a Scan - // Comm operation (ie STINGER & ARROW chips) - // - // End Function Specification ////////////////////////////////////// - - // MopRegisterAccessScanComm(const MopRegisterAccessScanComm & scr); - // Function Specification ******************************************** - // - // Purpose: Copy - // Parameters: scr: Reference to instance to copy - // Returns: No value returned. - // Requirements: None. - // Promises: All data members will be copied (Deep copy). - // Exceptions: None. - // Concurrency: N/A. - // Notes: This constructor is not declared. This compiler generated - // default definition is sufficient. - // - // End Function Specification **************************************** - - // virtual ~MopRegisterAccessScanComm(void); - // Function Specification ******************************************** - // - // Purpose: Destruction - // Parameters: None. - // Returns: No value returned - // Requirements: None. - // Promises: None. - // Exceptions: None. - // Concurrency: N/A - // Notes: This destructor is not declared. This compiler generated - // default definition is sufficient. - // - // End Function Specification **************************************** - - // MopRegisterAccessScanComm & operator=(const MopRegisterAccessScanComm & scr); - // Function Specification ******************************************** - // - // Purpose: Assigment - // Parameters: d: Reference to instance to assign from - // Returns: Reference to this instance - // Requirements: None. - // Promises: All data members are assigned to - // Exceptions: None. - // Concurrency: N/A. - // Notes: This assingment operator is not declared. The compiler - // generated default definition is sufficient. - // - // End Function Specification **************************************** - - virtual uint32_t Access(BitString & bs, - uint32_t registerId, - Operation operation) const; - // Function Specification ******************************************** - // - // Purpose: This function reads or writes the hardware according - // to the specified operation. - // Parameters: bs: Bit string to retrieve(for write) or store data - // (from read) - // registerId: ScanComm register address - // operation: Indicates either read or write operation - // Returns: Hardware OPs return code - // Requirements: bs.Length() == long enough - // Promises: For read operation, bs is modified to reflect hardware - // register state - // Exceptions: None. - // Concurrency: Nonreentrant. - // Note: The first bs.Length() bits from the Hardware OPs read - // are set/reset in bs (from left to right) - // For a write, the first bs.Length() bits are written - // to the hardware register with right padded 0's if - // needed - // - // End Function Specification **************************************** - - -private: // DATA - -}; - -} // end namespace PRDF - -#endif diff --git a/src/usr/diag/prdf/common/framework/register/iipMopRegisterAccessScanComm.inl b/src/usr/diag/prdf/common/framework/register/iipMopRegisterAccessScanComm.inl deleted file mode 100755 index ad08084d6..000000000 --- a/src/usr/diag/prdf/common/framework/register/iipMopRegisterAccessScanComm.inl +++ /dev/null @@ -1,67 +0,0 @@ -/* IBM_PROLOG_BEGIN_TAG */ -/* This is an automatically generated prolog. */ -/* */ -/* $Source: src/usr/diag/prdf/common/framework/register/iipMopRegisterAccessScanComm.inl $ */ -/* */ -/* OpenPOWER HostBoot Project */ -/* */ -/* COPYRIGHT International Business Machines Corp. 1996,2014 */ -/* */ -/* 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 */ - -// Module Description ************************************************** -// -// Description: This module provides the inline implementation for the -// PRD MOP Register Access Scan Comm class. -// -// End Module Description ********************************************** - -namespace PRDF -{ - -//---------------------------------------------------------------------- -// Includes -//---------------------------------------------------------------------- - -//---------------------------------------------------------------------- -// User Types -//---------------------------------------------------------------------- - -//---------------------------------------------------------------------- -// Constants -//---------------------------------------------------------------------- - -//---------------------------------------------------------------------- -// Macros -//---------------------------------------------------------------------- - -//---------------------------------------------------------------------- -// Internal Function Prototypes -//---------------------------------------------------------------------- - -//---------------------------------------------------------------------- -// Global Variables -//---------------------------------------------------------------------- - -//--------------------------------------------------------------------- -// Member Function Specifications -//--------------------------------------------------------------------- - -inline -MopRegisterAccessScanComm::MopRegisterAccessScanComm(void) - { - } - -} // end namespace PRDF diff --git a/src/usr/diag/prdf/common/framework/register/iipscr.C b/src/usr/diag/prdf/common/framework/register/iipscr.C index d4d7017a2..6834c6415 100755 --- a/src/usr/diag/prdf/common/framework/register/iipscr.C +++ b/src/usr/diag/prdf/common/framework/register/iipscr.C @@ -5,7 +5,7 @@ /* */ /* OpenPOWER HostBoot Project */ /* */ -/* Contributors Listed Below - COPYRIGHT 1997,2017 */ +/* Contributors Listed Below - COPYRIGHT 1997,2019 */ /* [+] International Business Machines Corp. */ /* */ /* */ @@ -41,7 +41,7 @@ /* Includes */ /*--------------------------------------------------------------------*/ -#include <iipbits.h> +#include <prdfBitString.H> #include <iipscr.h> #include <iipconst.h> diff --git a/src/usr/diag/prdf/common/framework/register/iipscr.h b/src/usr/diag/prdf/common/framework/register/iipscr.h index 53c9bfa5a..cd1243dc6 100755 --- a/src/usr/diag/prdf/common/framework/register/iipscr.h +++ b/src/usr/diag/prdf/common/framework/register/iipscr.h @@ -5,7 +5,7 @@ /* */ /* OpenPOWER HostBoot Project */ /* */ -/* Contributors Listed Below - COPYRIGHT 2012,2017 */ +/* Contributors Listed Below - COPYRIGHT 2012,2019 */ /* [+] International Business Machines Corp. */ /* */ /* */ @@ -43,7 +43,7 @@ // Includes //---------------------------------------------------------------------- -#include <iipbits.h> +#include <prdfBitString.H> #include <iipconst.h> #include <iipsdbug.h> #include <prdfMain.H> diff --git a/src/usr/diag/prdf/common/framework/register/prdfCaptureData.C b/src/usr/diag/prdf/common/framework/register/prdfCaptureData.C index 39113507b..5ddb11a4c 100755 --- a/src/usr/diag/prdf/common/framework/register/prdfCaptureData.C +++ b/src/usr/diag/prdf/common/framework/register/prdfCaptureData.C @@ -31,7 +31,7 @@ // Includes //---------------------------------------------------------------------- -#include <iipbits.h> +#include <prdfBitString.H> #include <prdfHomRegisterAccess.H> // dg06a #include <prdfScomRegister.H> #include <iipchip.h> diff --git a/src/usr/diag/prdf/common/framework/register/prdfErrorRegister.C b/src/usr/diag/prdf/common/framework/register/prdfErrorRegister.C index 3244022c7..450a7bc9c 100755 --- a/src/usr/diag/prdf/common/framework/register/prdfErrorRegister.C +++ b/src/usr/diag/prdf/common/framework/register/prdfErrorRegister.C @@ -5,7 +5,7 @@ /* */ /* OpenPOWER HostBoot Project */ /* */ -/* Contributors Listed Below - COPYRIGHT 2012,2018 */ +/* Contributors Listed Below - COPYRIGHT 2012,2019 */ /* [+] International Business Machines Corp. */ /* */ /* */ @@ -40,7 +40,7 @@ #include <prdfMain.H> #include <prdfAssert.h> #include <iipstep.h> -#include <iipbits.h> +#include <prdfBitString.H> #include <iipResolution.h> #include <iipscr.h> #include <prdfErrorSignature.H> diff --git a/src/usr/diag/prdf/common/framework/register/prdfHomRegisterAccess.C b/src/usr/diag/prdf/common/framework/register/prdfHomRegisterAccess.C index a9d2a615a..c7bf802a4 100755 --- a/src/usr/diag/prdf/common/framework/register/prdfHomRegisterAccess.C +++ b/src/usr/diag/prdf/common/framework/register/prdfHomRegisterAccess.C @@ -5,7 +5,7 @@ /* */ /* OpenPOWER HostBoot Project */ /* */ -/* Contributors Listed Below - COPYRIGHT 2012,2017 */ +/* Contributors Listed Below - COPYRIGHT 2012,2019 */ /* [+] International Business Machines Corp. */ /* */ /* */ @@ -30,11 +30,10 @@ //---------------------------------------------------------------------- // Includes //---------------------------------------------------------------------- -#define prdfHomRegisterAccess_C #include <prdfHomRegisterAccess.H> #include <prdf_service_codes.H> -#include <iipbits.h> +#include <prdfBitString.H> #include <prdfMain.H> #include <prdfPlatServices.H> #include <prdfGlobal.H> @@ -46,9 +45,6 @@ #include <p9_stop_api.H> #endif -#undef prdfHomRegisterAccess_C - - using namespace TARGETING; namespace PRDF @@ -117,7 +113,7 @@ void ScomService::setScomAccessor(ScomAccessor & i_ScomAccessor) uint32_t ScomService::Access(TargetHandle_t i_target, BitString & bs, uint64_t registerId, - MopRegisterAccess::Operation operation) const + RegisterAccess::Operation operation) const { PRDF_DENTER("ScomService::Access()"); uint32_t rc = SUCCESS; @@ -136,7 +132,7 @@ uint32_t ScomService::Access(TargetHandle_t i_target, uint32_t ScomAccessor::Access(TargetHandle_t i_target, BitString & bs, uint64_t registerId, - MopRegisterAccess::Operation operation) const + RegisterAccess::Operation operation) const { PRDF_DENTER("ScomAccessor::Access()"); @@ -146,7 +142,7 @@ uint32_t ScomAccessor::Access(TargetHandle_t i_target, { switch (operation) { - case MopRegisterAccess::WRITE: + case RegisterAccess::WRITE: { rc = PRDF::PlatServices::putScom(i_target, bs, registerId); @@ -198,7 +194,7 @@ uint32_t ScomAccessor::Access(TargetHandle_t i_target, break; } - case MopRegisterAccess::READ: + case RegisterAccess::READ: bs.clearAll(); // clear all bits rc = PRDF::PlatServices::getScom(i_target, bs, registerId); diff --git a/src/usr/diag/prdf/common/framework/register/prdfHomRegisterAccess.H b/src/usr/diag/prdf/common/framework/register/prdfHomRegisterAccess.H index 6426b4ac3..d26f173f6 100755 --- a/src/usr/diag/prdf/common/framework/register/prdfHomRegisterAccess.H +++ b/src/usr/diag/prdf/common/framework/register/prdfHomRegisterAccess.H @@ -5,7 +5,7 @@ /* */ /* OpenPOWER HostBoot Project */ /* */ -/* Contributors Listed Below - COPYRIGHT 2012,2017 */ +/* Contributors Listed Below - COPYRIGHT 2012,2019 */ /* [+] International Business Machines Corp. */ /* */ /* */ @@ -35,7 +35,6 @@ // Includes //-------------------------------------------------------------------- -#include <iipMopRegisterAccess.h> #include <vector> #include <prdfPlatServices.H> #include <prdfErrlUtil.H> @@ -47,6 +46,15 @@ namespace PRDF { +namespace RegisterAccess +{ + enum Operation + { + READ = 0, + WRITE = 1, + }; +} + class ScomAccessor { public: @@ -75,7 +83,7 @@ class ScomAccessor virtual uint32_t Access( TARGETING::TargetHandle_t i_target, BitString & bs, uint64_t registerId, - MopRegisterAccess::Operation operation) const; + RegisterAccess::Operation operation) const; private: @@ -142,7 +150,7 @@ class ScomService virtual uint32_t Access(TARGETING::TargetHandle_t i_target, BitString & bs, uint64_t registerId, - MopRegisterAccess::Operation operation) const; + RegisterAccess::Operation operation) const; private: diff --git a/src/usr/diag/prdf/common/framework/register/prdfRegisterCache.H b/src/usr/diag/prdf/common/framework/register/prdfRegisterCache.H index be34884a3..8d069b3cb 100644 --- a/src/usr/diag/prdf/common/framework/register/prdfRegisterCache.H +++ b/src/usr/diag/prdf/common/framework/register/prdfRegisterCache.H @@ -5,7 +5,7 @@ /* */ /* OpenPOWER HostBoot Project */ /* */ -/* Contributors Listed Below - COPYRIGHT 2012,2017 */ +/* Contributors Listed Below - COPYRIGHT 2012,2019 */ /* [+] International Business Machines Corp. */ /* */ /* */ @@ -29,7 +29,7 @@ /** @file prdfRegisterCache.H */ #include <map> -#include <iipbits.h> +#include <prdfBitString.H> #include <prdfGlobal.H> #include <prdfScanFacility.H> #include <prdfScomRegisterAccess.H> diff --git a/src/usr/diag/prdf/common/framework/register/prdfScomRegister.C b/src/usr/diag/prdf/common/framework/register/prdfScomRegister.C index 7e4cce81b..f8a445b20 100755 --- a/src/usr/diag/prdf/common/framework/register/prdfScomRegister.C +++ b/src/usr/diag/prdf/common/framework/register/prdfScomRegister.C @@ -5,7 +5,7 @@ /* */ /* OpenPOWER HostBoot Project */ /* */ -/* Contributors Listed Below - COPYRIGHT 2012,2017 */ +/* Contributors Listed Below - COPYRIGHT 2012,2019 */ /* [+] International Business Machines Corp. */ /* */ /* */ @@ -37,7 +37,7 @@ #include <iipchip.h> #include <prdfScomRegister.H> #include <iipconst.h> -#include <iipbits.h> +#include <prdfBitString.H> #include <prdfMain.H> #include <prdfRasServices.H> #include <prdfRegisterCache.H> @@ -155,7 +155,7 @@ uint32_t ScomRegister::ForceRead() const } // Read hardware. - o_rc = Access( readCache(), MopRegisterAccess::READ ); + o_rc = Access( readCache(), RegisterAccess::READ ); if ( SUCCESS != o_rc ) { // The read failed. Remove the entry from the cache so a subsequent @@ -201,7 +201,7 @@ uint32_t ScomRegister::Write() } // Write hardware. - o_rc = Access( readCache(), MopRegisterAccess::WRITE ); + o_rc = Access( readCache(), RegisterAccess::WRITE ); } while (0); @@ -213,7 +213,7 @@ uint32_t ScomRegister::Write() //------------------------------------------------------------------------------ uint32_t ScomRegister::Access( BitString & bs, - MopRegisterAccess::Operation op ) const + RegisterAccess::Operation op ) const { int32_t l_rc = SCR_ACCESS_FAILED; TARGETING::TargetHandle_t i_pchipTarget = getChip()->GetChipHandle(); diff --git a/src/usr/diag/prdf/common/framework/register/prdfScomRegister.H b/src/usr/diag/prdf/common/framework/register/prdfScomRegister.H index 655f4d523..e3d14a0dc 100755 --- a/src/usr/diag/prdf/common/framework/register/prdfScomRegister.H +++ b/src/usr/diag/prdf/common/framework/register/prdfScomRegister.H @@ -5,7 +5,7 @@ /* */ /* OpenPOWER HostBoot Project */ /* */ -/* Contributors Listed Below - COPYRIGHT 1996,2017 */ +/* Contributors Listed Below - COPYRIGHT 1996,2019 */ /* [+] International Business Machines Corp. */ /* */ /* */ @@ -37,8 +37,8 @@ */ #include <iipscr.h> -#include <iipbits.h> -#include <iipMopRegisterAccess.h> +#include <prdfBitString.H> +#include <prdfHomRegisterAccess.H> #include <prdfTrace.H> namespace PRDF @@ -80,6 +80,9 @@ class ScomRegister : public SCAN_COMM_REGISTER_CLASS iv_operationType( ACCESS_NONE ) {} + /** @brief Destructor. */ + virtual ~ScomRegister() = default; + /** * @brief Returns the pointer to bit string * @param i_type attention type @@ -201,7 +204,7 @@ class ScomRegister : public SCAN_COMM_REGISTER_CLASS * @return [SUCCESS|FAIL] */ uint32_t Access( BitString & bs, - MopRegisterAccess::Operation op )const; + RegisterAccess::Operation op )const; /** * @brief Returns rulechip pointer associated with the register diff --git a/src/usr/diag/prdf/common/framework/resolution/prdfCalloutMap.H b/src/usr/diag/prdf/common/framework/resolution/prdfCalloutMap.H index 7bedec637..269e432cf 100644 --- a/src/usr/diag/prdf/common/framework/resolution/prdfCalloutMap.H +++ b/src/usr/diag/prdf/common/framework/resolution/prdfCalloutMap.H @@ -195,7 +195,9 @@ PRDF_TARGET_TYPE_ALIAS( TYPE_MI, TARGETING::TYPE_MI ) PRDF_TARGET_TYPE_ALIAS( TYPE_DMI, TARGETING::TYPE_DMI ) PRDF_TARGET_TYPE_ALIAS( TYPE_MCC, TARGETING::TYPE_MCC ) PRDF_TARGET_TYPE_ALIAS( TYPE_OMIC, TARGETING::TYPE_OMIC ) +PRDF_TARGET_TYPE_ALIAS( TYPE_OMI, TARGETING::TYPE_OMI ) PRDF_TARGET_TYPE_ALIAS( TYPE_OCMB_CHIP, TARGETING::TYPE_OCMB_CHIP ) +PRDF_TARGET_TYPE_ALIAS( TYPE_MEM_PORT, TARGETING::TYPE_MEM_PORT ) PRDF_TARGET_TYPE_ALIAS( TYPE_MEMBUF, TARGETING::TYPE_MEMBUF ) PRDF_TARGET_TYPE_ALIAS( TYPE_L4, TARGETING::TYPE_L4 ) PRDF_TARGET_TYPE_ALIAS( TYPE_MBA, TARGETING::TYPE_MBA ) diff --git a/src/usr/diag/prdf/common/framework/resolution/prdfThresholdResolutions.H b/src/usr/diag/prdf/common/framework/resolution/prdfThresholdResolutions.H index e412460dc..b61699159 100755 --- a/src/usr/diag/prdf/common/framework/resolution/prdfThresholdResolutions.H +++ b/src/usr/diag/prdf/common/framework/resolution/prdfThresholdResolutions.H @@ -5,7 +5,9 @@ /* */ /* OpenPOWER HostBoot Project */ /* */ -/* COPYRIGHT International Business Machines Corp. 2003,2014 */ +/* Contributors Listed Below - COPYRIGHT 2003,2019 */ +/* [+] 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. */ @@ -100,10 +102,11 @@ class ThresholdResolution : public MaskResolution enum TimeBase { - ONE_SEC = 1, - ONE_MIN = ONE_SEC * 60, - ONE_HOUR = ONE_MIN * 60, - ONE_DAY = ONE_HOUR * 24, + ONE_SEC = 1, + ONE_MIN = ONE_SEC * 60, + ONE_HOUR = ONE_MIN * 60, + TEN_HOURS = ONE_HOUR * 10, + ONE_DAY = ONE_HOUR * 24, NONE = 0xffffffff, }; diff --git a/src/usr/diag/prdf/common/framework/service/iipServiceDataCollector.h b/src/usr/diag/prdf/common/framework/service/iipServiceDataCollector.h index 704dddf70..e8cdb79a5 100755 --- a/src/usr/diag/prdf/common/framework/service/iipServiceDataCollector.h +++ b/src/usr/diag/prdf/common/framework/service/iipServiceDataCollector.h @@ -5,7 +5,7 @@ /* */ /* OpenPOWER HostBoot Project */ /* */ -/* Contributors Listed Below - COPYRIGHT 2012,2018 */ +/* Contributors Listed Below - COPYRIGHT 2012,2019 */ /* [+] International Business Machines Corp. */ /* */ /* */ @@ -628,6 +628,11 @@ public: void clearMruListGard(); /** + * @brief Iterates the MRU list and clears gard for any NVDIMM targets. + */ + void clearNvdimmMruListGard(); + + /** * @brief Iterates the MRU list and returns true if at least on target in * the list is set to be garded. * @return True if there is at least one target set to be garded. diff --git a/src/usr/diag/prdf/common/framework/service/prdfServiceDataCollector.C b/src/usr/diag/prdf/common/framework/service/prdfServiceDataCollector.C index d9681d66b..731102a26 100755 --- a/src/usr/diag/prdf/common/framework/service/prdfServiceDataCollector.C +++ b/src/usr/diag/prdf/common/framework/service/prdfServiceDataCollector.C @@ -5,7 +5,7 @@ /* */ /* OpenPOWER HostBoot Project */ /* */ -/* Contributors Listed Below - COPYRIGHT 2012,2015 */ +/* Contributors Listed Below - COPYRIGHT 2012,2019 */ /* [+] International Business Machines Corp. */ /* */ /* */ @@ -177,6 +177,88 @@ void ServiceDataCollector::clearMruListGard() //------------------------------------------------------------------------------ +void ServiceDataCollector::clearNvdimmMruListGard() +{ + #define PRDF_FUNC "[ServiceDataCollector::clearNvdimmMruListGard] " + + #ifdef CONFIG_NVDIMM + #ifdef __HOSTBOOT_MODULE + // Loop through the MRU list. + for ( auto & mru : xMruList ) + { + PRDcallout callout = mru.callout; + PRDcalloutData::MruType mruType = callout.getType(); + + if ( mruType == PRDcalloutData::TYPE_TARGET ) + { + TargetHandle_t trgt = callout.getTarget(); + + // If the callout target is an NVDIMM send a message to + // PHYP/Hostboot that a save/restore may work, and if we are at + // IPL, clear Gard on the NVDIMM. + if ( TYPE_DIMM == PlatServices::getTargetType(trgt) && + isNVDIMM(trgt) ) + { + // Send the message to PHYP/Hostboot if a predictive log + if ( queryServiceCall() ) + { + uint32_t l_rc = PlatServices::nvdimmNotifyProtChange( trgt, + NVDIMM::NVDIMM_RISKY_HW_ERROR ); + if ( SUCCESS != l_rc ) + { + PRDF_TRAC( PRDF_FUNC "nvdimmNotifyProtChange(0x%08x) " + "failed.", PlatServices::getHuid(trgt) ); + continue; + } + } + #ifndef __HOSTBOOT_RUNTIME + // IPL, clear Gard + mru.gardState = NO_GARD; + #endif + } + } + else if ( mruType == PRDcalloutData::TYPE_MEMMRU ) + { + MemoryMru memMru( callout.flatten() ); + TargetHandleList dimmList = memMru.getCalloutList(); + + for ( auto & dimm : dimmList ) + { + // If the callout target is an NVDIMM send a message to + // PHYP/Hostboot that a save/restore may work, and if we are at + // IPL, clear Gard on the NVDIMM. + if ( TYPE_DIMM == PlatServices::getTargetType(dimm) && + isNVDIMM(dimm) ) + { + // Send the message to PHYP/Hostboot if a predictive log + if ( queryServiceCall() ) + { + uint32_t l_rc = PlatServices::nvdimmNotifyProtChange( + dimm, NVDIMM::NVDIMM_RISKY_HW_ERROR ); + if ( SUCCESS != l_rc ) + { + PRDF_TRAC( PRDF_FUNC "nvdimmNotifyProtChange" + "(0x%08x) failed.", + PlatServices::getHuid(dimm) ); + continue; + } + } + #ifndef __HOSTBOOT_RUNTIME + // IPL, clear Gard + mru.gardState = NO_GARD; + #endif + } + } + } + } + #endif // __HOSTBOOT_MODULE + #endif // CONFIG_NVDIMM + + #undef PRDF_FUNC +} + +//------------------------------------------------------------------------------ + bool ServiceDataCollector::isGardRequested() { bool gardRecordExit = false; |