se-proxy: Enable compile time service selection

Integrate compile time service selection changes to common se-proxy
components. This enables the feature on the Corstone1000 and fvp-base
platforms.

Signed-off-by: Gyorgy Szing <gyorgy.szing@arm.com>
Change-Id: I26093fb70b423ada8b97eec9cbc620e993baafb8
diff --git a/components/service/crypto/backend/psa_ipc/crypto_ipc_backend.h b/components/service/crypto/backend/psa_ipc/crypto_ipc_backend.h
index 27fe349..fe820c6 100644
--- a/components/service/crypto/backend/psa_ipc/crypto_ipc_backend.h
+++ b/components/service/crypto/backend/psa_ipc/crypto_ipc_backend.h
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2021-2024, Arm Limited and Contributors. All rights reserved.
+ * Copyright (c) 2021-2025, Arm Limited and Contributors. All rights reserved.
  *
  * SPDX-License-Identifier: BSD-3-Clause
  */
@@ -8,6 +8,7 @@
 #define CRYPTO_IPC_BACKEND_H
 
 #include <service/crypto/client/psa/psa_crypto_client.h>
+#include <psa/crypto_types.h>
 #include <psa/error.h>
 #include <rpc_caller.h>
 
diff --git a/deployments/se-proxy/env/commonsp/se_proxy_sp.c b/deployments/se-proxy/env/commonsp/se_proxy_sp.c
index 485d764..bdef9b2 100644
--- a/deployments/se-proxy/env/commonsp/se_proxy_sp.c
+++ b/deployments/se-proxy/env/commonsp/se_proxy_sp.c
@@ -1,6 +1,6 @@
 // SPDX-License-Identifier: BSD-3-Clause
 /*
- * Copyright (c) 2021-2024, Arm Limited and Contributors. All rights reserved.
+ * Copyright (c) 2021-2025, Arm Limited and Contributors. All rights reserved.
  */
 
 #include "components/rpc/common/endpoint/rpc_service_interface.h"
@@ -11,8 +11,9 @@
 #include "sp_discovery.h"
 #include "sp_rxtx.h"
 #include "trace.h"
-#include "deployments/se-proxy/infra/service_proxy_factory.h"
-#include "deployments/se-proxy/se_proxy_interfaces.h"
+#include "deployments/se-proxy/env/commonsp/proxy_service_factory_list.h"
+
+#include <stddef.h>
 
 static bool sp_init(uint16_t *own_sp_id);
 
@@ -25,6 +26,10 @@
 	uint16_t own_id = 0;
 	sp_result result = SP_RESULT_INTERNAL_ERROR;
 	rpc_status_t rpc_status = RPC_ERROR_INTERNAL;
+	unsigned int n_services = PROXY_SERVICE_FACTORY_LIST_LENGTH();
+	/* Two memory shares for each service, plus additional 6 extra slots. */
+	unsigned int n_shares = (n_services * 2) + 6;
+	const struct se_proxy_list_entry *service_factory_iterator = __proxy_service_factory_list;
 
 	/* Boot phase */
 	if (!sp_init(&own_id)) {
@@ -39,71 +44,38 @@
 		goto fatal_error;
 	}
 
-	rpc_status = ts_rpc_endpoint_sp_init(&rpc_endpoint, 5, 16);
+	rpc_status = ts_rpc_endpoint_sp_init(&rpc_endpoint, n_services, n_shares);
 	if (rpc_status != RPC_SUCCESS) {
 		EMSG("Failed to initialize RPC endpoint: %d", rpc_status);
 		goto fatal_error;
 	}
+	IMSG("Created RPC endpoint for %u service and %u memory shares.", n_services, n_shares);
 
