diff options
Diffstat (limited to 'src/include')
-rw-r--r-- | src/include/runtime/interface.h | 12 | ||||
-rw-r--r-- | src/include/usr/isteps/nvdimm/nvdimm.H | 34 | ||||
-rw-r--r-- | src/include/usr/isteps/nvdimm/nvdimmreasoncodes.H | 5 |
3 files changed, 47 insertions, 4 deletions
diff --git a/src/include/runtime/interface.h b/src/include/runtime/interface.h index 2d54dd1f3..6304ec6ba 100644 --- a/src/include/runtime/interface.h +++ b/src/include/runtime/interface.h @@ -5,7 +5,7 @@ /* */ /* OpenPOWER HostBoot Project */ /* */ -/* Contributors Listed Below - COPYRIGHT 2013,2019 */ +/* Contributors Listed Below - COPYRIGHT 2013,2020 */ /* [+] International Business Machines Corp. */ /* */ /* */ @@ -599,7 +599,15 @@ typedef struct hostInterfaces // Manufacturing(MNFG) energy source(ES) health check request HBRT_FW_MNFG_ES_HEALTH_CHECK = 0x0020, // Manufacturing(MNFG) non-volatile memory(NVM) health check request - HBRT_FW_MNFG_NVM_HEALTH_CHECK = 0x0040 + HBRT_FW_MNFG_NVM_HEALTH_CHECK = 0x0040, + + /// The following operations pertain to the decommission of an NVDIMM + // Factory Default returns the NVDIMM to the factory default state + HBRT_FW_NVDIMM_FACTORY_DEFAULT = 0x0080, + // Secure Erase Verify all NAND flash blocks have been erased + HBRT_FW_NVDIMM_SECURE_EV_START = 0x0100, + // Secure Erase Verify Status checks if SEV operation has completed + HBRT_FW_NVDIMM_SECURE_EV_STATUS = 0x0200, }; // NVDIMM (PHYP -> HBRT) message to request NVDIMM operation(s) diff --git a/src/include/usr/isteps/nvdimm/nvdimm.H b/src/include/usr/isteps/nvdimm/nvdimm.H index 97655b24b..966d4fd17 100644 --- a/src/include/usr/isteps/nvdimm/nvdimm.H +++ b/src/include/usr/isteps/nvdimm/nvdimm.H @@ -5,7 +5,7 @@ /* */ /* OpenPOWER HostBoot Project */ /* */ -/* Contributors Listed Below - COPYRIGHT 2018,2019 */ +/* Contributors Listed Below - COPYRIGHT 2018,2020 */ /* [+] International Business Machines Corp. */ /* */ /* */ @@ -132,6 +132,33 @@ bool nvdimm_encrypt_enable(TARGETING::TargetHandleList &i_nvdimmList); bool nvdimm_crypto_erase(TARGETING::TargetHandleList &i_nvdimmList); /** + * @brief Entry function to NVDIMM factory default + * + * @param[in] i_nvdimmList - list of nvdimm targets + * + * @return true if no errors logged, else false + */ +bool nvdimmFactoryDefault(TARGETING::TargetHandleList &i_nvdimmList); + +/** + * @brief Entry function to NVDIMM secure erase verify + * + * @param[in] i_nvdimmList - list of nvdimm targets + * + * @return true if no errors logged, else false + */ +bool nvdimmSecureEraseVerifyStart(TARGETING::TargetHandleList &i_nvdimmList); + +/** + * @brief Entry function to NVDIMM secure erase verify status + * + * @param[in] i_nvdimmList - list of nvdimm targets + * + * @return true if no errors logged, else false + */ +bool nvdimmSecureEraseVerifyStatus(TARGETING::TargetHandleList &i_nvdimmList); + +/** * @brief Helper function to get list of nvdimm target pointers * * @param[out] o_nvdimmList - list of nvdimm targets @@ -293,6 +320,8 @@ void nvdimmSendNvStatus(); * PROTECTED status until power is cycled again * ENCRYPTION_ENABLED - contents of nvdimm are encrypted * ENCRYPTION_DISABLED - contents of nvdimm are not encrypted + * ERASE_VERIFY_STARTED - set secure_erase_verify_complete to 0 + * ERASE_VERIFY_COMPLETE = set secure_erase_verify_complete to 1 */ enum nvdimm_protection_t { @@ -305,6 +334,8 @@ enum nvdimm_protection_t NVDIMM_ENCRYPTION_ERROR = 6, ENCRYPTION_ENABLED = 7, ENCRYPTION_DISABLED = 8, + ERASE_VERIFY_STARTED = 9, + ERASE_VERIFY_COMPLETED = 10, SEND_NV_STATUS = 11, /* deprecated, still used by PRD */ UNPROTECTED_BECAUSE_ERROR = 4, @@ -465,6 +496,7 @@ void nvdimmAddPage4Regs(TARGETING::Target *i_nvdimm, errlHndl_t& io_err); */ void nvdimm_init(TARGETING::Target *i_nvdimm); + } #endif // NVDIMM_EXT_H__ diff --git a/src/include/usr/isteps/nvdimm/nvdimmreasoncodes.H b/src/include/usr/isteps/nvdimm/nvdimmreasoncodes.H index c0215db17..134988be6 100644 --- a/src/include/usr/isteps/nvdimm/nvdimmreasoncodes.H +++ b/src/include/usr/isteps/nvdimm/nvdimmreasoncodes.H @@ -5,7 +5,7 @@ /* */ /* OpenPOWER HostBoot Project */ /* */ -/* Contributors Listed Below - COPYRIGHT 2019 */ +/* Contributors Listed Below - COPYRIGHT 2019,2020 */ /* [+] International Business Machines Corp. */ /* */ /* */ @@ -110,6 +110,7 @@ enum nvdimmModuleId NVDIMM_ARM_PRE_CHECK = 0x3C, NVDIMM_ARM = 0x3D, CLEAR_FW_OPS_STATUS = 0x3E, + NVDIMM_SECURE_ERASE_VERIFY_STATUS = 0x3F, }; /** @@ -207,6 +208,8 @@ enum nvdimmReasonCode NVDIMM_ARM_RETRY = NVDIMM_COMP_ID | 0x54, NVDIMM_CLEAR_FW_OPS_STATUS_TIMEOUT = NVDIMM_COMP_ID | 0x55, // Failed to clear FW_OPS_STATUS NVDIMM_NOT_RUNNING_LATEST_LEVEL = NVDIMM_COMP_ID | 0x56, // Either running from slot 0 or level was not updated + NVDIMM_ERASE_VERIFY_STATUS_NONZERO = NVDIMM_COMP_ID | 0x57, + NVDIMM_ERASE_VERIFY_RESULT_NONZERO = NVDIMM_COMP_ID | 0x58, }; enum UserDetailsTypes |