diff options
| author | Roland Veloz <rveloz@us.ibm.com> | 2019-08-01 15:20:55 -0500 |
|---|---|---|
| committer | Daniel M Crowell <dcrowell@us.ibm.com> | 2019-08-09 11:18:40 -0500 |
| commit | 7e5007180bf32c840af3da04d90a398eb02099dd (patch) | |
| tree | 1b3562999ba8eaa4ecc9173574ab6b7d3ee8b5ca /src/include | |
| parent | 86e12de69124ebc932e985fcaca732effa58350f (diff) | |
| download | blackbird-hostboot-7e5007180bf32c840af3da04d90a398eb02099dd.tar.gz blackbird-hostboot-7e5007180bf32c840af3da04d90a398eb02099dd.zip | |
NVDIMM: Fix issue where a deviceRead of a register is returning bad data
The reason the deviceRead is returning bad data, from an NVDIMM register,
is because the register data is segmented across several pages. One must
first set the page correctly before attempting to do a read of a register.
This fix will set the page up correctly before doing a read/write to an
NVDIMM register.
Change-Id: Ic63c8671c0083f1ca243f255a29d1ef4606b7ce5
CQ: SW465917
Reviewed-on: http://rchgit01.rchland.ibm.com/gerrit1/81542
Tested-by: Jenkins Server <pfd-jenkins+hostboot@us.ibm.com>
Tested-by: FSP CI Jenkins <fsp-CI-jenkins+hostboot@us.ibm.com>
Reviewed-by: Matthew Raybuck <matthew.raybuck@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: Matt Derksen <mderkse1@us.ibm.com>
Reviewed-by: Daniel M Crowell <dcrowell@us.ibm.com>
Diffstat (limited to 'src/include')
| -rw-r--r-- | src/include/usr/devicefw/userif.H | 25 |
1 files changed, 22 insertions, 3 deletions
diff --git a/src/include/usr/devicefw/userif.H b/src/include/usr/devicefw/userif.H index d626d49c0..772511566 100644 --- a/src/include/usr/devicefw/userif.H +++ b/src/include/usr/devicefw/userif.H @@ -68,7 +68,8 @@ namespace DeviceFW AHB_SIO, // AST Hostbridge via SIO DVPD, // Direct access memory VPD NODECOMM, // Internode communication - NVDIMM, // Non-volatile DIMM controller access + NVDIMM, // Routes message to non-volatile DIMM controller access + NVDIMM_RAW, // Non-volatile DIMM controller access FAPI_I2C, // FAPI2-triggered i2c accesses MMIO, // Memory Mapped I/O IDEC, // Read and set EC and CHIPID values @@ -379,12 +380,30 @@ namespace DeviceFW static_cast<uint64_t>(( i_mailbox_id )) /** - * Construct the device addressing parameters for the NVDIMM device ops. - * @param[i] i_address - NVDIMM address to internal register + * @brief Construct the device addressing parameters for the + * NVDIMM device ops. + * @details This call includes setting the page based off the address + * and then performing the read/write of that NVDIMM address. + * @see DEVICE_NVDIMM_RAW_ADDRESS for an NVDIMM read/write call without + * page setting. + * @param[i] i_address - NVDIMM address to an internal register */ #define DEVICE_NVDIMM_ADDRESS(i_address)\ DeviceFW::NVDIMM, static_cast<uint64_t>((i_address)) + /** + * @brief Construct the device addressing parameters for the + * NVDIMM RAW device ops. + * @details This a raw call to read/write a NVDIMM address which means it + * will not set the page before it does the read/write call. Hence, + * for this call to work properly, the page must have been set + * properly beforehand. + * @see DEVICE_NVDIMM_ADDRESS for a NVDIMM read/write call with + * page setting. + * @param[i] i_address - NVDIMM address to an internal register + */ + #define DEVICE_NVDIMM_RAW_ADDRESS(i_address)\ + DeviceFW::NVDIMM_RAW, static_cast<uint64_t>((i_address)) /** * Construct the device addressing parameters for the FAPI I2C operation |

