| e5070810 | 01-Apr-2026 |
Joachim Foerster <joachim.foerster@missinglinkelectronics.com> |
drivers: versal_net: pki: Enhance status and error checking; be verbose if needed
Mapping all PKI Engine status bits to TEE_ERROR_GENERIC is not suitable in all cases. Especially SIGNATURENOTVALID s
drivers: versal_net: pki: Enhance status and error checking; be verbose if needed
Mapping all PKI Engine status bits to TEE_ERROR_GENERIC is not suitable in all cases. Especially SIGNATURENOTVALID shall be mapped to TEE_ERROR_SIGNATURE_INVALID. TEE_AsymmetricVerifyDigest() requires this to work properly.
Moreover, this commit tries to introduce reasonable reporting of errors and unexpected values, in case something goes wrong.
Signed-off-by: Joachim Foerster <joachim.foerster@missinglinkelectronics.com> Reviewed-by: Nathan Menhorn <nathan.menhorn@amd.com> Reviewed-by: Sean McGinn <sean.mcginn@amd.com> Reviewed-by: Lucas Kiker <lucas.kiker@amd.com> Reviewed-by: Sindhu Raveendra <Sindhu.Raveendra@amd.com> Reviewed-by: Clemens Nasenberg <clemens.nasenberg@amd.com> Reviewed-by: Jorge Ramirez-Ortiz <jorge.ramirez@oss.qualcomm.com>
show more ...
|
| bec3cc95 | 09-Feb-2026 |
Joachim Foerster <joachim.foerster@missinglinkelectronics.com> |
drivers: versal_net: pki: Fix queue alignment and DMA setup
The DMA part of the PKI Accelerator seems to support up to 4 equally sized buffers to fetch requests and data from, and to return data to
drivers: versal_net: pki: Fix queue alignment and DMA setup
The DMA part of the PKI Accelerator seems to support up to 4 equally sized buffers to fetch requests and data from, and to return data to (RequestQueue). Such a buffer, also primarily called a "page", needs to be aligned to a certain boundary which is NOT the cache line length!
Experiments showed that natural alignment does work. Thus, since the driver uses a fixed size of 4 KiB (PKI_QUEUE_BUF_SIZE) for these "pages", we enforce alignment to 4 KiB. It remains unknown whether smaller (but bigger than cache line length) alignments do work or not.
Furthermore the DMA setup assumed a "page" size of 64 KiB, defined by the very misleading symbol PKI_RQ_CFG_PAGE_SIZE_1024 with value 0x10, which represents ln2(64KiB). In concert with this, the offset to write data back to (5th descriptor word), also assumed the size of 64 KiB of a page. Since only 4 KiB "pages" have been allocated in the first place, this setup is rather dangerous, since the PKI Accelerator is under the impression that the actual page size is bigger. So, this commit makes the code consistent by using 4 KiB as "page" size in all relevant places.
Signed-off-by: Joachim Foerster <joachim.foerster@missinglinkelectronics.com> Reviewed-by: Nathan Menhorn <nathan.menhorn@amd.com> Tested-by: Nathan Menhorn <nathan.menhorn@amd.com> Reviewed-by: Sean McGinn <sean.mcginn@amd.com> Reviewed-by: Lucas Kiker <lucas.kiker@amd.com> Reviewed-by: Sindhu Raveendra <Sindhu.Raveendra@amd.com> Reviewed-by: Clemens Nasenberg <clemens.nasenberg@amd.com> Reviewed-by: Jorge Ramirez-Ortiz <jorge.ramirez@oss.qualcomm.com>
show more ...
|
| 684b77de | 27-Oct-2025 |
Joachim Foerster <joachim.foerster@missinglinkelectronics.com> |
drivers: versal_net: pki: Add driver for Versal NET PKI Accelerator
The Versal NET variant comes with a dedicated PKI engine. This driver makes use of the engine for ECDSA P-256, P-384, and P-521 si
drivers: versal_net: pki: Add driver for Versal NET PKI Accelerator
The Versal NET variant comes with a dedicated PKI engine. This driver makes use of the engine for ECDSA P-256, P-384, and P-521 sign, verify and key generation operations.
Largely based on previous work by Jeremie Corbier <jeremie.corbier@provenrun.com>.
For now, this commit omits the previous work's direct (memory-mapped) use of one of the dedicated TRNG instances within the PKI Accelerator. Support for it is to be added later. Instead the regular system random number generator is used (=> crypto_rng_read()).
Signed-off-by: Joachim Foerster <joachim.foerster@missinglinkelectronics.com> Reviewed-by: Nathan Menhorn <nathan.menhorn@amd.com> Tested-by: Nathan Menhorn <nathan.menhorn@amd.com> Reviewed-by: Sean McGinn <sean.mcginn@amd.com> Reviewed-by: Lucas Kiker <lucas.kiker@amd.com> Reviewed-by: Sindhu Raveendra <Sindhu.Raveendra@amd.com> Reviewed-by: Clemens Nasenberg <clemens.nasenberg@amd.com> Reviewed-by: Jorge Ramirez-Ortiz <jorge.ramirez@oss.qualcomm.com>
show more ...
|
| b065b2da | 19-Dec-2025 |
Joachim Foerster <joachim.foerster@missinglinkelectronics.com> |
drivers: versal_net: rsa: Add support for flavor-specific command RSA_PRIVATE_DECRYPT
In PLM Firmware release v2024.2 module XilSecure introduced a Versal NET specific variant of API id 0x503 (RSA_P
drivers: versal_net: rsa: Add support for flavor-specific command RSA_PRIVATE_DECRYPT
In PLM Firmware release v2024.2 module XilSecure introduced a Versal NET specific variant of API id 0x503 (RSA_PRIVATE_DECRYPT). In contrast to Versal, XilSecure's XSecure_RsaInParam::KeyAddr is pointing to the structure XSecure_RsaKeyParam instead of directly pointing to the buffer comprising exponent and modulus. XSecure_RsaKeyParam has separate members to point to exponent and modulus.
Signed-off-by: Joachim Foerster <joachim.foerster@missinglinkelectronics.com> Reviewed-by: Nathan Menhorn <nathan.menhorn@amd.com> Tested-by: Nathan Menhorn <nathan.menhorn@amd.com> Reviewed-by: Sean McGinn <sean.mcginn@amd.com> Reviewed-by: Lucas Kiker <lucas.kiker@amd.com> Reviewed-by: Sindhu Raveendra <Sindhu.Raveendra@amd.com> Reviewed-by: Clemens Nasenberg <clemens.nasenberg@amd.com> Reviewed-by: Jorge Ramirez-Ortiz <jorge.ramirez@oss.qualcomm.com>
show more ...
|
| d5d3a276 | 13-Mar-2026 |
Joachim Foerster <joachim.foerster@missinglinkelectronics.com> |
drivers: versal_net: aes: No alignment restrictions for payload on update
Like Versal ACAP, Versal NET platform does not allow zero-length payloads due to limitations in the XilSecure DMA driver. Ho
drivers: versal_net: aes: No alignment restrictions for payload on update
Like Versal ACAP, Versal NET platform does not allow zero-length payloads due to limitations in the XilSecure DMA driver. However, in contrast to Versal ACAP, there are no additional alignment rules in effect.
Signed-off-by: Joachim Foerster <joachim.foerster@missinglinkelectronics.com> Reviewed-by: Nathan Menhorn <nathan.menhorn@amd.com> Tested-by: Nathan Menhorn <nathan.menhorn@amd.com> Reviewed-by: Sean McGinn <sean.mcginn@amd.com> Reviewed-by: Lucas Kiker <lucas.kiker@amd.com> Reviewed-by: Sindhu Raveendra <Sindhu.Raveendra@amd.com> Reviewed-by: Clemens Nasenberg <clemens.nasenberg@amd.com> Reviewed-by: Jorge Ramirez-Ortiz <jorge.ramirez@oss.qualcomm.com>
show more ...
|
| 85b3a313 | 20-Jan-2026 |
Joachim Foerster <joachim.foerster@missinglinkelectronics.com> |
drivers: versal: aes: Fix check for payload length on update
PLM Firmware does not allow zero-length payloads due to limitations in the XilSecure DMA driver. Additionally further alignment rules are
drivers: versal: aes: Fix check for payload length on update
PLM Firmware does not allow zero-length payloads due to limitations in the XilSecure DMA driver. Additionally further alignment rules are in effect, depending on a regular update or a final update.
Signed-off-by: Joachim Foerster <joachim.foerster@missinglinkelectronics.com> Reviewed-by: Nathan Menhorn <nathan.menhorn@amd.com> Tested-by: Nathan Menhorn <nathan.menhorn@amd.com> Reviewed-by: Sean McGinn <sean.mcginn@amd.com> Reviewed-by: Lucas Kiker <lucas.kiker@amd.com> Reviewed-by: Sindhu Raveendra <Sindhu.Raveendra@amd.com> Reviewed-by: Clemens Nasenberg <clemens.nasenberg@amd.com> Reviewed-by: Jorge Ramirez-Ortiz <jorge.ramirez@oss.qualcomm.com>
show more ...
|
| 2dc52456 | 13-Nov-2025 |
Joachim Foerster <joachim.foerster@missinglinkelectronics.com> |
drivers: versal: ecc: Enable support for ECC curve NIST P256
For this to work, Versal PLM Firmware needs to be compiled with XSECURE_ECC_SUPPORT_NIST_P256 defined. Like with XSECURE_ECC_SUPPORT_NIST
drivers: versal: ecc: Enable support for ECC curve NIST P256
For this to work, Versal PLM Firmware needs to be compiled with XSECURE_ECC_SUPPORT_NIST_P256 defined. Like with XSECURE_ECC_SUPPORT_NIST_P521 to support NIST P521. Note that NIST P384 is enabled by default in PLM Firmware.
Signed-off-by: Joachim Foerster <joachim.foerster@missinglinkelectronics.com> Reviewed-by: Nathan Menhorn <nathan.menhorn@amd.com> Tested-by: Nathan Menhorn <nathan.menhorn@amd.com> Reviewed-by: Jorge Ramirez-Ortiz <jorge.ramirez@oss.qualcomm.com> Reviewed-by: Sean McGinn <sean.mcginn@amd.com> Reviewed-by: Lucas Kiker <lucas.kiker@amd.com> Reviewed-by: Sindhu Raveendra <Sindhu.Raveendra@amd.com> Reviewed-by: Clemens Nasenberg <clemens.nasenberg@amd.com>
show more ...
|
| 1220a68b | 24-Apr-2023 |
Jorge Ramirez-Ortiz <jorge@foundries.io> |
crypto: versal: ecc: allow software fallback on key allocation
The driver only supports ECDH/ECDSA key types. Other key types shall be entirely handled by a software implementation enabled at compil
crypto: versal: ecc: allow software fallback on key allocation
The driver only supports ECDH/ECDSA key types. Other key types shall be entirely handled by a software implementation enabled at compile time.
Fixes xtest regression 4006: regression_4006.43 Asym Crypto case 426 algo 0x80000046 line 373
Signed-off-by: Jorge Ramirez-Ortiz <jorge@foundries.io> Acked-by: Etienne Carriere <etienne.carriere@linaro.org>
show more ...
|
| 2234f3c9 | 26-Jan-2023 |
Jorge Ramirez-Ortiz <jorge@foundries.io> |
versal: enable the crypto driver
The crypto driver API provides an extra indirection level to enable different ciphers.
Since Versal ACAP supports acipher and authenc, enable them.
Falling-back to
versal: enable the crypto driver
The crypto driver API provides an extra indirection level to enable different ciphers.
Since Versal ACAP supports acipher and authenc, enable them.
Falling-back to software operations (RSA sign/verify) triggers a fault detection; we will disable this config while a solution is found.
Signed-off-by: Jorge Ramirez-Ortiz <jorge@foundries.io> Acked-by: Jerome Forissier <jerome.forissier@linaro.org> Acked-by: Etienne Carriere <etienne.carriere@linaro.org>
show more ...
|
| 2b83a595 | 01-Feb-2023 |
Jorge Ramirez-Ortiz <jorge@foundries.io> |
crypto: versal: rsa: only support sign/verify operations
RSA encryption/decryption is not supported (the PLM does not return the size of the encrypted/decrypted buffers).
Signed-off-by: Jorge Ramir
crypto: versal: rsa: only support sign/verify operations
RSA encryption/decryption is not supported (the PLM does not return the size of the encrypted/decrypted buffers).
Signed-off-by: Jorge Ramirez-Ortiz <jorge@foundries.io> Acked-by: Etienne Carriere <etienne.carriere@linaro.org>
show more ...
|
| 4502832d | 30-Nov-2022 |
Jorge Ramirez-Ortiz <jorge@foundries.io> |
drivers: versal: SHA3-384 engine support
Enable the PLM controlled SHA3-384 cryptographic engine for TEE core usage.
Since the engine does not have the concept of "context", it can't provide the le
drivers: versal: SHA3-384 engine support
Enable the PLM controlled SHA3-384 cryptographic engine for TEE core usage.
Since the engine does not have the concept of "context", it can't provide the level support required by user-space (multiple parallel contexts) hence why it is being provided just to the core.
Signed-off-by: Jorge Ramirez-Ortiz <jorge@foundries.io> Reviewed-by: Nathan Menhorn <nathan.menhorn@amd.com> Acked-by: Jens Wiklander <jens.wiklander@linaro.org>
show more ...
|
| dc23c448 | 20-Oct-2022 |
Jorge Ramirez-Ortiz <jorge@foundries.io> |
crypto: versal: authentication driver
This driver uses the PLM xilsecure service to deliver authentication functionality using AES-GCM.
The driver currently does not handle unaligned data and lengt
crypto: versal: authentication driver
This driver uses the PLM xilsecure service to deliver authentication functionality using AES-GCM.
The driver currently does not handle unaligned data and lengths; due to this the corresponding xtest regression test will not pass (xtest -t regression 4005 will fail).
Signed-off-by: Jorge Ramirez-Ortiz <jorge@foundries.io> Acked-by: Etienne Carriere <etienne.carriere@linaro.org>
show more ...
|