]> git.baikalelectronics.ru Git - uboot.git/commit
fpga: zynqmppl: fix fpga loads command for unencrypted use case
authorNeal Frager <neal.frager@amd.com>
Tue, 14 Feb 2023 13:19:59 +0000 (13:19 +0000)
committerMichal Simek <michal.simek@amd.com>
Thu, 9 Mar 2023 12:15:00 +0000 (13:15 +0100)
commit6346e38a78191a3093e6c3ca65a5ec797bcbfbde
treeb5a0065b735ed0966fa99f86a3ed210f126bbc10
parent0506e502e2e78a1482bca30fe0d8a2507b0fc805
fpga: zynqmppl: fix fpga loads command for unencrypted use case

When using the fpga loads command, the driver is passing the AES encryption
key address is all cases.  However, for the authenticated, but not encrypted
use case, there is no AES encryption key, and this value is 0.

When AES encryption is not used on the fpga bitstream, the pmufw assumes that
the AES key address is a bitstream size value like what is used by the
unsecure fpga load command.

To fix the problem, this patch checks to see if the AES key address is zero.
If the AES key address is zero, it means that AES is not being used on the
bitstream and the bitstream size should be passed instead.  Thus, matching
the fpga load functionality.

Signed-off-by: Neal Frager <neal.frager@amd.com>
Acked-by: Ashok Reddy Soma <ashok.reddy.soma@amd.com>
Link: https://lore.kernel.org/r/20230214131959.40298-1-neal.frager@amd.com
Signed-off-by: Michal Simek <michal.simek@amd.com>
drivers/fpga/zynqmppl.c