1f4eed129SHemant Agrawal.. SPDX-License-Identifier: BSD-3-Clause 2f4eed129SHemant Agrawal Copyright 2018 NXP 3f4eed129SHemant Agrawal 4f4eed129SHemant Agrawal 5f4eed129SHemant AgrawalNXP CAAM JOB RING (caam_jr) 6f4eed129SHemant Agrawal=========================== 7f4eed129SHemant Agrawal 8f4eed129SHemant AgrawalThe caam_jr PMD provides poll mode crypto driver support for NXP SEC 4.x+ (CAAM) 9f4eed129SHemant Agrawalhardware accelerator. More information is available at: 10f4eed129SHemant Agrawal 11f4eed129SHemant Agrawal`NXP Cryptographic Acceleration Technology <https://www.nxp.com/applications/solutions/internet-of-things/secure-things/network-security-technology/cryptographic-acceleration-technology:NETWORK_SECURITY_CRYPTOG>`_. 12f4eed129SHemant Agrawal 13f4eed129SHemant AgrawalArchitecture 14f4eed129SHemant Agrawal------------ 15f4eed129SHemant Agrawal 16f4eed129SHemant AgrawalSEC is the SOC's security engine, which serves as NXP's latest cryptographic 17f4eed129SHemant Agrawalacceleration and offloading hardware. It combines functions previously 18f4eed129SHemant Agrawalimplemented in separate modules to create a modular and scalable acceleration 19f4eed129SHemant Agrawaland assurance engine. It also implements block encryption algorithms, stream 20f4eed129SHemant Agrawalcipher algorithms, hashing algorithms, public key algorithms, run-time 21f4eed129SHemant Agrawalintegrity checking, and a hardware random number generator. SEC performs 22f4eed129SHemant Agrawalhigher-level cryptographic operations than previous NXP cryptographic 23f4eed129SHemant Agrawalaccelerators. This provides significant improvement to system level performance. 24f4eed129SHemant Agrawal 25f4eed129SHemant AgrawalSEC HW accelerator above 4.x+ version are also known as CAAM. 26f4eed129SHemant Agrawal 27*b7fe612aSThomas Monjaloncaam_jr PMD is one of DPAA drivers which uses UIO interface to interact with 28f4eed129SHemant AgrawalLinux kernel for configure and destroy the device instance (ring). 29f4eed129SHemant Agrawal 30f4eed129SHemant Agrawal 31f4eed129SHemant AgrawalImplementation 32f4eed129SHemant Agrawal-------------- 33f4eed129SHemant Agrawal 34f4eed129SHemant AgrawalSEC provides platform assurance by working with SecMon, which is a companion 35f4eed129SHemant Agrawallogic block that tracks the security state of the SOC. SEC is programmed by 36f4eed129SHemant Agrawalmeans of descriptors (not to be confused with frame descriptors (FDs)) that 37f4eed129SHemant Agrawalindicate the operations to be performed and link to the message and 38f4eed129SHemant Agrawalassociated data. SEC incorporates two DMA engines to fetch the descriptors, 39f4eed129SHemant Agrawalread the message data, and write the results of the operations. The DMA 40f4eed129SHemant Agrawalengine provides a scatter/gather capability so that SEC can read and write 41f4eed129SHemant Agrawaldata scattered in memory. SEC may be configured by means of software for 42f4eed129SHemant Agrawaldynamic changes in byte ordering. The default configuration for this version 43f4eed129SHemant Agrawalof SEC is little-endian mode. 44f4eed129SHemant Agrawal 45f4eed129SHemant AgrawalNote that one physical Job Ring represent one caam_jr device. 46f4eed129SHemant Agrawal 47f4eed129SHemant AgrawalFeatures 48f4eed129SHemant Agrawal-------- 49f4eed129SHemant Agrawal 50f4eed129SHemant AgrawalThe CAAM_JR PMD has support for: 51f4eed129SHemant Agrawal 52f4eed129SHemant AgrawalCipher algorithms: 53f4eed129SHemant Agrawal 54f4eed129SHemant Agrawal* ``RTE_CRYPTO_CIPHER_3DES_CBC`` 55f4eed129SHemant Agrawal* ``RTE_CRYPTO_CIPHER_AES128_CBC`` 56f4eed129SHemant Agrawal* ``RTE_CRYPTO_CIPHER_AES192_CBC`` 57f4eed129SHemant Agrawal* ``RTE_CRYPTO_CIPHER_AES256_CBC`` 58f4eed129SHemant Agrawal* ``RTE_CRYPTO_CIPHER_AES128_CTR`` 59f4eed129SHemant Agrawal* ``RTE_CRYPTO_CIPHER_AES192_CTR`` 60f4eed129SHemant Agrawal* ``RTE_CRYPTO_CIPHER_AES256_CTR`` 61f4eed129SHemant Agrawal 62f4eed129SHemant AgrawalHash algorithms: 63f4eed129SHemant Agrawal 64f4eed129SHemant Agrawal* ``RTE_CRYPTO_AUTH_SHA1_HMAC`` 65f4eed129SHemant Agrawal* ``RTE_CRYPTO_AUTH_SHA224_HMAC`` 66f4eed129SHemant Agrawal* ``RTE_CRYPTO_AUTH_SHA256_HMAC`` 67f4eed129SHemant Agrawal* ``RTE_CRYPTO_AUTH_SHA384_HMAC`` 68f4eed129SHemant Agrawal* ``RTE_CRYPTO_AUTH_SHA512_HMAC`` 69f4eed129SHemant Agrawal* ``RTE_CRYPTO_AUTH_MD5_HMAC`` 70f4eed129SHemant Agrawal 71f4eed129SHemant AgrawalAEAD algorithms: 72f4eed129SHemant Agrawal 73f4eed129SHemant Agrawal* ``RTE_CRYPTO_AEAD_AES_GCM`` 74f4eed129SHemant Agrawal 75f4eed129SHemant AgrawalSupported DPAA SoCs 76f4eed129SHemant Agrawal-------------------- 77f4eed129SHemant Agrawal 78f4eed129SHemant Agrawal* LS1046A/LS1026A 79f4eed129SHemant Agrawal* LS1043A/LS1023A 80f4eed129SHemant Agrawal* LS1028A 81f4eed129SHemant Agrawal* LS1012A 82f4eed129SHemant Agrawal 83f4eed129SHemant AgrawalLimitations 84f4eed129SHemant Agrawal----------- 85f4eed129SHemant Agrawal 86f4eed129SHemant Agrawal* Hash followed by Cipher mode is not supported 87f4eed129SHemant Agrawal* Only supports the session-oriented API implementation (session-less APIs are not supported). 88f4eed129SHemant Agrawal 89f4eed129SHemant AgrawalPrerequisites 90f4eed129SHemant Agrawal------------- 91f4eed129SHemant Agrawal 92f4eed129SHemant Agrawalcaam_jr driver has following dependencies are not part of DPDK and must be installed separately: 93f4eed129SHemant Agrawal 94f4eed129SHemant Agrawal* **NXP Linux SDK** 95f4eed129SHemant Agrawal 96f4eed129SHemant Agrawal NXP Linux software development kit (SDK) includes support for the family 97f4eed129SHemant Agrawal of QorIQ® ARM-Architecture-based system on chip (SoC) processors 98f4eed129SHemant Agrawal and corresponding boards. 99f4eed129SHemant Agrawal 100f4eed129SHemant Agrawal It includes the Linux board support packages (BSPs) for NXP SoCs, 101f4eed129SHemant Agrawal a fully operational tool chain, kernel and board specific modules. 102f4eed129SHemant Agrawal 103f4eed129SHemant Agrawal SDK and related information can be obtained from: `NXP QorIQ SDK <http://www.nxp.com/products/software-and-tools/run-time-software/linux-sdk/linux-sdk-for-qoriq-processors:SDKLINUX>`_. 104f4eed129SHemant Agrawal 105f4eed129SHemant AgrawalCurrently supported by DPDK: 106f4eed129SHemant Agrawal 107f4eed129SHemant Agrawal* NXP SDK **18.09+**. 108f4eed129SHemant Agrawal* Supported architectures: **arm64 LE**. 109f4eed129SHemant Agrawal 110f4eed129SHemant Agrawal* Follow the DPDK :ref:`Getting Started Guide for Linux <linux_gsg>` to setup the basic DPDK environment. 111f4eed129SHemant Agrawal 112f4eed129SHemant Agrawal 113f4eed129SHemant AgrawalEnabling logs 114f4eed129SHemant Agrawal------------- 115f4eed129SHemant Agrawal 116f4eed129SHemant AgrawalFor enabling logs, use the following EAL parameter: 117f4eed129SHemant Agrawal 118f4eed129SHemant Agrawal.. code-block:: console 119f4eed129SHemant Agrawal 120f4eed129SHemant Agrawal ./your_crypto_application <EAL args> --log-level=pmd.crypto.caam,<level> 121