-	/* Create service proxies */
-	rpc_iface = its_proxy_create();
-	if (!rpc_iface) {
-		EMSG("Failed to create ITS proxy");
+	/* Create services */
+	if (service_factory_iterator == __proxy_service_factory_list_end) {
+		EMSG("No services to construct.");
 		goto fatal_error;
 	}
 
-	rpc_status = ts_rpc_endpoint_sp_add_service(&rpc_endpoint, rpc_iface);
-	if (rpc_status != RPC_SUCCESS) {
-		EMSG("Failed to add service to RPC endpoint: %d", rpc_status);
-		goto fatal_error;
-	}
+	/* Iterate the proxy_service_factory_list created by the linker.
+	 * See: proxy_service_factory_list.h
+	 */
+	while (service_factory_iterator < __proxy_service_factory_list_end) {
 
-	rpc_iface = ps_proxy_create();
-	if (!rpc_iface) {
-		EMSG("Failed to create PS proxy");
-		goto fatal_error;
-	}
+		IMSG("Creating proxy service %s", service_factory_iterator->name);
 
-	rpc_status = ts_rpc_endpoint_sp_add_service(&rpc_endpoint, rpc_iface);
-	if (rpc_status != RPC_SUCCESS) {
-		EMSG("Failed to add service to RPC endpoint: %d", rpc_status);
-		goto fatal_error;
-	}
+		rpc_iface = service_factory_iterator->fn();
+		if (!rpc_iface) {
+			EMSG("Failed to create service %s", service_factory_iterator->name);
+			goto fatal_error;
+		}
+		rpc_status = ts_rpc_endpoint_sp_add_service(&rpc_endpoint, rpc_iface);
 
-	rpc_iface = crypto_proxy_create();
-	if (!rpc_iface) {
-		EMSG("Failed to create Crypto proxy");
-		goto fatal_error;
-	}
-
-	rpc_status = ts_rpc_endpoint_sp_add_service(&rpc_endpoint, rpc_iface);
-	if (rpc_status != RPC_SUCCESS) {
-		EMSG("Failed to add service to RPC endpoint: %d", rpc_status);
-		goto fatal_error;
-	}
-
-	rpc_iface = attest_proxy_create();
-	if (!rpc_iface) {
-		EMSG("Failed to create Attestation proxy");
-		goto fatal_error;
-	}
-
-	rpc_status = ts_rpc_endpoint_sp_add_service(&rpc_endpoint, rpc_iface);
-	if (rpc_status != RPC_SUCCESS) {
-		EMSG("Failed to add service to RPC endpoint: %d", rpc_status);
-		goto fatal_error;
-	}
-
-	rpc_iface = fwu_proxy_create();
-	if (!rpc_iface) {
-		EMSG("Failed to create FWU proxy");
-		goto fatal_error;
-	}
-
-	rpc_status = ts_rpc_endpoint_sp_add_service(&rpc_endpoint, rpc_iface);
-	if (rpc_status != RPC_SUCCESS) {
-		EMSG("Failed to add service to RPC endpoint: %d", rpc_status);
-		goto fatal_error;
+		if (rpc_status != RPC_SUCCESS) {
+			EMSG("Failed to add service to RPC endpoint: %d", rpc_status);
+			goto fatal_error;
+		}
+		service_factory_iterator ++;
 	}
 
 	/* End of boot phase */
diff --git a/deployments/se-proxy/infra/corstone1000/infra.cmake b/deployments/se-proxy/infra/corstone1000/infra.cmake
index 2bf6b36..22d1542 100644
--- a/deployments/se-proxy/infra/corstone1000/infra.cmake
+++ b/deployments/se-proxy/infra/corstone1000/infra.cmake
@@ -1,5 +1,5 @@
 #-------------------------------------------------------------------------------
-# Copyright (c) 2023-2024, Arm Limited and Contributors. All rights reserved.
+# Copyright (c) 2023-2025, Arm Limited and Contributors. All rights reserved.
 #
 # SPDX-License-Identifier: BSD-3-Clause
 #
@@ -7,6 +7,13 @@
 # realized with stub components that do absolutely nothing.
 #-------------------------------------------------------------------------------
 
+# Configure supported set of proxy services.
+set(CFG_ENABLE_ITS           On)
+set(CFG_ENABLE_PS            On)
+set(CFG_ENABLE_CRYPTO        On)
+set(CFG_ENABLE_CRYPTO_NANO   On)
+set(CFG_ENABLE_IAT           On)
+set(CFG_ENABLE_FWU           On)
 #-------------------------------------------------------------------------------
 # Infrastructure components
 #
@@ -18,19 +25,6 @@
 		"components/rpc/common/caller"
 		"components/rpc/rse_comms"
 		"components/messaging/rse_comms/sp"
-		"components/service/attestation/client/psa_ipc"
-		"components/service/attestation/key_mngr/local"
-		"components/service/attestation/reporter/psa_ipc"
-		"components/service/crypto/backend/psa_ipc"
-		"components/service/fwu/common"
-		"components/service/fwu/provider"
-		"components/service/fwu/provider/serializer"
-		"components/service/fwu/psa_fwu_m/agent"
-		"components/service/fwu/psa_fwu_m/interface/psa_ipc"
-		"components/service/secure_storage/backend/secure_storage_ipc"
 )
 
-target_sources(se-proxy PRIVATE
-
-	${CMAKE_CURRENT_LIST_DIR}/service_proxy_factory.c
-)
+include(../../infra/rse/service_proxy_factory.cmake REQUIRED)
diff --git a/deployments/se-proxy/infra/corstone1000/service_proxy_factory.c b/deployments/se-proxy/infra/corstone1000/service_proxy_factory.c
deleted file mode 100644
index 0e730e7..0000000
--- a/deployments/se-proxy/infra/corstone1000/service_proxy_factory.c
+++ /dev/null
@@ -1,159 +0,0 @@
-/*
- * Copyright (c) 2021-2024, Arm Limited and Contributors. All rights reserved.
- * Copyright (c) 2021-2023, Linaro Limited. All rights reserved.
- *
- * SPDX-License-Identifier: BSD-3-Clause
- */
-
-#include <stddef.h>
-#include <psa/sid.h>
-#include "rpc/common/endpoint/rpc_service_interface.h"
-#include <rpc/rse_comms/caller/sp/rse_comms_caller.h>
-#include <service/attestation/provider/attest_provider.h>
-#include <service/attestation/provider/serializer/packed-c/packedc_attest_provider_serializer.h>
-#include <service/crypto/factory/crypto_provider_factory.h>
-#include "service/fwu/psa_fwu_m/agent/psa_fwu_m_update_agent.h"
-#include "service/fwu/provider/fwu_provider.h"
-#include "service/fwu/psa_fwu_m/interface/psa_ipc/psa_fwu_ipc.h"
-#include <service/secure_storage/frontend/secure_storage_provider/secure_storage_provider.h>
-#include "service/secure_storage/frontend/secure_storage_provider/secure_storage_uuid.h"
-#include <trace.h>
-
-/* backends */
-#include <service/crypto/backend/psa_ipc/crypto_ipc_backend.h>
-#include <service/secure_storage/backend/secure_storage_ipc/secure_storage_ipc.h>
-#include <service/attestation/client/psa/iat_client.h>
-
-static const struct rpc_uuid dummy_uuid = { 0 };
-
-struct rpc_service_interface *attest_proxy_create(void)
-{
-	struct rpc_service_interface *attest_iface = NULL;
-	rpc_status_t rpc_status = RPC_ERROR_INTERNAL;
-
-	/* Static objects for proxy instance */
-	static struct rpc_caller_interface rse_comms = { 0 };
-	static struct rpc_caller_session rpc_session = { 0 };
-	static struct attest_provider attest_provider = { 0 };
-
-	rpc_status = rse_comms_caller_init(&rse_comms);
-	if (rpc_status != RPC_SUCCESS)
-		return NULL;
-
-	rpc_status = rpc_caller_session_open(&rpc_session, &rse_comms, &dummy_uuid, 0, 0);
-	if (rpc_status != RPC_SUCCESS)
-		return NULL;
-
-	/* Initialize the service provider */
-	attest_iface = attest_provider_init(&attest_provider);
-	psa_iat_client_init(&rpc_session);
-
-	attest_provider_register_serializer(&attest_provider,
-					    packedc_attest_provider_serializer_instance());
-
-	return attest_iface;
-}
-
-struct rpc_service_interface *crypto_proxy_create(void)
-{
-	struct rpc_service_interface *crypto_iface = NULL;
-	struct crypto_provider *crypto_provider;
-	rpc_status_t rpc_status = RPC_ERROR_INTERNAL;
-
-	/* Static objects for proxy instance */
-	static struct rpc_caller_interface rse_comms = { 0 };
-	static struct rpc_caller_session rpc_session = { 0 };
-
-	rpc_status = rse_comms_caller_init(&rse_comms);
-	if (rpc_status != RPC_SUCCESS)
-		return NULL;
-
-	rpc_status = rpc_caller_session_open(&rpc_session, &rse_comms, &dummy_uuid, 0, 0);
-	if (rpc_status != RPC_SUCCESS)
-		return NULL;
-
-	if (crypto_ipc_backend_init(&rpc_session) != PSA_SUCCESS)
-		return NULL;
-
-	crypto_provider = crypto_provider_factory_create();
-	crypto_iface = service_provider_get_rpc_interface(&crypto_provider->base_provider);
-
-	return crypto_iface;
-}
-
-struct rpc_service_interface *ps_proxy_create(void)
-{
-	static struct secure_storage_provider ps_provider;
-	static struct secure_storage_ipc ps_backend;
-	struct storage_backend *backend;
-	rpc_status_t rpc_status = RPC_ERROR_INTERNAL;
-	const struct rpc_uuid ps_uuid = { .uuid = TS_PSA_PROTECTED_STORAGE_UUID };
-
-	/* Static objects for proxy instance */
-	static struct rpc_caller_interface rse_comms = { 0 };
-	static struct rpc_caller_session rpc_session = { 0 };
-
-	rpc_status = rse_comms_caller_init(&rse_comms);
-	if (rpc_status != RPC_SUCCESS)
-		return NULL;
-
-	rpc_status = rpc_caller_session_open(&rpc_session, &rse_comms, &dummy_uuid, 0, 0);
-	if (rpc_status != RPC_SUCCESS)
-		return NULL;
-
-	backend = secure_storage_ipc_init(&ps_backend, &rpc_session);
-	ps_backend.service_handle = TFM_PROTECTED_STORAGE_SERVICE_HANDLE;
-
-	return secure_storage_provider_init(&ps_provider, backend, &ps_uuid);
-}
-
-struct rpc_service_interface *its_proxy_create(void)
-{
-	static struct secure_storage_provider its_provider;
-	static struct secure_storage_ipc its_backend;
-	struct storage_backend *backend;
-	rpc_status_t rpc_status = RPC_ERROR_INTERNAL;
-	const struct rpc_uuid its_uuid = { .uuid = TS_PSA_INTERNAL_TRUSTED_STORAGE_UUID };
-
-	/* Static objects for proxy instance */
-	static struct rpc_caller_interface rse_comms = { 0 };
-	static struct rpc_caller_session rpc_session = { 0 };
-
-	rpc_status = rse_comms_caller_init(&rse_comms);
-	if (rpc_status != RPC_SUCCESS)
-		return NULL;
-
-	rpc_status = rpc_caller_session_open(&rpc_session, &rse_comms, &dummy_uuid, 0, 0);
-	if (rpc_status != RPC_SUCCESS)
-		return NULL;
-
-	backend = secure_storage_ipc_init(&its_backend, &rpc_session);
-	its_backend.service_handle = TFM_INTERNAL_TRUSTED_STORAGE_SERVICE_HANDLE;
-
-	return secure_storage_provider_init(&its_provider, backend, &its_uuid);
-}
-
-struct rpc_service_interface *fwu_proxy_create(void)
-{
-	rpc_status_t rpc_status = RPC_ERROR_INTERNAL;
-	static struct update_agent *agent;
-	static struct fwu_provider fwu_provider = { 0 };
-
-	/* Static objects for proxy instance */
-	static struct rpc_caller_interface rse_comms = { 0 };
-	static struct rpc_caller_session rpc_session = { 0 };
-
-	rpc_status = rse_comms_caller_init(&rse_comms);
-	if (rpc_status != RPC_SUCCESS)
-		return NULL;
-
-	rpc_status = rpc_caller_session_open(&rpc_session, &rse_comms, &dummy_uuid, 0, 0);
-	if (rpc_status != RPC_SUCCESS)
-		return NULL;
-
-	agent = psa_fwu_m_update_agent_init(NULL, 0, 4096);
-	if (psa_fwu_ipc_init(&rpc_session) != PSA_SUCCESS)
-		return NULL;
-
-	return fwu_provider_init(&fwu_provider, agent);
-}
diff --git a/deployments/se-proxy/infra/service_proxy_factory.h b/deployments/se-proxy/infra/service_proxy_factory.h
deleted file mode 100644
index be83319..0000000
--- a/deployments/se-proxy/infra/service_proxy_factory.h
+++ /dev/null
@@ -1,26 +0,0 @@
-/*
- * Copyright (c) 2021-2024, Arm Limited and Contributors. All rights reserved.
- *
- * SPDX-License-Identifier: BSD-3-Clause
- */
-
-#ifndef SERVICE_PROXY_FACTORY_H
-#define SERVICE_PROXY_FACTORY_H
-
-#include "components/rpc/common/endpoint/rpc_service_interface.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-struct rpc_service_interface *attest_proxy_create(void);
-struct rpc_service_interface *crypto_proxy_create(void);
-struct rpc_service_interface *ps_proxy_create(void);
-struct rpc_service_interface *its_proxy_create(void);
-struct rpc_service_interface *fwu_proxy_create(void);
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* SERVICE_PROXY_FACTORY_H */
diff --git a/deployments/se-proxy/infra/stub/service_proxy_factory.c b/deployments/se-proxy/infra/stub/service_proxy_factory.c
index 0a8e6de..c6c715e 100644
--- a/deployments/se-proxy/infra/stub/service_proxy_factory.c
+++ b/deployments/se-proxy/infra/stub/service_proxy_factory.c
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2021-2024, Arm Limited and Contributors. All rights reserved.
+ * Copyright (c) 2021-2025, Arm Limited and Contributors. All rights reserved.
  *
  * SPDX-License-Identifier: BSD-3-Clause
  */
@@ -14,6 +14,8 @@
 #include "service/secure_storage/frontend/secure_storage_provider/secure_storage_provider.h"
 #include "service/secure_storage/frontend/secure_storage_provider/secure_storage_uuid.h"
 
+#include "deployments/se-proxy/env/commonsp/proxy_service_factory_list.h"
+
 /* Stub backends */
 #include <service/crypto/backend/stub/stub_crypto_backend.h>
 #include <service/secure_storage/backend/mock_store/mock_store.h>
@@ -48,6 +50,18 @@
 	return crypto_iface;
 }
 
