aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/include/linux/firmware/intel/stratix10-smc.h
diff options
context:
space:
mode:
authorAng Tien Sung <tien.sung.ang@intel.com>2022-07-11 17:31:36 -0500
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2022-07-14 16:55:09 +0200
commit79b936254aa0eb4e3bc73fecaacf049145613c0a (patch)
tree46a61b4489980cbad470e66bf2557f237c9376bf /include/linux/firmware/intel/stratix10-smc.h
parentfirmware: stratix10-svc: Add support for FCS (diff)
downloadwireguard-linux-79b936254aa0eb4e3bc73fecaacf049145613c0a.tar.xz
wireguard-linux-79b936254aa0eb4e3bc73fecaacf049145613c0a.zip
firmware: stratix10-svc: add FCS polling command
Introduce a new SMC command INTEL_SIP_SMC_FUNCID_SERVICE_COMPLETED that polls if a previous asynchronous command was completed. This SMC command is used by the new FPGA Crypto Service (FCS). A basic example is that the FCS sends an AES data encryption call to the secure device manager(SDM) and waits for the completion of the operation by continuously polling the results with the new command. Signed-off-by: Ang Tien Sung <tien.sung.ang@intel.com> Signed-off-by: Dinh Nguyen <dinguyen@kernel.org> Link: https://lore.kernel.org/r/20220711223140.2307945-2-dinguyen@kernel.org Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'include/linux/firmware/intel/stratix10-smc.h')
-rw-r--r--include/linux/firmware/intel/stratix10-smc.h25
1 files changed, 25 insertions, 0 deletions
diff --git a/include/linux/firmware/intel/stratix10-smc.h b/include/linux/firmware/intel/stratix10-smc.h
index aad497a9ad8b..0de104009566 100644
--- a/include/linux/firmware/intel/stratix10-smc.h
+++ b/include/linux/firmware/intel/stratix10-smc.h
@@ -404,6 +404,31 @@ INTEL_SIP_SMC_FAST_CALL_VAL(INTEL_SIP_SMC_FUNCID_FPGA_CONFIG_COMPLETED_WRITE)
INTEL_SIP_SMC_FAST_CALL_VAL(INTEL_SIP_SMC_FUNCID_RSU_MAX_RETRY)
/**
+ * Request INTEL_SIP_SMC_SERVICE_COMPLETED
+ * Sync call to check if the secure world have completed service request
+ * or not.
+ *
+ * Call register usage:
+ * a0: INTEL_SIP_SMC_SERVICE_COMPLETED
+ * a1: this register is optional. If used, it is the physical address for
+ * secure firmware to put output data
+ * a2: this register is optional. If used, it is the size of output data
+ * a3-a7: not used
+ *
+ * Return status:
+ * a0: INTEL_SIP_SMC_STATUS_OK, INTEL_SIP_SMC_STATUS_ERROR,
+ * INTEL_SIP_SMC_REJECTED or INTEL_SIP_SMC_STATUS_BUSY
+ * a1: mailbox error if a0 is INTEL_SIP_SMC_STATUS_ERROR
+ * a2: physical address containing the process info
+ * for FCS certificate -- the data contains the certificate status
+ * for FCS cryption -- the data contains the actual data size FW processes
+ * a3: output data size
+ */
+#define INTEL_SIP_SMC_FUNCID_SERVICE_COMPLETED 30
+#define INTEL_SIP_SMC_SERVICE_COMPLETED \
+ INTEL_SIP_SMC_FAST_CALL_VAL(INTEL_SIP_SMC_FUNCID_SERVICE_COMPLETED)
+
+/**
* Request INTEL_SIP_SMC_FIRMWARE_VERSION
*
* Sync call used to query the version of running firmware