This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

PROCESSOR-SDK-AM62X: Cryptodev hardware accelerator does not take effect

Part Number: PROCESSOR-SDK-AM62X

Hello,

We follow the link provided below to build and implement the hardware crypto accelerator supported on the AM62X platform. The hardware crypto accelerator driver exists and is loaded, but the hardware acceleration does not take effect. Please help determine why:

https://software-dl.ti.com/processor-sdk-linux/esd/AM62X/09_00_00_03/exports_AM62SIP/docs/linux/Foundational_Components/Kernel/Kernel_Drivers/Crypto.html

Hardware encryption acceleration driver:

root@starcharge:/# lsmod |grep sa2ul
sa2ul 40960 0 - Live 0xffff800008b7e000
sha512_generic 16384 1 sa2ul, Live 0xffff800008b67000
authenc 16384 1 sa2ul, Live 0xffff800008b5f000

Load the cryptodev driver using the devcrypto engine:

root@starcharge:/# openssl speed -evp aes-128-cbc -engine devcrypto
Engine "devcrypto" set.
Doing AES-128-CBC for 3s on 16 size blocks: 17012594 AES-128-CBC's in 2.99s
Doing AES-128-CBC for 3s on 64 size blocks: 13212821 AES-128-CBC's in 2.98s
Doing AES-128-CBC for 3s on 256 size blocks: 6745574 AES-128-CBC's in 2.99s
Doing AES-128-CBC for 3s on 1024 size blocks: 2382058 AES-128-CBC's in 2.99s
Doing AES-128-CBC for 3s on 8192 size blocks: 339642 AES-128-CBC's in 2.98s
Doing AES-128-CBC for 3s on 16384 size blocks: 171445 AES-128-CBC's in 2.99s
version: 3.1.4
built on: Mon Dec 11 08:59:12 2023 UTC
options: bn(64,64)
compiler: aarch64-buildroot-linux-gnu-gcc -fPIC -pthread -Wa,--noexecstack -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -Os -g0 -D_FORTIFY_SOURCE=1 -DOPENSSL_USE_NODELETE -DOPENSSL_PIC -DOPENSSL_BUILDING_OPENSSL -DZLIB -DZLIB_SHARED -DNDEBUG -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64
CPUINFO: OPENSSL_armcap=0xbd
The 'numbers' are in 1000s of bytes per second processed.
type 16 bytes 64 bytes 256 bytes 1024 bytes 8192 bytes 16384 bytes
AES-128-CBC 91037.29k 283765.28k 577547.47k 815795.11k 933673.58k 939449.79k

Remove the cryptodev module:

root@starcharge:/# openssl speed -evp aes-128-cbc
Doing AES-128-CBC for 3s on 16 size blocks: 17042009 AES-128-CBC's in 2.99s
Doing AES-128-CBC for 3s on 64 size blocks: 13235758 AES-128-CBC's in 2.98s
Doing AES-128-CBC for 3s on 256 size blocks: 6743713 AES-128-CBC's in 2.99s
Doing AES-128-CBC for 3s on 1024 size blocks: 2381656 AES-128-CBC's in 2.98s
Doing AES-128-CBC for 3s on 8192 size blocks: 339597 AES-128-CBC's in 2.99s
Doing AES-128-CBC for 3s on 16384 size blocks: 171417 AES-128-CBC's in 2.99s
version: 3.1.4
built on: Mon Dec 11 08:59:12 2023 UTC
options: bn(64,64)
compiler: aarch64-buildroot-linux-gnu-gcc -fPIC -pthread -Wa,--noexecstack -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -Os -g0 -D_FORTIFY_SOURCE=1 -DOPENSSL_USE_NODELETE -DOPENSSL_PIC -DOPENSSL_BUILDING_OPENSSL -DZLIB -DZLIB_SHARED -DNDEBUG -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64
CPUINFO: OPENSSL_armcap=0xbd
The 'numbers' are in 1000s of bytes per second processed.
type 16 bytes 64 bytes 256 bytes 1024 bytes 8192 bytes 16384 bytes
AES-128-CBC 91194.70k 284257.89k 577388.14k 818394.54k 930427.63k 939296.36k