+struct rpc_service_interface *crypto_protobuf_proxy_create(void)
+{
+	struct crypto_provider *crypto_protobuf_provider = NULL;
+
+	crypto_protobuf_provider = crypto_protobuf_provider_factory_create();
+	if (!crypto_protobuf_provider) {
+		return NULL;
+	}
+
+	return service_provider_get_rpc_interface(&crypto_protobuf_provider->base_provider);
+}
+
 struct rpc_service_interface *ps_proxy_create(void)
 {
 	static struct mock_store ps_backend;
@@ -79,3 +93,10 @@
 
 	return fwu_provider_init(&fwu_provider, agent);
 }
+
+ADD_PROXY_SERVICE_FACTORY(its_proxy_create,     ITS_PROXY,    SE_PROXY_INTERFACE_PRIO_ITS);
+ADD_PROXY_SERVICE_FACTORY(ps_proxy_create,      PS_PROXY,     SE_PROXY_INTERFACE_PRIO_PS);
+ADD_PROXY_SERVICE_FACTORY(crypto_proxy_create,  CRYPTO_PROXY, SE_PROXY_INTERFACE_PRIO_CRYPTO);
+ADD_PROXY_SERVICE_FACTORY(crypto_protobuf_proxy_create, PSACRYPTO_PROXY_NANO, SE_PROXY_INTERFACE_PRIO_CRYPTO_NANO);
+ADD_PROXY_SERVICE_FACTORY(attest_proxy_create,  IAT_PROXY,    SE_PROXY_INTERFACE_PRIO_ATTEST);
+ADD_PROXY_SERVICE_FACTORY(fwu_proxy_create,     FWU_PROXY,    SE_PROXY_INTERFACE_PRIO_FWU);
diff --git a/deployments/se-proxy/infra/stub/stub.cmake b/deployments/se-proxy/infra/stub/stub.cmake
index 58beacd..cd78b29 100644
--- a/deployments/se-proxy/infra/stub/stub.cmake
+++ b/deployments/se-proxy/infra/stub/stub.cmake
@@ -1,5 +1,5 @@
 #-------------------------------------------------------------------------------
