blob: 54166560ad30928e0d7083a077b100056391a5d2 [file] [log] [blame]
Julian Hallb1d5d5f2020-11-23 18:23:48 +01001#-------------------------------------------------------------------------------
Balint Dobszay047aea82022-05-16 14:20:53 +02002# Copyright (c) 2020-2022, Arm Limited and Contributors. All rights reserved.
Julian Hallb1d5d5f2020-11-23 18:23:48 +01003#
4# SPDX-License-Identifier: BSD-3-Clause
5#
6#-------------------------------------------------------------------------------
Balint Dobszay047aea82022-05-16 14:20:53 +02007cmake_minimum_required(VERSION 3.18 FATAL_ERROR)
Julian Hallb1d5d5f2020-11-23 18:23:48 +01008include(../../deployment.cmake REQUIRED)
9
10#-------------------------------------------------------------------------------
11# The CMakeLists.txt for building the libts deployment for arm-linux
12#
13# Used for building the libts library for the arm-linux enviroment. Used for
14# locating and accessing services from a Linux userspace client. Service
15# instances can be located in any supported secure processing enviroment.
16#-------------------------------------------------------------------------------
17include(${TS_ROOT}/environments/arm-linux/env_shared_lib.cmake)
18project(trusted-services LANGUAGES CXX C)
19add_library(ts SHARED)
20target_include_directories(ts PRIVATE "${TOP_LEVEL_INCLUDE_DIRS}")
21
Gyorgy Szing186c7cc2022-09-16 01:12:50 +020022# Setting the MM communication buffer parameters
23set(MM_COMM_BUFFER_ADDRESS "0x881000000" CACHE STRING "Address of MM communicte buffer")
24set(MM_COMM_BUFFER_SIZE "8*4*1024" CACHE STRING "Size of the MM communicate buffer in bytes")
25
Julian Hallb1d5d5f2020-11-23 18:23:48 +010026#-------------------------------------------------------------------------------
Gabor Tothed8305b2024-09-24 12:47:26 +020027# For user-specific tracing set to TRACE_LEVEL_NONE and implement:
28# void trace_puts(const char *str)
29#-------------------------------------------------------------------------------
30
31set(TRACE_PREFIX "LIBTS" CACHE STRING "Trace prefix")
32set(TRACE_LEVEL "TRACE_LEVEL_DEBUG" CACHE STRING "Trace level")
33#-------------------------------------------------------------------------------
Julian Hallb1d5d5f2020-11-23 18:23:48 +010034# Components that are specific to deployment in the arm-linux environment.
35#
36#-------------------------------------------------------------------------------
37add_components(
38 TARGET "ts"
39 BASE_DIR ${TS_ROOT}
40 COMPONENTS
Julian Hallf7d55ff2021-11-22 13:57:54 +000041 "components/common/utils"
Imre Kis63761fb2023-08-02 16:16:26 +020042 "components/rpc/ts_rpc/caller/linux"
Julian Hallf7d55ff2021-11-22 13:57:54 +000043 "components/rpc/mm_communicate/caller/linux"
Julian Hallb1d5d5f2020-11-23 18:23:48 +010044 "components/service/locator/linux"
45 "components/service/locator/linux/ffa"
Julian Hall51c8aa82021-11-23 09:13:35 +000046 "components/service/locator/linux/mm_communicate"
Julian Hallb1d5d5f2020-11-23 18:23:48 +010047 "components/common/uuid"
48)
49
50#-------------------------------------------------------------------------------
51# Extend with components that are common across all deployments of
52# libts
53#
54#-------------------------------------------------------------------------------
55include(../libts.cmake REQUIRED)
56
57#-------------------------------------------------------------------------------
58# Define library options and dependencies.
59#
60#-------------------------------------------------------------------------------
Julian Hallf7d55ff2021-11-22 13:57:54 +000061target_link_libraries(ts PRIVATE gcc)