1# 2# Copyright (c) 2026, Arm Limited and Contributors. All rights reserved. 3# 4# SPDX-License-Identifier: BSD-3-Clause 5# 6 7$(warning "SFCP is an experimental feature") 8 9SFCP_SOURCES := $(addprefix drivers/arm/sfcp/sfcp_core/, \ 10 sfcp_helpers.c \ 11 sfcp.c \ 12 sfcp_link_hal.c \ 13 sfcp_random.c \ 14 sfcp_encryption_stub.c \ 15 ) 16 17SFCP_SOURCES += $(addprefix drivers/arm/sfcp/sfcp_psa/, \ 18 sfcp_psa_call/sfcp_psa_call.c \ 19 sfcp_psa_protocol/sfcp_psa_protocol.c \ 20 sfcp_psa_protocol/sfcp_psa_protocol_pointer_access.c \ 21 sfcp_psa_protocol/sfcp_psa_protocol_embed.c \ 22 ) 23 24# Default to MHUv2 if PLAT_MHU undefined 25PLAT_MHU ?= MHUv2 26 27ifneq (${PLAT_MHU}, NO_MHU) 28ifeq (${PLAT_MHU}, MHUv3) 29SFCP_SOURCES += $(addprefix drivers/arm/mhu/, \ 30 mhu_v3_x.c \ 31 ) 32 33$(eval $(call add_defines, \ 34 PLAT_MHU_VERSION=3 \ 35)) 36 37else ifeq (${PLAT_MHU}, MHUv2) 38SFCP_SOURCES += $(addprefix drivers/arm/mhu/, \ 39 mhu_v2_x.c \ 40 ) 41 42$(eval $(call add_defines, \ 43 PLAT_MHU_VERSION=2 \ 44)) 45 46else 47$(error Unsupported MHU version) 48endif 49 50PLAT_INCLUDES += -Idrivers/arm/mhu 51endif 52 53PLAT_INCLUDES += -Iinclude/lib/psa \ 54 -Idrivers/arm/sfcp/sfcp_core \ 55 -Idrivers/arm/sfcp/sfcp_psa/sfcp_psa_protocol 56 57$(eval $(call add_defines, \ 58 SFCP_PROTOCOL_EMBED_ENABLED \ 59 SFCP_PROTOCOL_POINTER_ACCESS_ENABLED \ 60)) 61