Problems using SEC on lx2160a

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Problems using SEC on lx2160a

Jump to solution
488 Views
td71522
Contributor I

Hi,

i am currently working with the lx2160a and i'm trying to access/use the builtin SEC. I am following the appropriate lsdk User Guide 20.04 for our Version. But after following the steps of Kernel Config and creating the dpseci object and assigning them to the dprc object the dmesg output shows errors.

 

root@data-plane-1:~# dmesg | grep dpaa2_caam

[ 505.463116] dpaa2_caam dpseci.0: Adding to iommu group 0

[ 505.464716] dpaa2_caam dpseci.0: dpseci v5.3

[ 505.486829] dpaa2_caam dpseci.0: FD error: 000000a0

[ 505.486834] dpaa2_caam dpseci.0: 20001112: CCB: desc idx 17: AES: Data size error.

[ 505.486848] dpaa2_caam dpseci.0: FD error: 000000a0

[ 505.486851] dpaa2_caam dpseci.0: 20001412: CCB: desc idx 20: AES: Data size error.

[ 505.486871] dpaa2_caam dpseci.0: FD error: 000000a0

[ 505.486874] dpaa2_caam dpseci.0: 20001112: CCB: desc idx 17: AES: Data size error.

[ 505.486886] dpaa2_caam dpseci.0: FD error: 000000a0

[ 505.486889] dpaa2_caam dpseci.0: 20001412: CCB: desc idx 20: AES: Data size error.

[ 505.486942] dpaa2_caam dpseci.0: FD error: 000000a0

[ 505.486945] dpaa2_caam dpseci.0: 20001112: CCB: desc idx 17: AES: Data size error.

[ 505.486957] dpaa2_caam dpseci.0: FD error: 000000a0

[ 505.486960] dpaa2_caam dpseci.0: 20001412: CCB: desc idx 20: AES: Data size error.

[ 505.486983] dpaa2_caam dpseci.0: FD error: 000000a0

[ 505.486986] dpaa2_caam dpseci.0: 20001112: CCB: desc idx 17: AES: Data size error.

[ 505.486997] dpaa2_caam dpseci.0: FD error: 000000a0

[ 505.487000] dpaa2_caam dpseci.0: 20001412: CCB: desc idx 20: AES: Data size error.

[ 505.487022] dpaa2_caam dpseci.0: FD error: 000000a0

[ 505.487024] dpaa2_caam dpseci.0: 20001112: CCB: desc idx 17: AES: Data size error.

[ 505.487036] dpaa2_caam dpseci.0: FD error: 000000a0

[ 505.487039] dpaa2_caam dpseci.0: 20001412: CCB: desc idx 20: AES: Data size error.

[ 506.186893] dpaa2_caam dpseci.0: 40002316: DECO: desc idx 35: DMA Error

[ 506.243331] dpaa2_caam dpseci.0: 40002316: DECO: desc idx 35: DMA Error

[ 506.245023] dpaa2_caam dpseci.0: 40002316: DECO: desc idx 35: DMA Error

[ 506.352462] dpaa2_caam dpseci.0: 40000216: DECO: desc idx 2: DMA Error

[ 506.352480] dpaa2_caam dpseci.0: algorithms registered in /proc/crypto

[ 506.366210] dpaa2_caam dpseci.0: 40000216: DECO: desc idx 2: DMA Error

[ 506.741905] dpaa2_caam dpseci.0: 40000216: DECO: desc idx 2: DMA Error

[ 506.774286] dpaa2_caam dpseci.0: hash algorithms registered in /proc/crypto

 

Algorithms can be found in /proc/crypto. Now my Question is what is this error caused by and how can I fix it ?

Is there need for additional steps to use the sec with the linux crypto api then mentioned in the lsdk User Guide ?

Additional Information will be provided if needed.

Thanks in advande for your advide/tips.

Regards

0 Kudos
1 Solution
468 Views
yipingwang
NXP TechSupport
NXP TechSupport

I downloaded LSDK 20.04 pre-built image with the following command.

$ wget https://www.nxp.com/lgfiles/sdk/lsdk2004/lsdk2004_yocto_tiny_LS_arm64.itb

On lx2160ardb, boot the target board with the following commands.

=> sf read 0x80d00000 0xd00000 0x100000
=> fsl_mc lazyapply dpl 0x80d00000
=> tftp 0xa0000000 nxa22585/ls1046ardb/20.04/lsdk2004_yocto_tiny_LS_arm64.itb

=> bootm 0xa0000000#lx2160ardb

Under Linux, I didn't reproduce your problem.

