Skip to content

Commit

Permalink
drivers: caam: check OPTEE DDR location if the CAAM DMA is 32 bits width
Browse files Browse the repository at this point in the history
On i.MX platforms, the CAAM DMA width is limited to 32 bits. That
limitation requires OPTEE to be located in the 32 bits DDR address
space.

Signed-off-by: Clement Faure <clement.faure@nxp.com>
Acked-by: Jerome Forissier <jerome.forissier@linaro.org>
  • Loading branch information
clementfaure authored and jforissier committed Sep 13, 2023
1 parent 5f18075 commit bd73822
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions core/drivers/crypto/caam/caam_ctrl.c
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
*
* Brief CAAM Global Controller.
*/
#include <assert.h>
#include <caam_acipher.h>
#include <caam_cipher.h>
#include <caam_common.h>
Expand All @@ -21,6 +22,14 @@
#include <kernel/panic.h>
#include <tee_api_types.h>

/*
* If the CAAM DMA only supports 32 bits physical addresses, OPTEE must
* be located within the 32 bits address space.
*/
#ifndef CFG_CAAM_64BIT
static_assert((CFG_TZDRAM_START + CFG_TZDRAM_SIZE) < UINT32_MAX);
#endif

/* Crypto driver initialization */
static TEE_Result crypto_driver_init(void)
{
Expand Down

0 comments on commit bd73822

Please sign in to comment.