PD#SWPL-179066
Problem:
aml-crypto-dma insmod error
Solution:
1. Default configure for dma_bus64 is 32 bits,
set it to 64 bits if dts is specified.
Verify:
c3
Change-Id: I6265a9a60cac2dfe7bf3124ac2b69277268e5f31
Signed-off-by: Mingyen Hung <mingyen.hung@amlogic.com>
PD#SWPL-177838
Problem:
Need to return error to up level
Solution:
1. Don't wait owner bit if error returned by crypto DMA
2. Check bit 1 of status reg for error
3. Flexible REE thread setting when apply SMCC call to set
dma_bus64
Verify:
s6 + bl201
Change-Id: If10ff026660174540de90e3ea787a5e42f273949
Signed-off-by: Mingyen Hung <mingyen.hung@amlogic.com>
PD#SWPL-172985
Problem:
Need to support 64 bits addressing
Solution:
1. Add dma_dsc_64 and dma_sg_dsc_64
2. dma_set_mask is set to 64
3. dma_set_coherent_mask is set to 40
4. SMCC call to set dma bus64 in bl31
Verify:
s6 + bl201
Change-Id: I0119e938d75671e47cbaadcfbfb8c3e87df01a66
Signed-off-by: Mingyen Hung <mingyen.hung@amlogic.com>
PD#SWPL-172313
Problem:
When invalid key set, the driver stuck at waiting for owner bit.
Solution:
If the DMA meets error during processing, it will skip setting owner
bit. Therefore, we should only wait for owner bit if everything is
good.
Verify:
S4D
Change-Id: Ic41998f568e78759e65a1c034ef30ae1eebd132a
Signed-off-by: Matthew Shyu <matthew.shyu@amlogic.com>
PD#SWPL-162511
Problem:
When running test bin with multithreading:
1. Testing hangs
2. Crypto result is incorrect
Solution:
1. Replacing thread manipulation with completion.
2. Rerun descriptors of key/iv setup since context of
crypto hw might be changed by other threads.
Verify:
s4d + ap232 + yocto
Change-Id: I477e7bda6f6c9dfb81fb58a361e0926b87698196
Signed-off-by: Mingyen Hung <mingyen.hung@amlogic.com>
PD#SWPL-163070
Problem:
Need to verify crypto driver on s7d
Solution:
1. Replacing kmalloc() with dma_alloc_coherent()
due to weird data abort.
2. digest_sz is specified in dts for s7d
Verify:
s7d + bm201
Change-Id: Ibeb09de26f8b6c825117e0791a3e51f74a8529df
Signed-off-by: Mingyen Hung <mingyen.hung@amlogic.com>
PD#SWPL-150680
Problem:
Wrong encryption results for AES128/CTR when using
/dev/aml_crypto
Solution:
Polling owner bit to make sure operation of Crypto
DMA is complete.
Verify:
s4d + ap232 + yocto
Change-Id: I8889dcf9cf452e4ca6b04a502c2ec7c1bb0bac8e
Signed-off-by: Mingyen Hung <mingyen.hung@amlogic.com>
PD#SWPL-138376
Problem:
When there are multiple process accessing crypto device at the same
time, some of the request might be dropped and causing process failed to
exit.
Solution:
Move mutex lock to properly protect HW operation
Verify:
S905C3
Change-Id: Ie12b1f46e87dcbbaf5df4f780711dcebc9c87e75
Signed-off-by: Matthew Shyu <matthew.shyu@amlogic.com>
PD#SWPL-140403
Problem:
Missing SM4 support in aml-crypto-device on S5
Solution:
Add SM4 support to aml-crypto-device
Verify:
S5
Change-Id: I0933bbcefa46daa5b00bd41d1e68fc9441bd3185
Signed-off-by: Matthew Shyu <matthew.shyu@amlogic.com>
PD#SWPL-124965
Problem:
Need key ladder/table driver for kernel5.15
The KT driver needs to be separated from the descrambler.
New APIs are needed for the KT driver.
Solution:
Create a seckey driver.
Verify:
S5 KT/KL with DMA
T3 METACAS with Descramble
T5W
Change-Id: Id058e64f99918b66e79d24647880f999f55ca13a
Signed-off-by: Doosan Baek <doosan.baek@amlogic.com>
PD#SWPL-104759
Problem:
Bringup aml crypto on t5m
Solution:
Enable aml crypto dts on t5m
Verify:
T5M
Change-Id: I605aef6f6020924881ee2b5801beb8297611dd70
Signed-off-by: Matthew Shyu <matthew.shyu@amlogic.com>
PD#SWPL-96209
Problem:
Compilation error when CONFIG_CRYPTO_DES is disabled
Solution:
1. Strip out symbol issue by aml-crypto-dma and
that is from crypto des framework.
Verify:
1. On AN400
Signed-off-by: Mingyen Hung <mingyen.hung@amlogic.com>
Change-Id: I06e894ae10e55ab86c40ee7b2ebe2013c5412149
PD#SWPL-71764
Problem:
Need to bringup amlogic crypto driver for
kernel 5.15.
Solution:
1. Bringup amlogic crypto driver
2. Enable SHA1, DES, and ECB if they are
disabled by default.
3. Merged from 5.4 and 5.10
Verify:
1. Built-in driver on C2_AF400
2. GKI driver on S4D AP_222
Change-Id: I62487e615930070233c3a6b4a41b66edddf6f783
Signed-off-by: Mingyen Hung <mingyen.hung@amlogic.com>