diff options
| author | Tsung Yeung <tyeung@us.ibm.com> | 2018-08-06 08:51:22 -0500 |
|---|---|---|
| committer | Daniel M. Crowell <dcrowell@us.ibm.com> | 2018-10-30 16:50:11 -0500 |
| commit | 2c1c99f370191e4099870a0699cd6f01510222e7 (patch) | |
| tree | 52081d13a60adf0cfeea62189e45d48b9cb9203a /src/include/usr | |
| parent | d9711869369308c99eea851c45022b66f68b12df (diff) | |
| download | talos-hostboot-2c1c99f370191e4099870a0699cd6f01510222e7.tar.gz talos-hostboot-2c1c99f370191e4099870a0699cd6f01510222e7.zip | |
Adds NVDIMM IPL Support on ZZ
-New NVDIMM functions to support restore and trigger setup
-Includes NVDIMM step in call_mss_power_cleanup after mss_power_cleanup HWP
-Fixes attribute NV_STATUS_FLAG to match HDAT spec
Change-Id: I2d68123ceb0b8e7a33b54f9acad0968670a67ea9
Reviewed-on: http://rchgit01.rchland.ibm.com/gerrit1/63948
Tested-by: Jenkins Server <pfd-jenkins+hostboot@us.ibm.com>
Tested-by: Jenkins OP Build CI <op-jenkins+hostboot@us.ibm.com>
Tested-by: Jenkins OP HW <op-hw-jenkins+hostboot@us.ibm.com>
Reviewed-by: Christian R. Geddes <crgeddes@us.ibm.com>
Tested-by: FSP CI Jenkins <fsp-CI-jenkins+hostboot@us.ibm.com>
Reviewed-by: Daniel M. Crowell <dcrowell@us.ibm.com>
Diffstat (limited to 'src/include/usr')
| -rw-r--r-- | src/include/usr/i2c/nvdimmddreasoncodes.H | 36 | ||||
| -rw-r--r-- | src/include/usr/i2c/nvdimmif.H | 1 | ||||
| -rw-r--r-- | src/include/usr/isteps/istep14list.H | 3 | ||||
| -rw-r--r-- | src/include/usr/isteps/nvdimm/nvdimm.H | 48 |
4 files changed, 88 insertions, 0 deletions
diff --git a/src/include/usr/i2c/nvdimmddreasoncodes.H b/src/include/usr/i2c/nvdimmddreasoncodes.H index d01755bc0..509d19d25 100644 --- a/src/include/usr/i2c/nvdimmddreasoncodes.H +++ b/src/include/usr/i2c/nvdimmddreasoncodes.H @@ -55,6 +55,24 @@ enum nvdimmModuleId NVDIMM_READATTRIBUTES = 0x05, NVDIMM_GETI2CMASTERTARGET = 0x06, NVDIMM_CROSSESNVDIMMPAGEBOUNDARY = 0x07, + NVDIMM_POLL_BACKUP = 0x08, + NVDIMM_POLL_RESTORE = 0x09, + NVDIMM_POLL_ERASE = 0x0A, + NVDIMM_POLL_ARM = 0x0B, + NVDIMM_POLL_CHARGE = 0x0C, + NVDIMM_CHECK_RESTORE = 0x0D, + NVDIMM_CHECK_IMAGE = 0x0E, + NVDIMM_SET_ES = 0x0F, + NVDIMM_SET_ARM = 0x10, + NVDIMM_SET_PAGE = 0x11, + NVDIMM_GET_TIMEOUT = 0x12, + NVDIMM_RESTORE = 0x13, + NVDIMM_OPEN_PAGE = 0x14, + NVDIMM_POLL_STATUS = 0x15, + NVDIMM_CHECK_ERASE = 0x16, + NVDIMM_ARM_ERASE = 0x17, + NVDIMM_CHECK_READY = 0x18, + }; /** @@ -76,6 +94,24 @@ enum nvdimmReasonCode NVDIMM_OVERFLOW_ERROR = NVDIMM_COMP_ID | 0x08, NVDIMM_I2C_WRITE_PAGE_SIZE_ZERO = NVDIMM_COMP_ID | 0x09, NVDIMM_INVALID_OFFSET = NVDIMM_COMP_ID | 0x0A, + NVDIMM_READ_FAILURE = NVDIMM_COMP_ID | 0x0B, // NV Controller read failure + NVDIMM_WRITE_FAILURE = NVDIMM_COMP_ID | 0x0C, // NV Controller write failure + NVDIMM_BACKUP_TIMEOUT = NVDIMM_COMP_ID | 0x0D, // Backup/save timeout + NVDIMM_RESTORE_TIMEOUT = NVDIMM_COMP_ID | 0x0E, // Restore timeout + NVDIMM_ERASE_TIMEOUT = NVDIMM_COMP_ID | 0x0F, // Erase timeout + NVDIMM_CHARGE_TIMEOUT = NVDIMM_COMP_ID | 0x10, // Battery charging timeout + NVDIMM_ARM_TIMEOUT = NVDIMM_COMP_ID | 0x11, // Arming timeout + NVDIMM_SET_ES_ERROR = NVDIMM_COMP_ID | 0x12, // Failure to set the ES policy + NVDIMM_MSS_STR_ENTRY_ERROR = NVDIMM_COMP_ID | 0x13, // Failure to enter STR + NVDIMM_MSS_STR_EXIT_ERROR = NVDIMM_COMP_ID | 0x14, // Failure to exit STR + NVDIMM_MSS_POST_RSTR_ERROR = NVDIMM_COMP_ID | 0x15, // Failure to perform post restore work + NVDIMM_OPEN_PAGE_TIMEOUT = NVDIMM_COMP_ID | 0x16, // Open page timeout + NVDIMM_STATUS_TIMEOUT = NVDIMM_COMP_ID | 0x17, // Status timeout + NVDIMM_ARM_FAILED = NVDIMM_COMP_ID | 0x18, // Failure to arm reset_n + NVDIMM_ERASE_FAILED = NVDIMM_COMP_ID | 0x19, // Failure to erase + NVDIMM_RESTORE_FAILED = NVDIMM_COMP_ID | 0x1A, // Failure to restore + NVDIMM_NOT_READY = NVDIMM_COMP_ID | 0x1B, // NVDIMM not ready for host to access + }; enum UserDetailsTypes diff --git a/src/include/usr/i2c/nvdimmif.H b/src/include/usr/i2c/nvdimmif.H index 8c332e1c5..fb875149f 100644 --- a/src/include/usr/i2c/nvdimmif.H +++ b/src/include/usr/i2c/nvdimmif.H @@ -30,6 +30,7 @@ namespace NVDIMM { +//TODO: move isNVDIMM() to targeting/common/util.C /** * @brief Determine if the given dimm target is an NVDIMM * diff --git a/src/include/usr/isteps/istep14list.H b/src/include/usr/isteps/istep14list.H index 415074dd7..1a2058167 100644 --- a/src/include/usr/isteps/istep14list.H +++ b/src/include/usr/isteps/istep14list.H @@ -203,6 +203,9 @@ const DepModInfo g_istep14Dependancies = { DEP_LIB(libimageprocs.so), DEP_LIB(libcen.so), DEP_LIB(libnestmemutils.so), +#ifdef CONFIG_NVDIMM + DEP_LIB(libnvdimm.so), +#endif NULL } }; diff --git a/src/include/usr/isteps/nvdimm/nvdimm.H b/src/include/usr/isteps/nvdimm/nvdimm.H new file mode 100644 index 000000000..3c448a9ac --- /dev/null +++ b/src/include/usr/isteps/nvdimm/nvdimm.H @@ -0,0 +1,48 @@ +/* IBM_PROLOG_BEGIN_TAG */ +/* This is an automatically generated prolog. */ +/* */ +/* $Source: src/include/usr/isteps/nvdimm/nvdimm.H $ */ +/* */ +/* OpenPOWER HostBoot Project */ +/* */ +/* Contributors Listed Below - COPYRIGHT 2018 */ +/* [+] 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 NVDIMM_H__ +#define NVDIMM_H__ + +#include <targeting/common/util.H> + +namespace NVDIMM +{ + +/** + * @brief Entry function to NVDIMM management + * - Restore image from NVDIMM NAND flash to DRAM + * - Arms the backup trigger to ddr_reset_n once the restore + * is completed + * - Erase image + * + * @param[in] i_nvdimmList - list of nvdimm targets + * + **/ +void nvdimm_restore(TARGETING::TargetHandleList &i_nvdimmList); + +} + +#endif // NVDIMM_H__ + |

