Verify whether hardware caam is used or not? Android 13

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

Verify whether hardware caam is used or not? Android 13

476件の閲覧回数
sibrain-himanshu
Contributor I

We are trying to enable CAAM driver, and wanted to know how to check if hardware crypto is used.

 

Below list of drivers we have enabled.

# CONFIG_CRYPTO_MANAGER_DISABLE_TESTS is not set
CONFIG_CRYPTO_DEV_FSL_CAAM_TK_API=y
CONFIG_CRYPTO_DEV_FSL_CAAM_SM=y

# CONFIG_CRYPTO_DEV_FSL_CAAM_SECVIO=m
# CONFIG_CRYPTO_DEV_FSL_CAAM=m
CONFIG_CRYPTO_DEV_FSL_CAAM_SM_TEST=y
# CONFIG_CRYPTO_DEV_FSL_DPAA2_CAAM=m
CONFIG_CRYPTO_DEV_FSL_CAAM_COMMON=y
CONFIG_CRYPTO_DEV_FSL_CAAM_CRYPTO_API_DESC=y
CONFIG_CRYPTO_DEV_FSL_CAAM_AHASH_API_DESC=y
CONFIG_CRYPTO_DEV_FSL_CAAM=y
CONFIG_CRYPTO_DEV_FSL_CAAM_DEBUG=y
CONFIG_CRYPTO_DEV_FSL_CAAM_JR=y
CONFIG_CRYPTO_DEV_FSL_CAAM_RINGSIZE=9
# CONFIG_CRYPTO_DEV_FSL_CAAM_INTC is not set
CONFIG_CRYPTO_DEV_FSL_CAAM_CRYPTO_API=y
CONFIG_CRYPTO_DEV_FSL_CAAM_CRYPTO_API_QI=y
CONFIG_CRYPTO_DEV_FSL_CAAM_AHASH_API=y
CONFIG_CRYPTO_DEV_FSL_CAAM_PKC_API=y
CONFIG_CRYPTO_DEV_FSL_CAAM_RNG_API=y
CONFIG_CRYPTO_DEV_FSL_DPAA2_CAAM=y
CONFIG_CRYPTO_DEV_FSL_CAAM_RNG_TEST=y
 
Interrupt Count before,
 
cat /proc/interrupts | grep jr
68001 0 0 0 GICv3 138 Level 30902000.jr
354478 0 0 0 GICv3 146 Level 30903000.jr
 
Log for tcrypt.ko is added,

 

 

