aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorShilpasri G Bhat <shilpa.bhat@linux.vnet.ibm.com>2017-07-28 00:45:26 +0530
committerStewart Smith <stewart@linux.vnet.ibm.com>2017-07-28 14:53:19 +1000
commit1f687a3fd083ed3888c3c0d609cd314ffbab01aa (patch)
tree5506cccfa34ce2b6c97841feef8a15edaae44160 /include
parenta3abac2f66e1dd9f50b6a0c034abce3be5e1a104 (diff)
downloadskiboot-1f687a3fd083ed3888c3c0d609cd314ffbab01aa.zip
skiboot-1f687a3fd083ed3888c3c0d609cd314ffbab01aa.tar.gz
skiboot-1f687a3fd083ed3888c3c0d609cd314ffbab01aa.tar.bz2
occ: Add support for OPAL-OCC command/response interface
This patch adds support for a shared memory based command/response interface between OCC and OPAL. In HOMER, there is an OPAL command buffer and an OCC response buffer which is used to send inband commands to OCC. The OPAL-OCC command/response sequence is as follows: 1. Check if both 'OCC Progress' bit in OCC response flag and 'Cmd Ready' bit in OPAL command flag are set to zero. If yes then proceed with below steps to send a command to OCC. 2. Write the command value, request ID and command specific data to the OPAL command buffer. 3. Clear the response flag and set the 'Cmd Ready' bit in OPAL command flag to indicate command is ready. 4. OCC will poll the command flag every 4ms to check if 'Cmd Ready' bit is set by OPAL. If the bit is set then OCC will set the 'OCC Progress' bit. 5. OCC will process the command and write the response to the OCC response buffer and set the 'Rsp Ready' bit in the response flag and sends an interrupt. 8. OPAL will receive the interrupt and queue the response to the host. Signed-off-by: Shilpasri G Bhat <shilpa.bhat@linux.vnet.ibm.com> Reviewed-by: Cyril Bur <cyril.bur@au1.ibm.com> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
Diffstat (limited to 'include')
-rw-r--r--include/opal-api.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/include/opal-api.h b/include/opal-api.h
index 2a8816a..d2137d6 100644
--- a/include/opal-api.h
+++ b/include/opal-api.h
@@ -55,6 +55,7 @@
#define OPAL_XSCOM_CTR_OFFLINED -30
#define OPAL_XIVE_PROVISIONING -31
#define OPAL_XIVE_FREE_ACTIVE -32
+#define OPAL_TIMEOUT -33
/* API Tokens (in r0) */
#define OPAL_INVALID_CALL -1