diff options
| author | Caleb Palmer <cnpalmer@us.ibm.com> | 2019-06-13 09:17:51 -0500 |
|---|---|---|
| committer | Zane C. Shelley <zshelle@us.ibm.com> | 2019-06-28 14:07:59 -0500 |
| commit | 8db1ba5aaa8198a0535cc472eda56cecdbb016f9 (patch) | |
| tree | 54f5e433bff81a254e95a963265677a992474d35 /src/usr/diag/prdf/common/framework | |
| parent | 1581c67d3151e1c17d81c739d69e2122afd08364 (diff) | |
| download | blackbird-hostboot-8db1ba5aaa8198a0535cc472eda56cecdbb016f9.tar.gz blackbird-hostboot-8db1ba5aaa8198a0535cc472eda56cecdbb016f9.zip | |
PRD: Avoid gard for NVDIMMs
Change-Id: Icaa517b196826c2b442da769ef45b3cdf56e6a9d
CQ: SW467502
Reviewed-on: http://rchgit01.rchland.ibm.com/gerrit1/79189
Tested-by: Jenkins Server <pfd-jenkins+hostboot@us.ibm.com>
Reviewed-by: Brian J. Stegmiller <bjs@us.ibm.com>
Reviewed-by: Benjamen G. Tyner <ben.tyner@ibm.com>
Reviewed-by: Paul Greenwood <paul.greenwood@ibm.com>
Reviewed-by: Zane C. Shelley <zshelle@us.ibm.com>
Reviewed-on: http://rchgit01.rchland.ibm.com/gerrit1/79670
Diffstat (limited to 'src/usr/diag/prdf/common/framework')
| -rwxr-xr-x | src/usr/diag/prdf/common/framework/service/iipServiceDataCollector.h | 7 | ||||
| -rwxr-xr-x | src/usr/diag/prdf/common/framework/service/prdfServiceDataCollector.C | 46 |
2 files changed, 51 insertions, 2 deletions
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..8ba990077 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,50 @@ void ServiceDataCollector::clearMruListGard() //------------------------------------------------------------------------------ +void ServiceDataCollector::clearNvdimmMruListGard() +{ + #define PRDF_FUNC "[ServiceDataCollector::clearNvdimmMruListGard] " + + // Loop through the MRU list. + for ( auto & mru : xMruList ) + { + PRDcallout callout = mru.callout; + TargetHandle_t trgt = callout.getTarget(); + if ( TYPE_DIMM == PlatServices::getTargetType(trgt) ) + { + // If the callout target is an NVDIMM, do not gard it and send a + // message to PHYP/Hostboot that a save/restore may work. + if ( isNVDIMM(trgt) ) + { + mru.gardState = NO_GARD; + + #ifdef __HOSTBOOT_MODULE + + #ifdef __HOSTBOOT_RUNTIME + // Hostboot runtime, send the message to PHYP + uint32_t l_rc = PlatServices::nvdimmNotifyPhypProtChange( trgt, + NVDIMM::NVDIMM_RISKY_HW_ERROR ); + if ( SUCCESS != l_rc ) + { + PRDF_TRAC( PRDF_FUNC "nvdimmNotifyPhypProtChange(0x%08x) " + "failed.", PlatServices::getHuid(trgt) ); + continue; + } + #else + // IPL, set the appropriate internal attribute in Hostboot + trgt->setAttr<ATTR_NV_STATUS_FLAG>(0x40); + #endif + + #endif // __HOSTBOOT_MODULE + } + } + } + + #undef PRDF_FUNC +} + +//------------------------------------------------------------------------------ + bool ServiceDataCollector::isGardRequested() { bool gardRecordExit = false; |

