aboutsummaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
authorHaren Myneni <haren@linux.vnet.ibm.com>2018-06-06 00:38:20 -0700
committerStewart Smith <stewart@linux.ibm.com>2018-06-19 15:33:51 +1000
commite4f0860c4372786f7fe959e7a7807740e68dc9d3 (patch)
tree4ab523b8306c64736eb80438f0239d1e2e0c7bd7 /doc
parentf4a95d7e1dd50ff5e33a8b7bfa0a8acdf3432a46 (diff)
downloadskiboot-e4f0860c4372786f7fe959e7a7807740e68dc9d3.zip
skiboot-e4f0860c4372786f7fe959e7a7807740e68dc9d3.tar.gz
skiboot-e4f0860c4372786f7fe959e7a7807740e68dc9d3.tar.bz2
NX: Add NX coprocessor init opal call
The read offset (4:11) in Receive FIFO control register is incremented by FIFO size whenever CRB read by NX. But the index in RxFIFO has to match with the corresponding entry in FIFO maintained by VAS in kernel. VAS entry is reset to 0 when opening the receive window during driver initialization. So when NX842 is reloaded or in kexec boot, possibility of mismatch between RxFIFO control register and VAS entries in kernel. It could cause CRB failure / timeout from NX. This patch adds nx_coproc_init opal call for kernel to initialize readOffset (4:11) and Queued (15:23) in RxFIFO control register. Fixes: 3b3c5962f432 ("NX: Add P9 NX support for 842 compression engine") CC: stable # v5.8+ Signed-off-by: Haren Myneni <haren@us.ibm.com> Signed-off-by: Stewart Smith <stewart@linux.ibm.com> (cherry picked from commit 56026a13292453b072ad3cc9adf3dee960077f38) Signed-off-by: Stewart Smith <stewart@linux.ibm.com>
Diffstat (limited to 'doc')
-rw-r--r--doc/opal-api/opal_nx_coproc_init-167.rst36
1 files changed, 36 insertions, 0 deletions
diff --git a/doc/opal-api/opal_nx_coproc_init-167.rst b/doc/opal-api/opal_nx_coproc_init-167.rst
new file mode 100644
index 0000000..b22c5a0
--- /dev/null
+++ b/doc/opal-api/opal_nx_coproc_init-167.rst
@@ -0,0 +1,36 @@
+.. _opal_nx_coproc_init:
+
+OPAL_NX_COPROC_INIT
+===================
+
+This OPAL call resets read offset and queued entries in high and normal
+priority receive FIFO control registers. The kernel initializes read
+offset entry in RXFIFO that it maintains during initialization. So this
+register reset is needed for NX module reload or in kexec boot to make sure
+read offset value matches with kernel entries. Otherwise NX reads requests
+with wrong offset in RxFIFO which could cause NX request failures.
+
+The kernel initiates this call for each coprocessor type such as 842 and
+GZIP per NX instance.
+
+Arguments
+---------
+::
+
+ ``uint32_t chip_id``
+ Contains value of the chip number identified at boot time.
+
+ ``uint32_t pid``
+ Contains NX coprocessor type (pid from the device tree).
+
+Returns
+-------
+OPAL_SUCCESS
+ The call to reset readOffset and queued entries for high and normal
+ FIFOs was successful.
+
+OPAL_PARAMETER
+ Indicates invalid chip ID or NX coprocessor type.
+
+OPAL_UNSUPPORTED
+ Not supported on P7 and P8.