Skip to content

Commit

Permalink
PRD: PlatServices support for NVDIMM persistency lost msg
Browse files Browse the repository at this point in the history
Change-Id: Ifc2029d18052b9bc2b44a5636ec7d0707d31b3b1
RTC: 204394
Reviewed-on: http://rchgit01.rchland.ibm.com/gerrit1/71617
Tested-by: Jenkins Server <pfd-jenkins+hostboot@us.ibm.com>
Reviewed-by: Brian J. Stegmiller <bjs@us.ibm.com>
Reviewed-by: Zane C. Shelley <zshelle@us.ibm.com>
Reviewed-on: http://rchgit01.rchland.ibm.com/gerrit1/71868
Tested-by: Jenkins OP Build CI <op-jenkins+hostboot@us.ibm.com>
Tested-by: Jenkins OP HW <op-hw-jenkins+hostboot@us.ibm.com>
Tested-by: FSP CI Jenkins <fsp-CI-jenkins+hostboot@us.ibm.com>
  • Loading branch information
cnpalmer authored and zane131 committed Feb 14, 2019
1 parent 8928ba6 commit 3229ca9
Show file tree
Hide file tree
Showing 3 changed files with 41 additions and 3 deletions.
24 changes: 23 additions & 1 deletion src/usr/diag/prdf/plat/prdfPlatServices_rt.C
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
/* */
/* OpenPOWER HostBoot Project */
/* */
/* Contributors Listed Below - COPYRIGHT 2016,2018 */
/* Contributors Listed Below - COPYRIGHT 2016,2019 */
/* [+] International Business Machines Corp. */
/* */
/* */
Expand Down Expand Up @@ -105,6 +105,28 @@ void sendPredDeallocRequest( uint64_t i_saddr, uint64_t i_eaddr )
__dyndealloc( i_saddr, i_eaddr, MEMORY_ERROR_PREDICTIVE );
}

uint32_t nvdimmNotifyPhypProtChange( TARGETING::TargetHandle_t i_target,
const NVDIMM::nvdimm_protection_t i_state )
{
#define PRDF_FUNC "[PlatServices::nvdimmNotifyPhypProtChange] "

uint32_t o_rc = SUCCESS;

errlHndl_t errl = NVDIMM::notifyNvdimmProtectionChange( i_target, i_state );
if ( nullptr != errl )
{
PRDF_ERR( PRDF_FUNC "NVDIMM::notifyNvdimmProtectionChange(0x%08x) "
"failed.", getHuid(i_target) );
PRDF_COMMIT_ERRL( errl, ERRL_ACTION_REPORT );
o_rc = FAIL;
}

return o_rc;

#undef PRDF_FUNC

}

//##############################################################################
//## Nimbus Maintenance Command wrappers
//##############################################################################
Expand Down
12 changes: 11 additions & 1 deletion src/usr/diag/prdf/plat/prdfPlatServices_rt.H
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
/* */
/* OpenPOWER HostBoot Project */
/* */
/* Contributors Listed Below - COPYRIGHT 2016,2018 */
/* Contributors Listed Below - COPYRIGHT 2016,2019 */
/* [+] International Business Machines Corp. */
/* */
/* */
Expand All @@ -30,6 +30,7 @@
#include <p9_l2err_extract.H>
#include <p9_pm_callout.H>
#include <prdfMemAddress.H>
#include <isteps/nvdimm/nvdimm.H>

namespace PRDF
{
Expand Down Expand Up @@ -64,6 +65,15 @@ void sendDynMemDeallocRequest( uint64_t i_saddr, uint64_t i_eaddr );
*/
void sendPredDeallocRequest( uint64_t i_saddr, uint64_t i_eaddr );

/**
* @brief Notify PHYP of NVDIMM protection status
*
* @param i_target Processor with NVDIMM
* @param i_state Protection state of NVDIMM
*/
uint32_t nvdimmNotifyPhypProtChange( TARGETING::Target * i_target,
const NVDIMM::nvdimm_protection_t i_state );

//##############################################################################
//## Nimbus/Centaur Maintenance Command wrappers
//##############################################################################
Expand Down
8 changes: 7 additions & 1 deletion src/usr/diag/prdf/prdf_hb_only.mk
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
#
# OpenPOWER HostBoot Project
#
# Contributors Listed Below - COPYRIGHT 2013,2018
# Contributors Listed Below - COPYRIGHT 2013,2019
# [+] International Business Machines Corp.
#
#
Expand Down Expand Up @@ -130,6 +130,12 @@ ifeq (${HOSTBOOT_RUNTIME},1)
# plat/
prd_obj += prdfPlatServices_rt.o

# nvdimm
prd_vpath += ${ROOTPATH}/src/usr/isteps/nvdimm/
prd_vpath += ${ROOTPATH}/src/usr/isteps/nvdimm/runtime
prd_obj_no_sim += nvdimm.o
prd_obj_no_sim += nvdimm_rt.o

endif

################################################################################
Expand Down

0 comments on commit 3229ca9

Please sign in to comment.