-# Copyright (c) 2022-2024, Arm Limited and Contributors. All rights reserved.
+# Copyright (c) 2022-2025, Arm Limited and Contributors. All rights reserved.
 #
 # SPDX-License-Identifier: BSD-3-Clause
 #
@@ -7,6 +7,13 @@
 # realized with stub components that do absolutely nothing.
 #-------------------------------------------------------------------------------
 
+# Configure supported set of proxy services.
+set(CFG_ENABLE_ITS           On)
+set(CFG_ENABLE_PS            On)
+set(CFG_ENABLE_CRYPTO        On)
+set(CFG_ENABLE_CRYPTO_NANO   On)
+set(CFG_ENABLE_IAT           On)
+set(CFG_ENABLE_FWU           On)
 #-------------------------------------------------------------------------------
 # Infrastructure components
 #
diff --git a/deployments/se-proxy/se-proxy.cmake b/deployments/se-proxy/se-proxy.cmake
index 53bbf95..a205bc2 100644
--- a/deployments/se-proxy/se-proxy.cmake
+++ b/deployments/se-proxy/se-proxy.cmake
@@ -1,10 +1,23 @@
 #-------------------------------------------------------------------------------
-# Copyright (c) 2021-2023, Arm Limited and Contributors. All rights reserved.
+# Copyright (c) 2021-2025, Arm Limited and Contributors. All rights reserved.
 #
 # SPDX-License-Identifier: BSD-3-Clause
 #
 #-------------------------------------------------------------------------------
 
