FSL-UT-CAAM-002
~~~~~~~~~~~~~~~

[cols=">s,6a",frame="topbot",options="header"]
|====================================================================
|Name | Description

| Summary |
CAAM 3DES test

| Automated |
No

| Kernel Config Option |
CONFIG_CRYPTO_AEAD=y
CONFIG_CRYPTO_AUTHENC=y
CONFIG_CRYPTO_DEV_FSL_CAAM=y
CONFIG_CRYPTO_DEV_FSL_CAAM_RINGSIZE=9
CONFIG_CRYPTO_DEV_FSL_CAAM_INTC=y
CONFIG_CRYPTO_DEV_FSL_CAAM_INTC_COUNT_THLD=255
CONFIG_CRYPTO_DEV_FSL_CAAM_INTC_TIME_THLD=2048
CONFIG_CRYPTO_DEV_FSL_CAAM_CRYPTO_API=y

| Software Dependency |
N/A

| Non-default Hardware Configuration |
N/A

| Test Procedure |
. Build Testing Module in Cryptographic API as module.
. modprobe tcrypt.ko.

 $ insmod tcrypt.ko mode=4

| Expected Result |
When kernel boots, I can see some caam initialize log:

caam caam.0: device ID = 0x0a16010000000000 caam caam.0: job rings = 2, qi = 0 caam
caam.0: authenc-hmac-sha1-cbc-aes-caam caam
caam.0: authenc-hmac-sha256-cbc-aes-caam caam
caam.0: authenc-hmac-sha512-cbc-aes-caam caam caam.0: authenc-hmac-sha1-cbc-des3_ede-caam
caam caam.0: authenc-hmac-sha256-cbc-des3_ede-caam
caam caam.0: authenc-hmac-sha512-cbc-des3_ede-caam
caam caam.0: authenc-hmac-sha1-cbc-des-caam caam
caam.0: authenc-hmac-sha256-cbc-des-caam caam
caam.0: authenc-hmac-sha512-cbc-des-caam caam
caam.0: cbc-aes-caam caam
caam.0: cbc-3des-caam caam
caam.0: cbc-des-caam

Then test the functionality.
root@freescale /$ insmod tcrypt.ko mode=4
insmod: can't insert 'tcrypt.ko': Resource temporarily unavailable

Note:
If you want to see evidence that CAAM is processing tests, look at /proc/interrupts,
you will see incrementing counts for 2 caam-jr entries every time you run the test.
When tcrypt runs without issue, it will exit with a resource usage error.
This is correct behavior; it uses the error to tell insmod to unload the module,
so you can re-load/re-run it without manual intervention.

|====================================================================

<<<
