feat(romlib): add PSA Crypto ROMLIB support

Adding PSA Crypto MBedTLS specific jump table to allow use of ROMLIB, to
be included when PSA_CRYPTO=1 and enabled.

Signed-off-by: Lauren Wehrmeister <lauren.wehrmeister@arm.com>
Change-Id: Iff7f0e3c5cba6b89f1732f6c80d3060498e3675d
This commit is contained in:
laurenw 2025-02-18 14:48:45 -06:00 committed by Lauren Wehrmeister
parent 02f0e6e4f9
commit cf1b7fe657
2 changed files with 28 additions and 2 deletions

View file

@ -1,5 +1,5 @@
#
# Copyright (c) 2018-2024, Arm Limited and Contributors. All rights reserved.
# Copyright (c) 2018-2025, Arm Limited and Contributors. All rights reserved.
#
# SPDX-License-Identifier: BSD-3-Clause
#
@ -23,7 +23,14 @@ PROCESSED_JMPTBL = ../../$(PLAT_DIR)/jmptbl.i
# Determine if mbedtls is needed
ifneq ($(filter $(CRYPTO_SUPPORT),1 2 3),)
PROCESSED_JMPTBL = $(BUILD_DIR)/jmptbl_processed.i
$(shell mkdir -p $(BUILD_DIR) && cat ../../$(PLAT_DIR)/jmptbl.i ../../$(PLAT_DIR)/jmptbl_mbedtls.i > $(BUILD_DIR)/jmptbl_processed.i)
CRYPTO_JMPTBL = ../../$(PLAT_DIR)/jmptbl.i ../../$(PLAT_DIR)/jmptbl_mbedtls.i
ifeq (${PSA_CRYPTO},1)
CRYPTO_JMPTBL += ../../$(PLAT_DIR)/jmptbl_mbedtls_psa.i
endif # ifeq (${PSA_CRYPTO},1)
$(shell mkdir -p $(BUILD_DIR) && cat $(CRYPTO_JMPTBL) > $(PROCESSED_JMPTBL))
LIBS += $(LIB_DIR)/libmbedtls.a
endif

View file

@ -0,0 +1,19 @@
#
# Copyright (c) 2025, Arm Limited. All rights reserved.
#
# SPDX-License-Identifier: BSD-3-Clause
#
# Platform-specific ROMLIB MbedTLS PSA Crypto functions can be added here.
# During the build process, this file is appended to jmptbl.i
# if MbedTLS support is required and PSA Crypto is supported.
#
# Format:
# lib function [patch]
# Example:
# mbedtls psa_crypto_init
mbedtls mbedtls_pk_get_psa_attributes
mbedtls mbedtls_pk_import_into_psa
mbedtls psa_crypto_init
mbedtls psa_destroy_key
mbedtls psa_verify_message