Support modular extension of service provider capabilities
To allow a service provider to be scalable in a modular way, the
existing chain-of-resopnsibility facilty provided by the base
service_provider is exploited to allow a set of sub providers
to extend the capabilities of the base provider. The first
use of this will be to support modular extension of the crypto
service provider.
Signed-off-by: Julian Hall <julian.hall@arm.com>
Change-Id: I4369d7a9cb99e54403768a9e3459b0ba1ac8f812
diff --git a/components/service/common/provider/service_provider.h b/components/service/common/provider/service_provider.h
index 508a93f..a4f15e4 100644
--- a/components/service/common/provider/service_provider.h
+++ b/components/service/common/provider/service_provider.h
@@ -59,6 +59,21 @@
const struct service_handler *handlers,
size_t num_handlers);
+/*
+ * Extend the core set of operations provided by a service provider by
+ * adding a sub provider that will add a capability. This facility
+ * allows a deployment to customize the set of operations
+ * supported to meet requirements by only extending the core service
+ * provider if needed.
+ */
+void service_provider_extend(struct service_provider *context,
+ struct service_provider *sub_provider);
+
+/*
+ * Link a successor to this service provider to extend the chain of responsibility
+ * to allow call handling to be delegated to different components. Used to support
+ * modular configuration of service capabilities.
+ */
static inline void service_provider_link_successor(struct service_provider *sp,
struct rpc_interface *successor)
{