+# Check config options
+foreach( _cfg IN ITEMS CFG_ENABLE_ITS CFG_ENABLE_PS CFG_ENABLE_CRYPTO CFG_ENABLE_IAT CFG_ENABLE_FWU)
+	if( NOT DEFINED ${_cfg})
+		message(FATAL_ERROR "Mandatory variable \"${_cfg}\" is not defined.")
+	endif()
+endforeach()
+
+target_include_directories(se-proxy PRIVATE "${TOP_LEVEL_INCLUDE_DIRS}")
+
+#-------------------------------------------------------------------------------
+#  Service specific components
+#
+#-------------------------------------------------------------------------------
 add_components(TARGET "se-proxy"
 	BASE_DIR ${TS_ROOT}
 	COMPONENTS
@@ -12,13 +25,27 @@
 		"components/rpc/common/interface"
 		"components/rpc/common/endpoint"
 		"components/service/common/include"
-		"components/service/common/serializer/protobuf"
 		"components/service/common/client"
 		"components/service/common/provider"
+)
+
+if (CFG_ENABLE_PS OR CFG_ENABLE_ITS)
+add_components(TARGET "se-proxy"
+	BASE_DIR ${TS_ROOT}
+	COMPONENTS
+		"components/service/secure_storage/include"
+		"components/service/secure_storage/frontend/secure_storage_provider"
+		"protocols/service/secure_storage/packed-c"
+)
+endif()
+
+if (CFG_ENABLE_CRYPTO)
+add_components(TARGET "se-proxy"
+	BASE_DIR ${TS_ROOT}
+	COMPONENTS
 		"components/service/crypto/client/psa"
 		"components/service/crypto/include"
 		"components/service/crypto/provider"
-		"components/service/crypto/provider/serializer/protobuf"
 		"components/service/crypto/provider/serializer/packed-c"
 		"components/service/crypto/provider/extension/hash"
 		"components/service/crypto/provider/extension/hash/serializer/packed-c"
@@ -31,29 +58,51 @@
 		"components/service/crypto/provider/extension/aead"
 		"components/service/crypto/provider/extension/aead/serializer/packed-c"
 		"components/service/crypto/factory/full"
-		"components/service/secure_storage/include"
-		"components/service/secure_storage/frontend/secure_storage_provider"
+)
+
+if (CFG_ENABLE_CRYPTO_NANO)
+add_components(TARGET "se-proxy"
+	BASE_DIR ${TS_ROOT}
+	COMPONENTS
+		"components/service/common/serializer/protobuf"
+		"components/service/crypto/provider/serializer/protobuf"
+		"protocols/service/crypto/protobuf"
+)
+endif()
+
+endif()
+
+if(CFG_ENABLE_IAT)
+add_components(TARGET "se-proxy"
+	BASE_DIR ${TS_ROOT}
+	COMPONENTS
 		"components/service/attestation/include"
 		"components/service/attestation/provider"
 		"components/service/attestation/provider/serializer/packed-c"
 		"protocols/rpc/common/packed-c"
-		"protocols/service/secure_storage/packed-c"
-		"protocols/service/crypto/protobuf"
 )