Please help to determine why there is basically no change in performance between using and not using cryptodev?

Regards,

Gary

  • Hi Gary,

    Could you please share the verbose output of these tests with the help of `time -v`

    # with sa2ul
    time -v openssl speed -evp aes-128-cbc -engine devcrypto
    
    # without sa2ul
    time -v openssl speed -evp aes-128-cbc
    

    For reference, following are the logs from the tests done on my TI AM62X HSFS board. The logs shows that the CPU usage was almost 50% less when the openssl was using sa2ul engine.

    root@am62xx-evm:~# time -v openssl speed -evp aes-128-cbc -engine devcrypto
    Engine "devcrypto" set.
    Doing AES-128-CBC for 3s on 16 size blocks: 63085 AES-128-CBC's in 0.10s
    Doing AES-128-CBC for 3s on 64 size blocks: 66531 AES-128-CBC's in 0.08s
    Doing AES-128-CBC for 3s on 256 size blocks: 59120 AES-128-CBC's in 0.07s
    Doing AES-128-CBC for 3s on 1024 size blocks: 49130 AES-128-CBC's in 0.02s
    Doing AES-128-CBC for 3s on 8192 size blocks: 22171 AES-128-CBC's in 0.04s
    Doing AES-128-CBC for 3s on 16384 size blocks: 12943 AES-128-CBC's in 0.03s
    version: 3.0.12
    built on: Tue Oct 24 13:48:41 2023 UTC
    options: bn(64,64)
    compiler: aarch64-oe-linux-gcc  -mbranch-protection=standard --sysroot=recipe-sysroot -O2 -pipe -g -feliminate-unused-debug-types -fmacro-prefix-map=                      -fdebug-prefix-map=                      -fdebug-prefix-map=                      -fdebug-prefix-map=  -DOPENSSL_USE_NODELETE -DOPENSSL_PIC -DOPENSSL_BUILDING_OPENSSL -DNDEBUG
    CPUINFO: OPENSSL_armcap=0xbd
    The 'numbers' are in 1000s of bytes per second processed.
    type             16 bytes     64 bytes    256 bytes   1024 bytes   8192 bytes  16384 bytes
    AES-128-CBC      10093.60k    53224.80k   216210.29k  2515456.00k  4540620.80k  7068603.73k
            Command being timed: "openssl speed -evp aes-128-cbc -engine devcrypto"
            User time (seconds): 0.37
            System time (seconds): 7.49
            Percent of CPU this job got: 43%
            Elapsed (wall clock) time (h:mm:ss or m:ss): 0m 18.16s
            Average shared text size (kbytes): 0
            Average unshared data size (kbytes): 0
            Average stack size (kbytes): 0
            Average total size (kbytes): 0
            Maximum resident set size (kbytes): 23744
            Average resident set size (kbytes): 0
            Major (requiring I/O) page faults: 0
            Minor (reclaiming a frame) page faults: 314
            Voluntary context switches: 273070
            Involuntary context switches: 29
            Swaps: 0
            File system inputs: 0
            File system outputs: 0
            Socket messages sent: 0
            Socket messages received: 0
            Signals delivered: 0
            Page size (bytes): 4096
            Exit status: 0
    root@am62xx-evm:~# time -v openssl speed -evp aes-128-cbc
    Doing AES-128-CBC for 3s on 16 size blocks: 22747996 AES-128-CBC's in 2.99s
    Doing AES-128-CBC for 3s on 64 size blocks: 16963282 AES-128-CBC's in 2.99s
    Doing AES-128-CBC for 3s on 256 size blocks: 8155871 AES-128-CBC's in 3.00s
    Doing AES-128-CBC for 3s on 1024 size blocks: 2753497 AES-128-CBC's in 2.99s
    Doing AES-128-CBC for 3s on 8192 size blocks: 382388 AES-128-CBC's in 3.00s
    Doing AES-128-CBC for 3s on 16384 size blocks: 192330 AES-128-CBC's in 2.99s
    version: 3.0.12
    built on: Tue Oct 24 13:48:41 2023 UTC
    options: bn(64,64)
    compiler: aarch64-oe-linux-gcc  -mbranch-protection=standard --sysroot=recipe-sysroot -O2 -pipe -g -feliminate-unused-debug-types -fmacro-prefix-map=                      -fdebug-prefix-map=                      -fdebug-prefix-map=                      -fdebug-prefix-map=  -DOPENSSL_USE_NODELETE -DOPENSSL_PIC -DOPENSSL_BUILDING_OPENSSL -DNDEBUG
    CPUINFO: OPENSSL_armcap=0xbd
    The 'numbers' are in 1000s of bytes per second processed.
    type             16 bytes     64 bytes    256 bytes   1024 bytes   8192 bytes  16384 bytes
    AES-128-CBC     121728.41k   363093.66k   695967.66k   943003.65k  1044174.17k  1053891.21k
            Command being timed: "openssl speed -evp aes-128-cbc"
            User time (seconds): 17.97
            System time (seconds): 0.00
            Percent of CPU this job got: 99%
            Elapsed (wall clock) time (h:mm:ss or m:ss): 0m 18.02s
            Average shared text size (kbytes): 0
            Average unshared data size (kbytes): 0
            Average stack size (kbytes): 0
            Average total size (kbytes): 0
            Maximum resident set size (kbytes): 23536
            Average resident set size (kbytes): 0
            Major (requiring I/O) page faults: 0
            Minor (reclaiming a frame) page faults: 307
            Voluntary context switches: 1
            Involuntary context switches: 243
            Swaps: 0
            File system inputs: 0
            File system outputs: 0
            Socket messages sent: 0
            Socket messages received: 0
            Signals delivered: 0
            Page size (bytes): 4096
            Exit status: 0
    root@am62xx-evm:~#
    

    Regards,

    Prashant

  • Hello,

    The full output of the test is shown below. The output with and without the engine is basically the same, and there is no decrease in CPU usage.

    root@starcharge:/# time -v openssl speed -evp aes-128-cbc
    Doing AES-128-CBC for 3s on 16 size blocks: 16880834 AES-128-CBC's in 2.98s
    Doing AES-128-CBC for 3s on 64 size blocks: 13149722 AES-128-CBC's in 2.99s
    Doing AES-128-CBC for 3s on 256 size blocks: 6723700 AES-128-CBC's in 2.99s
    Doing AES-128-CBC for 3s on 1024 size blocks: 2380492 AES-128-CBC's in 2.98s
    Doing AES-128-CBC for 3s on 8192 size blocks: 339638 AES-128-CBC's in 2.99s
    Doing AES-128-CBC for 3s on 16384 size blocks: 171439 AES-128-CBC's in 2.99s
    version: 3.1.4
    built on: Mon Dec 11 08:59:12 2023 UTC
    options: bn(64,64)
    compiler: aarch64-buildroot-linux-gnu-gcc -fPIC -pthread -Wa,--noexecstack -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -Os -g0 -D_FORTIFY_SOURCE=1 -DOPENSSL_USE_NODELETE -DOPENSSL_PIC -DOPENSSL_BUILDING_OPENSSL -DZLIB -DZLIB_SHARED -DNDEBUG -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64
    CPUINFO: OPENSSL_armcap=0xbd
    The 'numbers' are in 1000s of bytes per second processed.
    type 16 bytes 64 bytes 256 bytes 1024 bytes 8192 bytes 16384 bytes
    AES-128-CBC 90635.35k 281465.62k 575674.65k 817994.57k 930539.97k 939416.92k
    Command being timed: "openssl speed -evp aes-128-cbc"
    User time (seconds): 17.93
    System time (seconds): 0.01
    Percent of CPU this job got: 99%
    Elapsed (wall clock) time (h:mm:ss or m:ss): 0m 18.04s
    Average shared text size (kbytes): 0
    Average unshared data size (kbytes): 0
    Average stack size (kbytes): 0
    Average total size (kbytes): 0
    Maximum resident set size (kbytes): 22464
    Average resident set size (kbytes): 0
    Major (requiring I/O) page faults: 13
    Minor (reclaiming a frame) page faults: 316
    Voluntary context switches: 9
    Involuntary context switches: 382
    Swaps: 0
    File system inputs: 0
    File system outputs: 0
    Socket messages sent: 0
    Socket messages received: 0
    Signals delivered: 0
    Page size (bytes): 4096
    Exit status: 0
    root@starcharge:/# lsmod |grep sa2ul
    sa2ul 40960 0 - Live 0xffff800008b90000
    sha512_generic 16384 1 sa2ul, Live 0xffff800008b8b000
    authenc 16384 1 sa2ul, Live 0xffff800008b60000
    root@starcharge:/# insmod media/mmcblk0p1/cryptodev.ko
    root@starcharge:/# time -v openssl speed -evp aes-128-cbc -engine devcrypto
    Engine "devcrypto" set.
    Doing AES-128-CBC for 3s on 16 size blocks: 17034714 AES-128-CBC's in 2.99s
    Doing AES-128-CBC for 3s on 64 size blocks: 13238269 AES-128-CBC's in 2.99s
    Doing AES-128-CBC for 3s on 256 size blocks: 6746281 AES-128-CBC's in 2.98s
    Doing AES-128-CBC for 3s on 1024 size blocks: 2381812 AES-128-CBC's in 2.99s
    Doing AES-128-CBC for 3s on 8192 size blocks: 339715 AES-128-CBC's in 2.99s
    Doing AES-128-CBC for 3s on 16384 size blocks: 171454 AES-128-CBC's in 2.98s
    version: 3.1.4
    built on: Mon Dec 11 08:59:12 2023 UTC
    options: bn(64,64)
    compiler: aarch64-buildroot-linux-gnu-gcc -fPIC -pthread -Wa,--noexecstack -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -Os -g0 -D_FORTIFY_SOURCE=1 -DOPENSSL_USE_NODELETE -DOPENSSL_PIC -DOPENSSL_BUILDING_OPENSSL -DZLIB -DZLIB_SHARED -DNDEBUG -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64
    CPUINFO: OPENSSL_armcap=0xbd
    The 'numbers' are in 1000s of bytes per second processed.
    type 16 bytes 64 bytes 256 bytes 1024 bytes 8192 bytes 16384 bytes
    AES-128-CBC 91155.66k 283360.94k 579546.29k 815710.87k 930750.93k 942651.79k
    Command being timed: "openssl speed -evp aes-128-cbc -engine devcrypto"
    User time (seconds): 17.93
    System time (seconds): 0.00
    Percent of CPU this job got: 96%
    Elapsed (wall clock) time (h:mm:ss or m:ss): 0m 18.67s
    Average shared text size (kbytes): 0
    Average unshared data size (kbytes): 0
    Average stack size (kbytes): 0
    Average total size (kbytes): 0
    Maximum resident set size (kbytes): 23024
    Average resident set size (kbytes): 0
    Major (requiring I/O) page faults: 3
    Minor (reclaiming a frame) page faults: 331
    Voluntary context switches: 46
    Involuntary context switches: 419
    Swaps: 0
    File system inputs: 0
    File system outputs: 0
    Socket messages sent: 0
    Socket messages received: 0
    Signals delivered: 0
    Page size (bytes): 4096
    Exit status: 0
    root@starcharge:/#

    In addition, opnessl has commands to check the hardware algorithms supported by the engine. Our AM62X development board shows that the hardware algorithms that are not supported are all software algorithms, as follows:

    root@starcharge:/# openssl engine -pre DUMP_INFO devcrypto
    (devcrypto) /dev/crypto engine
    Information about ciphers supported by the /dev/crypto engine:
    Cipher DES-CBC, NID=31, /dev/crypto info: id=1, driver=cbc(des-generic) (software)
    Cipher DES-EDE3-CBC, NID=44, /dev/crypto info: id=2, driver=cbc(des3_ede-generic) (software)
    Cipher BF-CBC, NID=91, /dev/crypto info: id=3, CIOCGSESSION (session open call) failed
    Cipher CAST5-CBC, NID=108, /dev/crypto info: id=4, CIOCGSESSION (session open call) failed
    Cipher AES-128-CBC, NID=419, /dev/crypto info: id=11, driver=cbc-aes-ce (software)
    Cipher AES-192-CBC, NID=423, /dev/crypto info: id=11, driver=cbc-aes-ce (software)
    Cipher AES-256-CBC, NID=427, /dev/crypto info: id=11, driver=cbc-aes-ce (software)
    Cipher RC4, NID=5, /dev/crypto info: id=12, CIOCGSESSION (session open call) failed
    Cipher AES-128-CTR, NID=904, /dev/crypto info: id=21, driver=ctr-aes-ce (software)
    Cipher AES-192-CTR, NID=905, /dev/crypto info: id=21, driver=ctr-aes-ce (software)
    Cipher AES-256-CTR, NID=906, /dev/crypto info: id=21, driver=ctr-aes-ce (software)
    Cipher AES-128-ECB, NID=418, /dev/crypto info: id=23, driver=ecb-aes-ce (software)
    Cipher AES-192-ECB, NID=422, /dev/crypto info: id=23, driver=ecb-aes-ce (software)
    Cipher AES-256-ECB, NID=426, /dev/crypto info: id=23, driver=ecb-aes-ce (software)
    Cipher CAMELLIA-128-CBC, NID=751, /dev/crypto info: id=101, CIOCGSESSION (session open call) failed
    Cipher CAMELLIA-192-CBC, NID=752, /dev/crypto info: id=101, CIOCGSESSION (session open call) failed
    Cipher CAMELLIA-256-CBC, NID=753, /dev/crypto info: id=101, CIOCGSESSION (session open call) failed
    
    Information about digests supported by the /dev/crypto engine:
    Digest MD5, NID=4, /dev/crypto info: id=13, driver=md5-generic (software), CIOCCPHASH capable
    Digest SHA1, NID=64, /dev/crypto info: id=14, driver=sha1-ce (software), CIOCCPHASH capable
    Digest RIPEMD160, NID=117, /dev/crypto info: id=102, driver=unknown. CIOCGSESSION (session open) failed
    Digest SHA224, NID=675, /dev/crypto info: id=103, driver=sha224-ce (software), CIOCCPHASH capable
    Digest SHA256, NID=672, /dev/crypto info: id=104, driver=sha256-ce (software), CIOCCPHASH capable
    Digest SHA384, NID=673, /dev/crypto info: id=105, driver=sha384-generic (software), CIOCCPHASH capable
    Digest SHA512, NID=674, /dev/crypto info: id=106, driver=sha512-generic (software), CIOCCPHASH capable
    
    [Success]: DUMP_INFO

    Regards,

    Gary

  • Hello Gary,

    Thank you for the logs. Indeed, it looks like the SA2UL hardware acceleration is not working.

    Let us move away from openssl for now to a simpler cipher test available in the cryptodev driver (board-support/extra-drivers/cryptodev-module-*/tests). Simply copy the following two files to the target filesystem: 1) cipher.c & 2) testhelper.h. Then, perform the following procedure:

    root@am62xx-evm:~# ls
    cipher.c  testhelper.h
    root@am62xx-evm:~# gcc -o cipher cipher.c
    root@am62xx-evm:~# modprobe -r sa2ul
    root@am62xx-evm:~# ./cipher -v
    requested cipher CRYPTO_AES_CBC, got cbc(aes) with driver cbc-aes-ce
    AES Test passed
    requested cipher CRYPTO_AES_CBC, got cbc(aes) with driver cbc-aes-ce
    requested cipher CRYPTO_AES_CBC, got cbc(aes) with driver cbc-aes-ce
    Test passed
    root@am62xx-evm:~# modprobe sa2ul
    root@am62xx-evm:~# ./cipher -v
    requested cipher CRYPTO_AES_CBC, got cbc(aes) with driver cbc-aes-sa2ul
    AES Test passed
    requested cipher CRYPTO_AES_CBC, got cbc(aes) with driver cbc-aes-sa2ul
    requested cipher CRYPTO_AES_CBC, got cbc(aes) with driver cbc-aes-sa2ul
    Test passed
    root@am62xx-evm:~#

    The above logs shows that on disabling the SA2UL module the test was performed using the software algorithm while on loading the SA2UL module the test was performed using the SA2UL hardware accelerator.

    Regards,

    Prashant

  • Hello,

    The test operation according to you is as follows:

    root@starcharge:/media/mmcblk0p1/crypto# modprobe -r sa2ul
    root@starcharge:/media/mmcblk0p1/crypto# ./cipher -v
    -sh: ./cipher: Permission denied
    root@starcharge:/media/mmcblk0p1/crypto# chmod +x cipher
    root@starcharge:/media/mmcblk0p1/crypto# ./cipher -v
    open(/dev/crypto): No such file or directory
    root@starcharge:/media/mmcblk0p1/crypto# insmod cryptodev.ko
    root@starcharge:/media/mmcblk0p1/crypto# ./cipher -v
    requested cipher CRYPTO_AES_CBC, got cbc(aes) with driver cbc-aes-ce
    AES Test passed
    requested cipher CRYPTO_AES_CBC, got cbc(aes) with driver cbc-aes-ce
    requested cipher CRYPTO_AES_CBC, got cbc(aes) with driver cbc-aes-ce
    Test passed
    root@starcharge:/media/mmcblk0p1/crypto# modprobe sa2ul
    root@starcharge:/media/mmcblk0p1/crypto# ./cipher -v
    requested cipher CRYPTO_AES_CBC, got cbc(aes) with driver cbc-aes-ce
    AES Test passed
    requested cipher CRYPTO_AES_CBC, got cbc(aes) with driver cbc-aes-ce
    requested cipher CRYPTO_AES_CBC, got cbc(aes) with driver cbc-aes-ce
    Test passed

    As can be seen from the above log, no matter whether the SA2UL module is loaded or not, there are only software algorithms, which, as I told you before, cannot find the algorithms implemented in the SA2UL driver, as follows

    root@starcharge:/# lsmod |grep sa2ul
    sa2ul 40960 0 - Live 0xffff800008d41000
    sha512_generic 16384 1 sa2ul, Live 0xffff800008d36000
    authenc 16384 1 sa2ul, Live 0xffff800008b51000
    root@starcharge:/# cat proc/crypto |grep sa2ul
    root@starcharge:/#

    Regards,

    Gary

  • Hello Gary,

    Thank you for doing the test. This mostly looks like an issue with the SA2UL driver itself.

    Could you please let me know if you have modified the SA2UL driver (board-support/ti-linux-kernel/drivers/crypto/sa2ul.c) or using it as it is? In case it is modified, please make sure the supported algorithms field is filled properly

    static struct sa_match_data am64_match_data = {
    	.priv = 0,
    	.priv_id = 0,
    	.supported_algos = BIT(SA_ALG_CBC_AES) |
    			   BIT(SA_ALG_EBC_AES) |
    			   BIT(SA_ALG_SHA256) |
    			   BIT(SA_ALG_SHA512) |
    			   BIT(SA_ALG_AUTHENC_SHA256_AES),
    };
    
    static const struct of_device_id of_match[] = {
    	{ .compatible = "ti,j721e-sa2ul", .data = &am654_match_data, },
    	{ .compatible = "ti,am654-sa2ul", .data = &am654_match_data, },
    	{ .compatible = "ti,am64-sa2ul", .data = &am64_match_data, },
    	{ .compatible = "ti,am62-sa3ul", .data = &am64_match_data, },
    	{},
    };

    Regards,

    Prashant

  • Hello,

    The driver we use for SA2UL is the original driver of SDK 08.06.00.42, which has not changed, as shown in the attachment.

    sa2ul.c

    Regards,

    Gary

  • Hello Gary,

    I assume that the customer is working on top of PSDK v8.6. All this time, I was thinking we are talking about PSDK v9 & so was doing the testing with the same. Now that I tested the PSDK v8.6 prebuilt WIC image, I do see the SA2UL is not working meaning the issue could be reproduced.

    And with that, I started working through the differences between the PSDK v8.6 & PSDK v9 and stumbled upon the following difference in the crypto node

    At first, I simply copy pasted the crypto node as it is from PSDK v9 to PSDK v8.6. This resulted in the SA2UL driver working meaning the cipher test was using the cbc-aes-sa2ul driver for the test. Then the minimal change in the PSDK v8.6 DTS that also worked is

    diff --git a/board-support/linux-5.10.168+gitAUTOINC+2c23e6c538-g2c23e6c538/arch/arm64/boot/dts/ti/k3-am62-main.dtsi b/board-support/linux-5.10.168+gitAUTOINC+2c23e6c538-g2c23e6c538/arch/arm64/boot/dts/ti/k3-am62-main.dtsi
    index 510775e9a..1689b8278 100644
    --- a/board-support/linux-5.10.168+gitAUTOINC+2c23e6c538-g2c23e6c538/arch/arm64/boot/dts/ti/k3-am62-main.dtsi
    +++ b/board-support/linux-5.10.168+gitAUTOINC+2c23e6c538-g2c23e6c538/arch/arm64/boot/dts/ti/k3-am62-main.dtsi
    @@ -179,7 +179,6 @@
     	crypto: crypto@40900000 {
     		compatible = "ti,am62-sa3ul";
     		reg = <0x00 0x40900000 0x00 0x1200>;
    -		power-domains = <&k3_pds 70 TI_SCI_PD_SHARED>;
     		#address-cells = <2>;
     		#size-cells = <2>;
     		ranges = <0x00 0x40900000 0x00 0x40900000 0x00 0x30000>;
    

    Could you please ask the customer to try out the above changes in the crypto node & see if this gets the SA2UL working.

    Regards,

    Prashant

  • Hello Gary,

    Attaching the logs just in case if they help.

    Default PSDK v8.6 WIC Image

    root@am62xx-evm:~# uname -r
    5.10.168-g2c23e6c538
    root@am62xx-evm:~# modprobe -r sa2ul
    root@am62xx-evm:~# ./cipher -v
    requested cipher CRYPTO_AES_CBC, got cbc(aes) with driver cbc-aes-ce
    AES Test passed
    requested cipher CRYPTO_AES_CBC, got cbc(aes) with driver cbc-aes-ce
    requested cipher CRYPTO_AES_CBC, got cbc(aes) with driver cbc-aes-ce
    Test passed
    root@am62xx-evm:~# modprobe sa2ul
    root@am62xx-evm:~# ./cipher -v
    requested cipher CRYPTO_AES_CBC, got cbc(aes) with driver cbc-aes-ce
    AES Test passed
    requested cipher CRYPTO_AES_CBC, got cbc(aes) with driver cbc-aes-ce
    requested cipher CRYPTO_AES_CBC, got cbc(aes) with driver cbc-aes-ce
    Test passed
    root@am62xx-evm:~#

    After DTS changes

    root@am62xx-evm:~# uname -r
    5.10.168-g2c23e6c538
    root@am62xx-evm:~# modprobe -r sa2ul
    root@am62xx-evm:~# ./cipher -v
    requested cipher CRYPTO_AES_CBC, got cbc(aes) with driver cbc-aes-ce
    AES Test passed
    requested cipher CRYPTO_AES_CBC, got cbc(aes) with driver cbc-aes-ce
    requested cipher CRYPTO_AES_CBC, got cbc(aes) with driver cbc-aes-ce
    Test passed
    root@am62xx-evm:~# modprobe sa2ul
    root@am62xx-evm:~# ./cipher -v
    requested cipher CRYPTO_AES_CBC, got cbc(aes) with driver cbc-aes-sa2ul
    AES Test passed
    requested cipher CRYPTO_AES_CBC, got cbc(aes) with driver cbc-aes-sa2ul
    requested cipher CRYPTO_AES_CBC, got cbc(aes) with driver cbc-aes-sa2ul
    Test passed
    root@am62xx-evm:~#

    Regards,

    Prashant