verdin_8mp:/vendor/lib/modules # insmod tcrypt.ko  sec=1 mode=406
[  187.413899][ T2468]
[  187.413899][ T2468] testing speed of async sha512 (sha512-generic)
[  187.422490][ T2468] tcrypt: test  0 (   16 byte blocks,   16 bytes per update,   1 updates):
[  188.420262][ T2468] 604168 opers/sec,   9666688 bytes/sec
[  188.425690][ T2468] tcrypt: test  1 (   64 byte blocks,   16 bytes per update,   4 updates): 449838 opers/sec,  28789632 bytes/sec
[  189.436026][ T2468] tcrypt: test  2 (   64 byte blocks,   64 bytes per update,   1 updates):
[  190.432261][ T2468] 614505 opers/sec,  39328320 bytes/sec
[  190.446214][ T2468] tcrypt: test  3 (  256 byte blocks,   16 bytes per update,  16 updates): 145526 opers/sec,  37254656 bytes/sec
[  191.456017][ T2468] tcrypt: test  4 (  256 byte blocks,   64 bytes per update,   4 updates): 202257 opers/sec,  51777792 bytes/sec
[  192.464024][ T2468] tcrypt: test  5 (  256 byte blocks,  256 bytes per update,   1 updates):
[  193.460263][ T2468] 233653 opers/sec,  59815168 bytes/sec
[  193.474215][ T2468] tcrypt: test  6 ( 1024 byte blocks,   16 bytes per update,  64 updates):
[  194.472281][ T2468]  44219 opers/sec,  45280256 bytes/sec
[  194.477699][ T2468] tcrypt: test  7 ( 1024 byte blocks,  256 bytes per update,   4 updates):  78019 opers/sec,  79891456 bytes/sec
[  195.488035][ T2468] tcrypt: test  8 ( 1024 byte blocks, 1024 bytes per update,   1 updates):
[  196.484272][ T2468]  82465 opers/sec,  84444160 bytes/sec
[  196.498228][ T2468] tcrypt: test  9 ( 2048 byte blocks,   16 bytes per update, 128 updates):  23019 opers/sec,  47142912 bytes/sec
[  197.508048][ T2468] tcrypt: test 10 ( 2048 byte blocks,  256 bytes per update,   8 updates):  41433 opers/sec,  84854784 bytes/sec
[  198.516033][ T2468] tcrypt: test 11 ( 2048 byte blocks, 1024 bytes per update,   2 updates):  43703 opers/sec,  89503744 bytes/sec
[  199.524033][ T2468] tcrypt: test 12 ( 2048 byte blocks, 2048 bytes per update,   1 updates):
[  200.520268][ T2468]  44281 opers/sec,  90687488 bytes/sec
[  200.534217][ T2468] tcrypt: test 13 ( 4096 byte blocks,   16 bytes per update, 256 updates):  11725 opers/sec,  48025600 bytes/sec
[  201.544107][ T2468] tcrypt: test 14 ( 4096 byte blocks,  256 bytes per update,  16 updates):  21411 opers/sec,  87699456 bytes/sec
[  202.552060][ T2468] tcrypt: test 15 ( 4096 byte blocks, 1024 bytes per update,   4 updates):  22626 opers/sec,  92676096 bytes/sec
[  203.560064][ T2468] tcrypt: test 16 ( 4096 byte blocks, 4096 bytes per update,   1 updates):
[  204.556290][ T2468]  22996 opers/sec,  94191616 bytes/sec
[  204.570247][ T2468] tcrypt: test 17 ( 8192 byte blocks,   16 bytes per update, 512 updates):   5916 opers/sec,  48463872 bytes/sec
[  205.580033][ T2468] tcrypt: test 18 ( 8192 byte blocks,  256 bytes per update,  32 updates):  10888 opers/sec,  89194496 bytes/sec
[  206.588046][ T2468] tcrypt: test 19 ( 8192 byte blocks, 1024 bytes per update,   8 updates):  11513 opers/sec,  94314496 bytes/sec
[  207.596107][ T2468] tcrypt: test 20 ( 8192 byte blocks, 4096 bytes per update,   2 updates):  11679 opers/sec,  95674368 bytes/sec
[  208.604087][ T2468] tcrypt: test 21 ( 8192 byte blocks, 8192 bytes per update,   1 updates):
[  209.600282][ T2468]  11694 opers/sec,  95797248 bytes/sec
insmod: failed to load tcrypt.ko: Try again

 

 

 

Interrupt Count After checking tcrypt,

cat /proc/interrupts | grep jr
68461 0 0 0 GICv3 138 Level 30902000.jr
356906 0 0 0 GICv3 146 Level 30903000.jr

 

 

/proc/crypto                                                               <                                                                             name         : authenc(hmac(sha512),cbc(des3_ede))                                                                                                          driver       : authenc(hmac(sha512-generic),cbc-3des-caam)                                                                                                  module       : kernel                                                                                                                                       priority     : 30100                                                                                                                                        refcnt       : 1                                                                                                                                            selftest     : passed                                                                                                                                       internal     : no                                                                                                                                           type         : aead                                                                                                                                         async        : yes                                                                                                                                          blocksize    : 8                                                                                                                                            ivsize       : 8                                                                                                                                            maxauthsize  : 64                                                                                                                                           geniv        : <none>                                                                                                                                                                                                                                                                                                   name         : authenc(hmac(sha512),cbc(des))                                                                                                               driver       : authenc(hmac(sha512-generic),cbc-des-caam)                                                                                                   module       : kernel                                                                                                                                       priority     : 30100                                                                                                                                        refcnt       : 1                                                                                                                                            selftest     : passed                                                                                                                                       internal     : no                                                                                                                                           type         : aead                                                                                                                                         async        : yes                                                                                                                                          blocksize    : 8                                                                                                                                            ivsize       : 8                                                                                                                                            maxauthsize  : 64                                                                                                                                           geniv        : <none>                               

 

 

We are using Android 13 OS.

Please suggest us way to verify whether Hardware caam is used or not.

0 件の賞賛
返信
1 返信

455件の閲覧回数
Harvey021
NXP TechSupport
NXP TechSupport

These info seems show that Hardware caam is used. Can you please tell why you need to enable the caam driver in non-secure? 

 

Regards

Harvey

0 件の賞賛
返信