summaryrefslogtreecommitdiffstats
path: root/src/include/usr/devicefw/userif.H
diff options
context:
space:
mode:
authorMatt Derksen <mderkse1@us.ibm.com>2019-06-27 15:03:42 -0500
committerDaniel M Crowell <dcrowell@us.ibm.com>2020-01-20 10:23:06 -0600
commit829e56fb1456d699806f8e69ebddf7835c1ae633 (patch)
tree1b92407305312ea3983f817c45866e8d98755ec6 /src/include/usr/devicefw/userif.H
parent1cb00f7e0e9c6cd2646d7e0245a5f22ecf97ab0c (diff)
downloadtalos-hostboot-829e56fb1456d699806f8e69ebddf7835c1ae633.tar.gz
talos-hostboot-829e56fb1456d699806f8e69ebddf7835c1ae633.zip
NVDIMM: Use block write for nvdimm update
In an effort to speed up the nvdimm update, full 32-byte blocks can now be sent via I2C SMBUS with no initial byte count byte. Since a block write seems more prone to random system interrupt, this code should be restricted to run on v3.A or beyond which has the timeout increased to mitigate these interrupts. Test results have shown about a 5 minute improvement per NVDIMM. Change-Id: I040a5f2cc5afb76a73129ef9f6ac965cf36775f4 CQ: SW471053 Reviewed-on: http://rchgit01.rchland.ibm.com/gerrit1/79678 Reviewed-by: Corey V Swenson <cswenson@us.ibm.com> Tested-by: Jenkins Server <pfd-jenkins+hostboot@us.ibm.com> Reviewed-by: TSUNG K YEUNG <tyeung@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> 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/devicefw/userif.H')
-rw-r--r--src/include/usr/devicefw/userif.H19
1 files changed, 17 insertions, 2 deletions
diff --git a/src/include/usr/devicefw/userif.H b/src/include/usr/devicefw/userif.H
index 772511566..ec94bef32 100644
--- a/src/include/usr/devicefw/userif.H
+++ b/src/include/usr/devicefw/userif.H
@@ -5,7 +5,7 @@
/* */
/* OpenPOWER HostBoot Project */
/* */
-/* Contributors Listed Below - COPYRIGHT 2011,2019 */
+/* Contributors Listed Below - COPYRIGHT 2011,2020 */
/* [+] Google Inc. */
/* [+] International Business Machines Corp. */
/* */
@@ -393,6 +393,21 @@ namespace DeviceFW
/**
* @brief Construct the device addressing parameters for the
+ * NVDIMM RAW device ops + use block size specified
+ * @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
+ * @param[i] i_blockSize - maximum block size for operation (0 = default size, 2 and 32 valid)
+ */
+ #define DEVICE_NVDIMM_RAW_ADDRESS_WITH_BLOCKSIZE(i_address, i_blockSize)\
+ DeviceFW::NVDIMM_RAW, static_cast<uint64_t>((i_address)), static_cast<uint64_t>((i_blockSize))
+
+ /**
+ * @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,
@@ -403,7 +418,7 @@ namespace DeviceFW
* @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))
+ DEVICE_NVDIMM_RAW_ADDRESS_WITH_BLOCKSIZE(i_address, 0)
/**
* Construct the device addressing parameters for the FAPI I2C operation
OpenPOWER on IntegriCloud