+endif()
 
+if (CFG_ENABLE_FWU)
+add_components(TARGET "se-proxy"
+	BASE_DIR ${TS_ROOT}
+	COMPONENTS
+		"components/service/fwu/common"
+		"components/service/fwu/provider"
+		"components/service/fwu/provider/serializer"
+		"components/service/secure_storage/backend/secure_storage_ipc"
+)
+endif()
 #-------------------------------------------------------------------------------
 #  Components used from external projects
 #
 #-------------------------------------------------------------------------------
 
 # Nanopb
-include(${TS_ROOT}/external/nanopb/nanopb.cmake)
-target_link_libraries(se-proxy PRIVATE nanopb::protobuf-nanopb-static)
-protobuf_generate_all(TGT "se-proxy" NAMESPACE "protobuf" BASE_DIR "${TS_ROOT}/protocols")
+if (CFG_ENABLE_CRYPTO_NANO)
+	include(${TS_ROOT}/external/nanopb/nanopb.cmake)
+	target_link_libraries(se-proxy PRIVATE nanopb::protobuf-nanopb-static)
+	protobuf_generate_all(TGT "se-proxy" NAMESPACE "protobuf" BASE_DIR "${TS_ROOT}/protocols")
+endif()
 
 #################################################################
-
-target_include_directories(se-proxy PRIVATE
-	${TS_ROOT}
-	${TS_ROOT}/components
-)
diff --git a/deployments/se-proxy/se_proxy_interfaces.h b/deployments/se-proxy/se_proxy_interfaces.h
deleted file mode 100644
index 48908f8..0000000
--- a/deployments/se-proxy/se_proxy_interfaces.h
+++ /dev/null
@@ -1,16 +0,0 @@
-/*
- * Copyright (c) 2021, Arm Limited and Contributors. All rights reserved.
- *
- * SPDX-License-Identifier: BSD-3-Clause
- */
-
-#ifndef SE_PROXY_INTERFACES_H
-#define SE_PROXY_INTERFACES_H
-
-/* Interface IDs from service endpoints available from an se-proxy deployment */
-#define SE_PROXY_INTERFACE_ID_ITS			(0)
-#define SE_PROXY_INTERFACE_ID_PS			(1)
-#define SE_PROXY_INTERFACE_ID_CRYPTO		(2)
-#define SE_PROXY_INTERFACE_ID_ATTEST		(3)
-
-#endif /* SE_PROXY_INTERFACES_H */