1# 2# Copyright (c) 2023, Arm Limited. All rights reserved. 3# 4# SPDX-License-Identifier: BSD-3-Clause 5# 6 7# Arm(R) Ethos(TM)-N NPU SiP service 8ETHOSN_NPU_DRIVER := 0 9 10$(eval $(call assert_boolean,ETHOSN_NPU_DRIVER)) 11$(eval $(call add_define,ETHOSN_NPU_DRIVER)) 12 13#Ethos-N NPU TZMP1 14ETHOSN_NPU_TZMP1 := 0 15$(eval $(call assert_boolean,ETHOSN_NPU_TZMP1)) 16$(eval $(call add_define,ETHOSN_NPU_TZMP1)) 17ifeq (${ETHOSN_NPU_TZMP1},1) 18 ifeq (${ETHOSN_NPU_DRIVER},0) 19 $(error "ETHOSN_NPU_TZMP1 is only available if ETHOSN_NPU_DRIVER=1) 20 endif 21 ifeq (${PLAT},juno) 22 $(eval $(call add_define,JUNO_ETHOSN_TZMP1)) 23 else 24 $(error "ETHOSN_NPU_TZMP1 only supported on Juno platform, not ", ${PLAT}) 25 endif 26 27 ifeq (${TRUSTED_BOARD_BOOT},0) 28 # We rely on TRUSTED_BOARD_BOOT to prevent the firmware code from being 29 # tampered with, which is required to protect the confidentiality of protected 30 # inference data. 31 $(error "ETHOSN_NPU_TZMP1 is only available if TRUSTED_BOARD_BOOT is enabled) 32 endif 33 34 # We need the FW certificate and key certificate 35 $(eval $(call TOOL_ADD_PAYLOAD,${BUILD_PLAT}/npu_fw_key.crt,--npu-fw-key-cert)) 36 $(eval $(call TOOL_ADD_PAYLOAD,${BUILD_PLAT}/npu_fw_content.crt,--npu-fw-cert)) 37 # We need the firmware to be built into the FIP 38 $(eval $(call TOOL_ADD_IMG,ETHOSN_NPU_FW,--npu-fw)) 39 40 # Needed for our OIDs to be available in tbbr_cot_bl2.c 41 $(eval $(call add_define, PLAT_DEF_OID)) 42 43 # Needed so that UUIDs from the FIP are available in BL2 44 $(eval $(call add_define,PLAT_DEF_FIP_UUID)) 45 46 PLAT_INCLUDES += -I${PLAT_DIR}certificate/include 47 PLAT_INCLUDES += -Iinclude/drivers/arm/ 48 PLAT_INCLUDES += -I${PLAT_DIR}fip 49endif 50