root@TinyLinux:~# restool dpseci create --num-queues=8 --priorities=1,2,3,4,5,6,7,8
dpseci.1 is created under dprc.1
root@TinyLinux:~# restool dprc assign dprc.1 --object=dpseci.0 --plugged=1
dpseci.0 cannot be changed plugged state because it is bound to driver:
/sys/bus/fsl-mc/devices/dpseci.0/driver -> ../../../../../../bus/fsl-mc/drivers/dpaa2_caam
unbind it first
root@TinyLinux:~# dmesg | grep dpaa2_caam
[ 7.106655] dpaa2_caam dpseci.0: Adding to iommu group 11
[ 8.261728] dpaa2_caam dpseci.0: dpseci v5.3
[ 8.398869] dpaa2_caam dpseci.0: algorithms registered in /proc/crypto
[ 8.424528] dpaa2_caam dpseci.0: hash algorithms registered in /proc/crypto
root@TinyLinux:~# zcat /proc/config.gz | grep CAAM
# CONFIG_CRYPTO_DEV_FSL_CAAM_DMA is not set
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 is not set
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_CAAM_TK_API is not set
# CONFIG_CRYPTO_DEV_FSL_CAAM_RNG_TEST is not set
CONFIG_CRYPTO_DEV_FSL_CAAM_SM=y
CONFIG_CRYPTO_DEV_FSL_CAAM_SM_SLOTSIZE=7
CONFIG_CRYPTO_DEV_FSL_CAAM_SM_TEST=m
CONFIG_CRYPTO_DEV_FSL_CAAM_SECVIO=y
CONFIG_CRYPTO_DEV_FSL_CAAM_JR_UIO=y
CONFIG_CRYPTO_DEV_FSL_DPAA2_CAAM=y

Please use all images from LSDK 20.04, please compare your Linux Kernel configuration file with the above. You could try lsdk2004_yocto_tiny_LS_arm64.itb on your target board.

View solution in original post

0 Kudos
2 Replies
469 Views
yipingwang
NXP TechSupport
NXP TechSupport

I downloaded LSDK 20.04 pre-built image with the following command.

$ wget https://www.nxp.com/lgfiles/sdk/lsdk2004/lsdk2004_yocto_tiny_LS_arm64.itb

On lx2160ardb, boot the target board with the following commands.

=> sf read 0x80d00000 0xd00000 0x100000
=> fsl_mc lazyapply dpl 0x80d00000
=> tftp 0xa0000000 nxa22585/ls1046ardb/20.04/lsdk2004_yocto_tiny_LS_arm64.itb

=> bootm 0xa0000000#lx2160ardb

Under Linux, I didn't reproduce your problem.

root@TinyLinux:~# restool dpseci create --num-queues=8 --priorities=1,2,3,4,5,6,7,8
dpseci.1 is created under dprc.1
root@TinyLinux:~# restool dprc assign dprc.1 --object=dpseci.0 --plugged=1
dpseci.0 cannot be changed plugged state because it is bound to driver:
/sys/bus/fsl-mc/devices/dpseci.0/driver -> ../../../../../../bus/fsl-mc/drivers/dpaa2_caam
unbind it first
root@TinyLinux:~# dmesg | grep dpaa2_caam
[ 7.106655] dpaa2_caam dpseci.0: Adding to iommu group 11
[ 8.261728] dpaa2_caam dpseci.0: dpseci v5.3
[ 8.398869] dpaa2_caam dpseci.0: algorithms registered in /proc/crypto
[ 8.424528] dpaa2_caam dpseci.0: hash algorithms registered in /proc/crypto
root@TinyLinux:~# zcat /proc/config.gz | grep CAAM
# CONFIG_CRYPTO_DEV_FSL_CAAM_DMA is not set
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 is not set
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_CAAM_TK_API is not set
# CONFIG_CRYPTO_DEV_FSL_CAAM_RNG_TEST is not set
CONFIG_CRYPTO_DEV_FSL_CAAM_SM=y
CONFIG_CRYPTO_DEV_FSL_CAAM_SM_SLOTSIZE=7
CONFIG_CRYPTO_DEV_FSL_CAAM_SM_TEST=m
CONFIG_CRYPTO_DEV_FSL_CAAM_SECVIO=y
CONFIG_CRYPTO_DEV_FSL_CAAM_JR_UIO=y
CONFIG_CRYPTO_DEV_FSL_DPAA2_CAAM=y

Please use all images from LSDK 20.04, please compare your Linux Kernel configuration file with the above. You could try lsdk2004_yocto_tiny_LS_arm64.itb on your target board.

0 Kudos
459 Views
td71522
Contributor I
Hi,
thanks for your reply.
I had a misconfiguration in my kernel configuration. The option FSL_CAAM_SM wasnt mentioned in the documentation.
But i changed it like your config and it worked.
Regards
0 Kudos