98fb9678da
Since I don't have access to the datasheet, the relevant values were found in: https://github.com/AspeedTech-BMC/zephyr/blob/v00.01.08/dts/arm/aspeed/ast10x0.dtsi Before on Zephyr: uart:~$ hash test sha256_test tv[0]:hash_final error sha384_test tv[0]:hash_final error sha512_test tv[0]:hash_final error [00:00:06.278,000] <err> hace_global: HACE poll timeout [00:00:09.324,000] <err> hace_global: HACE poll timeout [00:00:12.261,000] <err> hace_global: HACE poll timeout uart:~$ crypto aes256_cbc_vault aes256_cbc vault key 1 [00:00:06.699,000] <inf> hace_global: aspeed_crypto_session_setup [00:00:06.699,000] <inf> hace_global: data->cmd: 1c2098 [00:00:06.699,000] <inf> hace_global: crypto_data_src: 93340 [00:00:06.699,000] <inf> hace_global: crypto_data_dst: 93348 [00:00:06.699,000] <inf> hace_global: crypto_ctx_base: 93300 [00:00:06.699,000] <inf> hace_global: crypto_data_len: 80000040 [00:00:06.699,000] <inf> hace_global: crypto_cmd_reg: 11c2098 [00:00:09.743,000] <inf> hace_global: HACE_STS: 0 [00:00:09.743,000] <err> hace_global: HACE poll timeout [00:00:09.743,000] <err> crypto: CBC mode ENCRYPT - Failed [00:00:09.743,000] <inf> hace_global: aspeed_crypto_session_free uart:~$ After: uart:~$ hash test sha256_test tv[0]:PASS tv[1]:PASS tv[2]:PASS tv[3]:PASS tv[4]:PASS sha384_test tv[0]:PASS tv[1]:PASS tv[2]:PASS tv[3]:PASS tv[4]:PASS tv[5]:PASS sha512_test tv[0]:PASS tv[1]:PASS tv[2]:PASS tv[3]:PASS tv[4]:PASS tv[5]:PASS uart:~$ crypto aes256_cbc_vault aes256_cbc vault key 1 Was waiting for: 6b c1 be e2 2e 40 9f 96 e9 3d 7e 11 73 93 17 2a ae 2d 8a 57 1e 03 ac 9c 9e b7 6f ac 45 af 8e 51 30 c8 1c 46 a3 5c e4 11 e5 fb c1 19 1a 0a 52 ef f6 9f 24 45 df 4f 9b 17 ad 2b 41 7b e6 6c 37 10 But got: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 [00:00:05.771,000] <inf> hace_global: aspeed_crypto_session_setup [00:00:05.772,000] <inf> hace_global: data->cmd: 1c2098 [00:00:05.772,000] <inf> hace_global: crypto_data_src: 93340 [00:00:05.772,000] <inf> hace_global: crypto_data_dst: 93348 [00:00:05.772,000] <inf> hace_global: crypto_ctx_base: 93300 [00:00:05.772,000] <inf> hace_global: crypto_data_len: 80000040 [00:00:05.772,000] <inf> hace_global: crypto_cmd_reg: 11c2098 [00:00:05.772,000] <inf> hace_global: HACE_STS: 1000 [00:00:05.772,000] <inf> crypto: Output length (encryption): 80 [00:00:05.772,000] <inf> hace_global: aspeed_crypto_session_free [00:00:05.772,000] <inf> hace_global: aspeed_crypto_session_setup [00:00:05.772,000] <inf> hace_global: data->cmd: 1c2018 [00:00:05.772,000] <inf> hace_global: crypto_data_src: 93340 [00:00:05.772,000] <inf> hace_global: crypto_data_dst: 93348 [00:00:05.772,000] <inf> hace_global: crypto_ctx_base: 93300 [00:00:05.772,000] <inf> hace_global: crypto_data_len: 80000040 [00:00:05.772,000] <inf> hace_global: crypto_cmd_reg: 11c2018 [00:00:05.772,000] <inf> hace_global: HACE_STS: 1000 [00:00:05.772,000] <inf> crypto: Output length (decryption): 64 [00:00:05.772,000] <err> crypto: CBC mode DECRYPT - Mismatch between plaintext and decrypted cipher text [00:00:05.774,000] <inf> hace_global: aspeed_crypto_session_free uart:~$ Reviewed-by: Peter Delevoryas <peter@pjd.dev> Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org> Signed-off-by: Cédric Le Goater <clg@kaod.org> |
||
---|---|---|
.. | ||
allwinner-a10.c | ||
allwinner-h3.c | ||
armsse.c | ||
armv7m.c | ||
aspeed_ast10x0.c | ||
aspeed_ast2600.c | ||
aspeed_eeprom.c | ||
aspeed_eeprom.h | ||
aspeed_soc.c | ||
aspeed.c | ||
bcm2835_peripherals.c | ||
bcm2836.c | ||
boot.c | ||
collie.c | ||
cubieboard.c | ||
digic_boards.c | ||
digic.c | ||
exynos4_boards.c | ||
exynos4210.c | ||
fby35.c | ||
fsl-imx6.c | ||
fsl-imx6ul.c | ||
fsl-imx7.c | ||
fsl-imx25.c | ||
fsl-imx31.c | ||
gumstix.c | ||
highbank.c | ||
imx25_pdk.c | ||
integratorcp.c | ||
Kconfig | ||
kzm.c | ||
mainstone.c | ||
mcimx6ul-evk.c | ||
mcimx7d-sabre.c | ||
meson.build | ||
microbit.c | ||
mps2-tz.c | ||
mps2.c | ||
msf2-soc.c | ||
msf2-som.c | ||
musca.c | ||
musicpal.c | ||
netduino2.c | ||
netduinoplus2.c | ||
npcm7xx_boards.c | ||
npcm7xx.c | ||
nrf51_soc.c | ||
nseries.c | ||
olimex-stm32-h405.c | ||
omap1.c | ||
omap2.c | ||
omap_sx1.c | ||
orangepi.c | ||
palm.c | ||
pxa2xx_gpio.c | ||
pxa2xx_pic.c | ||
pxa2xx.c | ||
raspi.c | ||
realview.c | ||
sabrelite.c | ||
sbsa-ref.c | ||
smmu-common.c | ||
smmu-internal.h | ||
smmuv3-internal.h | ||
smmuv3.c | ||
spitz.c | ||
stellaris.c | ||
stm32f100_soc.c | ||
stm32f205_soc.c | ||
stm32f405_soc.c | ||
stm32vldiscovery.c | ||
strongarm.c | ||
strongarm.h | ||
tosa.c | ||
trace-events | ||
trace.h | ||
versatilepb.c | ||
vexpress.c | ||
virt-acpi-build.c | ||
virt.c | ||
xilinx_zynq.c | ||
xlnx-versal-virt.c | ||
xlnx-versal.c | ||
xlnx-zcu102.c | ||
xlnx-zynqmp.c | ||
z2.c |