- Dec 23, 2020
-
-
Marco Chiappero authored
This patch includes a missing dependency (CRYPTO_AES) which may lead to an "undefined reference to `aes_expandkey'" linking error. Fixes: 5106dfea ("crypto: qat - add AES-XTS support for QAT GEN4 devices") Reported-by:
kernel test robot <lkp@intel.com> Signed-off-by:
Marco Chiappero <marco.chiappero@intel.com> Signed-off-by:
Herbert Xu <herbert@gondor.apana.org.au>
-
- Dec 11, 2020
-
-
Marco Chiappero authored
Add logic to detect device capabilities in qat_4xxx driver. Read fuses and build the device capabilities mask. This will enable services and handling specific to QAT 4xxx devices. Co-developed-by:
Tomaszx Kowalik <tomaszx.kowalik@intel.com> Signed-off-by:
Tomaszx Kowalik <tomaszx.kowalik@intel.com> Signed-off-by:
Marco Chiappero <marco.chiappero@intel.com> Reviewed-by:
Giovanni Cabiddu <giovanni.cabiddu@intel.com> Signed-off-by:
Giovanni Cabiddu <giovanni.cabiddu@intel.com> Signed-off-by:
Herbert Xu <herbert@gondor.apana.org.au>
-
Marco Chiappero authored
Add handling of AES-XTS specific to QAT GEN4 devices. Co-developed-by:
Tomaszx Kowalik <tomaszx.kowalik@intel.com> Signed-off-by:
Tomaszx Kowalik <tomaszx.kowalik@intel.com> Signed-off-by:
Marco Chiappero <marco.chiappero@intel.com> Reviewed-by:
Giovanni Cabiddu <giovanni.cabiddu@intel.com> Signed-off-by:
Giovanni Cabiddu <giovanni.cabiddu@intel.com> Signed-off-by:
Herbert Xu <herbert@gondor.apana.org.au>
-
Marco Chiappero authored
Add support for AES-CTR for QAT GEN4 devices. Also, introduce the capability ICP_ACCEL_CAPABILITIES_AES_V2 and the helper macro HW_CAP_AES_V2, which allow to distinguish between different HW generations. Co-developed-by:
Tomasz Kowalik <tomaszx.kowalik@intel.com> Signed-off-by:
Tomasz Kowalik <tomaszx.kowalik@intel.com> Co-developed-by:
Mateusz Polrola <mateuszx.potrola@intel.com> Signed-off-by:
Mateusz Polrola <mateuszx.potrola@intel.com> Signed-off-by:
Marco Chiappero <marco.chiappero@intel.com> Reviewed-by:
Giovanni Cabiddu <giovanni.cabiddu@intel.com> Signed-off-by:
Giovanni Cabiddu <giovanni.cabiddu@intel.com> Signed-off-by:
Herbert Xu <herbert@gondor.apana.org.au>
-
- Nov 27, 2020
-
-
kernel test robot authored
Condition !A || A && B is equivalent to !A || B. Generated by: scripts/coccinelle/misc/excluded_middle.cocci Fixes: b76f0ea0 ("coccinelle: misc: add excluded_middle.cocci script") CC: Denis Efremov <efremov@linux.com> Reported-by:
kernel test robot <lkp@intel.com> Signed-off-by:
kernel test robot <lkp@intel.com> Signed-off-by:
Julia Lawall <julia.lawall@inria.fr> Signed-off-by:
Giovanni Cabiddu <giovanni.cabiddu@intel.com> Signed-off-by:
Herbert Xu <herbert@gondor.apana.org.au>
-
- Nov 20, 2020
-
-
Giovanni Cabiddu authored
Add support for QAT 4xxx devices. Signed-off-by:
Giovanni Cabiddu <giovanni.cabiddu@intel.com> Reviewed-by:
Fiona Trahe <fiona.trahe@intel.com> Signed-off-by:
Herbert Xu <herbert@gondor.apana.org.au>
-
Giovanni Cabiddu authored
Add an hook to initialize the vector routing table with the default values before MSIx is enabled. The new function set_msix_rttable() is called only if present in the struct adf_hw_device_data of the device. This is to allow for QAT devices that do not support that functionality. Signed-off-by:
Giovanni Cabiddu <giovanni.cabiddu@intel.com> Reviewed-by:
Fiona Trahe <fiona.trahe@intel.com> Signed-off-by:
Herbert Xu <herbert@gondor.apana.org.au>
-
Giovanni Cabiddu authored
Introduce support for devices that require multiple firmware images. If a device requires more than a firmware image to operate, load the image to the appropriate Acceleration Engine (AE). Signed-off-by:
Giovanni Cabiddu <giovanni.cabiddu@intel.com> Reviewed-by:
Fiona Trahe <fiona.trahe@intel.com> Signed-off-by:
Herbert Xu <herbert@gondor.apana.org.au>
-
Eric Biggers authored
Currently <crypto/sha.h> contains declarations for both SHA-1 and SHA-2, and <crypto/sha3.h> contains declarations for SHA-3. This organization is inconsistent, but more importantly SHA-1 is no longer considered to be cryptographically secure. So to the extent possible, SHA-1 shouldn't be grouped together with any of the other SHA versions, and usage of it should be phased out. Therefore, split <crypto/sha.h> into two headers <crypto/sha1.h> and <crypto/sha2.h>, and make everyone explicitly specify whether they want the declarations for SHA-1, SHA-2, or both. This avoids making the SHA-1 declarations visible to files that don't want anything to do with SHA-1. It also prepares for potentially moving sha1.h into a new insecure/ or dangerous/ directory. Signed-off-by:
Eric Biggers <ebiggers@google.com> Acked-by:
Ard Biesheuvel <ardb@kernel.org> Acked-by:
Jason A. Donenfeld <Jason@zx2c4.com> Signed-off-by:
Herbert Xu <herbert@gondor.apana.org.au>
-
- Nov 13, 2020
-
-
Jack Xu authored
Add support for the QAT gen4 devices in the firmware loader. Signed-off-by:
Jack Xu <jack.xu@intel.com> Reviewed-by:
Giovanni Cabiddu <giovanni.cabiddu@intel.com> Signed-off-by:
Herbert Xu <herbert@gondor.apana.org.au>
-
Jack Xu authored
Add support for broadcasting mode in firmware loader to enable the next generation of QAT devices. Signed-off-by:
Jack Xu <jack.xu@intel.com> Co-developed-by:
Wojciech Ziemba <wojciech.ziemba@intel.com> Signed-off-by:
Wojciech Ziemba <wojciech.ziemba@intel.com> Reviewed-by:
Giovanni Cabiddu <giovanni.cabiddu@intel.com> Signed-off-by:
Herbert Xu <herbert@gondor.apana.org.au>
-
Jack Xu authored
Add support for shared ustore mode support. This is required by the next generation of QAT devices to share the same fw image across engines. Signed-off-by:
Jack Xu <jack.xu@intel.com> Co-developed-by:
Wojciech Ziemba <wojciech.ziemba@intel.com> Signed-off-by:
Wojciech Ziemba <wojciech.ziemba@intel.com> Reviewed-by:
Giovanni Cabiddu <giovanni.cabiddu@intel.com> Signed-off-by:
Herbert Xu <herbert@gondor.apana.org.au>
-
Jack Xu authored
Introduce new API, qat_uclo_set_cfg_ae_mask(), to allow the load of the firmware image to a subset of Acceleration Engines (AEs). This is required by the next generation of QAT devices to be able to load different firmware images to the device. Signed-off-by:
Jack Xu <jack.xu@intel.com> Reviewed-by:
Giovanni Cabiddu <giovanni.cabiddu@intel.com> Signed-off-by:
Herbert Xu <herbert@gondor.apana.org.au>
-
Jack Xu authored
Add firmware control unit (FCU) CSRs to chip info so the firmware authentication code is common between all devices. Signed-off-by:
Jack Xu <jack.xu@intel.com> Co-developed-by:
Wojciech Ziemba <wojciech.ziemba@intel.com> Signed-off-by:
Wojciech Ziemba <wojciech.ziemba@intel.com> Reviewed-by:
Giovanni Cabiddu <giovanni.cabiddu@intel.com> Signed-off-by:
Herbert Xu <herbert@gondor.apana.org.au>
-
Jack Xu authored
Add support for CSS3K, which uses RSA3K as image signature algorithm, to support the next generation of QAT devices. Signed-off-by:
Jack Xu <jack.xu@intel.com> Co-developed-by:
Wojciech Ziemba <wojciech.ziemba@intel.com> Signed-off-by:
Wojciech Ziemba <wojciech.ziemba@intel.com> Reviewed-by:
Giovanni Cabiddu <giovanni.cabiddu@intel.com> Signed-off-by:
Herbert Xu <herbert@gondor.apana.org.au>
-
Jack Xu authored
Use ae_mask to decide which Accelerator Engine (AE) to target in AE related operations, instead of a sequential loop, to skip AEs that are fused out. Signed-off-by:
Jack Xu <jack.xu@intel.com> Co-developed-by:
Wojciech Ziemba <wojciech.ziemba@intel.com> Signed-off-by:
Wojciech Ziemba <wojciech.ziemba@intel.com> Reviewed-by:
Giovanni Cabiddu <giovanni.cabiddu@intel.com> Signed-off-by:
Herbert Xu <herbert@gondor.apana.org.au>
-
Jack Xu authored
Add null pointer check when freeing the memory for firmware. Signed-off-by:
Jack Xu <jack.xu@intel.com> Co-developed-by:
Wojciech Ziemba <wojciech.ziemba@intel.com> Signed-off-by:
Wojciech Ziemba <wojciech.ziemba@intel.com> Signed-off-by:
Herbert Xu <herbert@gondor.apana.org.au>
-
Jack Xu authored
Add misc control CSR to chip info since the CSR offset will be different in the next generation of QAT devices. Signed-off-by:
Jack Xu <jack.xu@intel.com> Co-developed-by:
Wojciech Ziemba <wojciech.ziemba@intel.com> Signed-off-by:
Wojciech Ziemba <wojciech.ziemba@intel.com> Reviewed-by:
Giovanni Cabiddu <giovanni.cabiddu@intel.com> Signed-off-by:
Herbert Xu <herbert@gondor.apana.org.au>
-
Jack Xu authored
Add the wake up event to chip info since this value will be different in the next generation of QAT devices. Signed-off-by:
Jack Xu <jack.xu@intel.com> Co-developed-by:
Wojciech Ziemba <wojciech.ziemba@intel.com> Signed-off-by:
Wojciech Ziemba <wojciech.ziemba@intel.com> Reviewed-by:
Giovanni Cabiddu <giovanni.cabiddu@intel.com> Signed-off-by:
Herbert Xu <herbert@gondor.apana.org.au>
-
Jack Xu authored
Add global clock enable CSR to the chip info since the CSR offset will be different in the next generation of QAT devices. Signed-off-by:
Jack Xu <jack.xu@intel.com> Co-developed-by:
Wojciech Ziemba <wojciech.ziemba@intel.com> Signed-off-by:
Wojciech Ziemba <wojciech.ziemba@intel.com> Reviewed-by:
Giovanni Cabiddu <giovanni.cabiddu@intel.com> Signed-off-by:
Herbert Xu <herbert@gondor.apana.org.au>
-
Jack Xu authored
Add reset CSR offset and mask to chip info since they are different in new QAT devices. This also simplifies the reset/clrReset functions by using the reset mask. Signed-off-by:
Jack Xu <jack.xu@intel.com> Co-developed-by:
Wojciech Ziemba <wojciech.ziemba@intel.com> Signed-off-by:
Wojciech Ziemba <wojciech.ziemba@intel.com> Reviewed-by:
Giovanni Cabiddu <giovanni.cabiddu@intel.com> Signed-off-by:
Herbert Xu <herbert@gondor.apana.org.au>
-
Jack Xu authored
Add the local memory size to the chip info since the size of this memory will be different in the next generation of QAT devices. Signed-off-by:
Jack Xu <jack.xu@intel.com> Co-developed-by:
Wojciech Ziemba <wojciech.ziemba@intel.com> Signed-off-by:
Wojciech Ziemba <wojciech.ziemba@intel.com> Reviewed-by:
Giovanni Cabiddu <giovanni.cabiddu@intel.com> Signed-off-by:
Herbert Xu <herbert@gondor.apana.org.au>
-
Jack Xu authored
Add support for local memory lm2 and lm3 which is introduced in the next generation of QAT devices. Signed-off-by:
Jack Xu <jack.xu@intel.com> Co-developed-by:
Wojciech Ziemba <wojciech.ziemba@intel.com> Signed-off-by:
Wojciech Ziemba <wojciech.ziemba@intel.com> Reviewed-by:
Giovanni Cabiddu <giovanni.cabiddu@intel.com> Signed-off-by:
Herbert Xu <herbert@gondor.apana.org.au>
-
Jack Xu authored
Introduce the next neighbor (NN) capability in chip_info as NN registers are not supported in certain SKUs of QAT. Signed-off-by:
Jack Xu <jack.xu@intel.com> Co-developed-by:
Wojciech Ziemba <wojciech.ziemba@intel.com> Signed-off-by:
Wojciech Ziemba <wojciech.ziemba@intel.com> Reviewed-by:
Giovanni Cabiddu <giovanni.cabiddu@intel.com> Signed-off-by:
Herbert Xu <herbert@gondor.apana.org.au>
-
Jack Xu authored
Modify condition in qat_uclo_wr_mimage() to use a capability of the device (sram_visible), rather than the device ID, so the check is not specific to devices of the same type. Signed-off-by:
Jack Xu <jack.xu@intel.com> Co-developed-by:
Wojciech Ziemba <wojciech.ziemba@intel.com> Signed-off-by:
Wojciech Ziemba <wojciech.ziemba@intel.com> Reviewed-by:
Giovanni Cabiddu <giovanni.cabiddu@intel.com> Signed-off-by:
Herbert Xu <herbert@gondor.apana.org.au>
-
Jack Xu authored
Introduce the chip info structure which contains device specific information. The initialization path has been split between common and hardware specific in order to facilitate the introduction of the next generation hardware. Signed-off-by:
Jack Xu <jack.xu@intel.com> Co-developed-by:
Wojciech Ziemba <wojciech.ziemba@intel.com> Signed-off-by:
Wojciech Ziemba <wojciech.ziemba@intel.com> Reviewed-by:
Giovanni Cabiddu <giovanni.cabiddu@intel.com> Signed-off-by:
Herbert Xu <herbert@gondor.apana.org.au>
-
Jack Xu authored
Replace long expressions with local variables in the functions qat_uclo_wr_uimage_page(), qat_uclo_init_globals() and qat_uclo_init_umem_seg() to improve readability. Signed-off-by:
Jack Xu <jack.xu@intel.com> Co-developed-by:
Wojciech Ziemba <wojciech.ziemba@intel.com> Signed-off-by:
Wojciech Ziemba <wojciech.ziemba@intel.com> Reviewed-by:
Giovanni Cabiddu <giovanni.cabiddu@intel.com> Signed-off-by:
Herbert Xu <herbert@gondor.apana.org.au>
-
Jack Xu authored
Refactor qat_uclo_set_ae_mode() by moving the logic that sets the AE modes to a separate function, qat_hal_set_modes(). Signed-off-by:
Jack Xu <jack.xu@intel.com> Co-developed-by:
Wojciech Ziemba <wojciech.ziemba@intel.com> Signed-off-by:
Wojciech Ziemba <wojciech.ziemba@intel.com> Reviewed-by:
Giovanni Cabiddu <giovanni.cabiddu@intel.com> Signed-off-by:
Herbert Xu <herbert@gondor.apana.org.au>
-
Jack Xu authored
Move the definition of ICP_QAT_AE_OFFSET, ICP_QAT_CAP_OFFSET, LOCAL_TO_XFER_REG_OFFSET and ICP_QAT_EP_OFFSET from qat_hal.c to icp_qat_hal.h to avoid the definition of generation specific constants in qat_hal.c. Signed-off-by:
Jack Xu <jack.xu@intel.com> Co-developed-by:
Wojciech Ziemba <wojciech.ziemba@intel.com> Signed-off-by:
Wojciech Ziemba <wojciech.ziemba@intel.com> Reviewed-by:
Giovanni Cabiddu <giovanni.cabiddu@intel.com> Signed-off-by:
Herbert Xu <herbert@gondor.apana.org.au>
-
Jack Xu authored
Include the offset of GLOBAL_CSR directly into the enum hal_global_csr and remove the macros SET_GLB_CSR/GET_GLB_CSR to simplify the global CSR access. Signed-off-by:
Jack Xu <jack.xu@intel.com> Co-developed-by:
Wojciech Ziemba <wojciech.ziemba@intel.com> Signed-off-by:
Wojciech Ziemba <wojciech.ziemba@intel.com> Reviewed-by:
Giovanni Cabiddu <giovanni.cabiddu@intel.com> Signed-off-by:
Herbert Xu <herbert@gondor.apana.org.au>
-
Jack Xu authored
Change the API and the behaviour of the qat_hal_start() function. With this change, the function starts under the hood all acceleration engines (AEs) and there is no longer need to call it for each engine. Signed-off-by:
Jack Xu <jack.xu@intel.com> Co-developed-by:
Wojciech Ziemba <wojciech.ziemba@intel.com> Signed-off-by:
Wojciech Ziemba <wojciech.ziemba@intel.com> Reviewed-by:
Giovanni Cabiddu <giovanni.cabiddu@intel.com> Signed-off-by:
Herbert Xu <herbert@gondor.apana.org.au>
-
Jack Xu authored
Change micro word data mask since the Acceleration Engine (AE) instruction codes have been changed in the new generation QAT devices. Signed-off-by:
Jack Xu <jack.xu@intel.com> Co-developed-by:
Wojciech Ziemba <wojciech.ziemba@intel.com> Signed-off-by:
Wojciech Ziemba <wojciech.ziemba@intel.com> Reviewed-by:
Giovanni Cabiddu <giovanni.cabiddu@intel.com> Signed-off-by:
Herbert Xu <herbert@gondor.apana.org.au>
-
Jack Xu authored
Change type for ctx_mask from unsigned char to unsigned long to avoid type casting. Signed-off-by:
Jack Xu <jack.xu@intel.com> Co-developed-by:
Wojciech Ziemba <wojciech.ziemba@intel.com> Signed-off-by:
Wojciech Ziemba <wojciech.ziemba@intel.com> Reviewed-by:
Giovanni Cabiddu <giovanni.cabiddu@intel.com> Signed-off-by:
Herbert Xu <herbert@gondor.apana.org.au>
-
Jack Xu authored
Improve the way micro instructions (FW code) are uploaded to Accelerator Engines (AEs). If code starts at PC zero (absolute addressing), read uwords with no relative address. Otherwise, use relative addressing to the page region. Signed-off-by:
Jack Xu <jack.xu@intel.com> Co-developed-by:
Wojciech Ziemba <wojciech.ziemba@intel.com> Signed-off-by:
Wojciech Ziemba <wojciech.ziemba@intel.com> Reviewed-by:
Giovanni Cabiddu <giovanni.cabiddu@intel.com> Signed-off-by:
Herbert Xu <herbert@gondor.apana.org.au>
-
Jack Xu authored
Rename the function qat_uclo_del_uof_obj() in qat_uclo_del_obj() since it frees the memory allocated for all firmware objects. Signed-off-by:
Jack Xu <jack.xu@intel.com> Co-developed-by:
Wojciech Ziemba <wojciech.ziemba@intel.com> Signed-off-by:
Wojciech Ziemba <wojciech.ziemba@intel.com> Reviewed-by:
Giovanni Cabiddu <giovanni.cabiddu@intel.com> Signed-off-by:
Herbert Xu <herbert@gondor.apana.org.au>
-
Jack Xu authored
Introduce additional parenthesis to resolve a warninga reported by checkpatch. Signed-off-by:
Jack Xu <jack.xu@intel.com> Co-developed-by:
Wojciech Ziemba <wojciech.ziemba@intel.com> Signed-off-by:
Wojciech Ziemba <wojciech.ziemba@intel.com> Reviewed-by:
Giovanni Cabiddu <giovanni.cabiddu@intel.com> Signed-off-by:
Herbert Xu <herbert@gondor.apana.org.au>
-
Jack Xu authored
Remove unnecessary parenthesis across the firmware loader. Signed-off-by:
Jack Xu <jack.xu@intel.com> Co-developed-by:
Wojciech Ziemba <wojciech.ziemba@intel.com> Signed-off-by:
Wojciech Ziemba <wojciech.ziemba@intel.com> Reviewed-by:
Giovanni Cabiddu <giovanni.cabiddu@intel.com> Signed-off-by:
Herbert Xu <herbert@gondor.apana.org.au>
-
Jack Xu authored
Change message in error path of qat_uclo_check_image_compat() to report an incompatible firmware image that contains a neighbor register table. Signed-off-by:
Jack Xu <jack.xu@intel.com> Co-developed-by:
Wojciech Ziemba <wojciech.ziemba@intel.com> Signed-off-by:
Wojciech Ziemba <wojciech.ziemba@intel.com> Reviewed-by:
Giovanni Cabiddu <giovanni.cabiddu@intel.com> Signed-off-by:
Herbert Xu <herbert@gondor.apana.org.au>
-
Jack Xu authored
Do not mask the AE number with the AE mask when accessing the AE local CSRs. Bit 12 of the local CSR address is the start of AE number so just take out the AE mask here. Signed-off-by:
Jack Xu <jack.xu@intel.com> Reviewed-by:
Giovanni Cabiddu <giovanni.cabiddu@intel.com> Signed-off-by:
Herbert Xu <herbert@gondor.apana.org.au>
-
Jack Xu authored
The return value of qat_hal_rd_ae_csr() is always a CSR value and never a status and should not be stored in the status variable of qat_hal_put_rel_rd_xfer(). This removes the assignment as qat_hal_rd_ae_csr() is not expected to fail. A more comprehensive handling of the theoretical corner case which could result in a fail will be submitted in a separate patch. Fixes: 8c9478a4 ("crypto: qat - reduce stack size with KASAN") Signed-off-by:
Jack Xu <jack.xu@intel.com> Reviewed-by:
Giovanni Cabiddu <giovanni.cabiddu@intel.com> Reviewed-by:
Fiona Trahe <fiona.trahe@intel.com> Signed-off-by:
Herbert Xu <herbert@gondor.apana.org.au>
-