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.

SK-AM62: Crypto hardware acceleration problem

Part Number: SK-AM62
Translator

Hello everyone,

I'm currently facing an issue with enabling crypto hardware acceleration on my sk-am62x device.

I've enabled the crypto dev and sa2ul modules successfully, as confirmed by the output of lsmod:

# lsmod

Module                  Size  Used by    Tainted: G

sa2ul                  36864  0

cryptodev              49152  0

However, despite enabling these modules, I'm not observing any performance improvement when running cryptographic operations using OpenSSL with hardware acceleration.

# openssl speed -evp aes-128-cbc -engine devcrypto

Additionally, when I query the /dev/crypto engine for information, I see that some cipher operations are still being handled by software instead of hardware acceleration.

# openssl engine -post DUMP_INFO -t devcrypto

(devcrypto) /dev/crypto engine

     [ available ]

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

 

The output shows that certain cipher operations are still using software-based drivers (cbc(des-generic), ctr-aes-ce, etc.), indicating that hardware acceleration might not be fully enabled or configured correctly.

Could anyone provide guidance on additional configuration steps or troubleshooting methods to ensure that crypto hardware acceleration is effectively utilized on my device?

Any help or insights would be greatly appreciated. Thank you !