DOC: update documentation.
Add documentation covering:
- developer information about architecture
- project structure and building
- project overview and service descriptions
- the portability model for supporting hardware
Signed-off-by: Julian Hall <julian.hall@arm.com>
Co-Authored-By: Gyorgy Szing <gyorgy.szing@gmail.com>
Change-Id: I8bf9c01a66350719d82a7ca2bc1c78a8ab17978d
diff --git a/docs/developer/uml/BuildFlow.puml b/docs/developer/uml/BuildFlow.puml
new file mode 100644
index 0000000..0dc1468
--- /dev/null
+++ b/docs/developer/uml/BuildFlow.puml
@@ -0,0 +1,55 @@
+'-------------------------------------------------------------------------------
+' Copyright (c) 2020-2021, Arm Limited and Contributors. All rights reserved.
+'
+' SPDX-License-Identifier: BSD-3-Clause
+'
+'-------------------------------------------------------------------------------
+
+@startuml
+
+(*) --> [cmake command] "Generating"
+note right
+ Generate native build files from deployment
+ configuration files. External components are
+ fetched and built. Child deployments are
+ generated, built and installed.
+end note
+
+If "success"
+ --> [false]"Generation Errors" #Red
+else
+ --> [true]"Generated"
+Endif
+
+--> [make install command] "Building"
+note right
+ Compile and link to create build output.
+end note
+
+If "success"
+ --> [false]"Build Errors" #Red
+else
+ --> [true]"Built"
+Endif
+
+--> "Installing"
+note right
+ Copy build output files to installation
+ directory specified by CMAKE_INSTALL_PREFIX.
+end note
+
+If "success"
+ --> [false]"Install Errors" #Red
+else
+ --> [true]"Installed"
+Endif
+
+--> "Deploying" #Green
+note right
+ Perform environment specific
+ deployment steps.
+end note
+
+--> "Deployed" #Green
+
+@enduml
\ No newline at end of file
diff --git a/docs/developer/uml/RpcSessionClassDiagram.puml b/docs/developer/uml/RpcSessionClassDiagram.puml
new file mode 100644
index 0000000..d264560
--- /dev/null
+++ b/docs/developer/uml/RpcSessionClassDiagram.puml
@@ -0,0 +1,20 @@
+'-------------------------------------------------------------------------------
+' Copyright (c) 2020-2021, Arm Limited and Contributors. All rights reserved.
+'
+' SPDX-License-Identifier: BSD-3-Clause
+'
+'-------------------------------------------------------------------------------
+
+@startuml
+
+class rpc_caller {
+ {abstract}int call(opcode, param_buf, result_buf)
+}
+
+rpc_caller -> call_ep
+note right on link
+Association with call_ep is made when
+RPC session is established.
+end note
+
+@enduml
\ No newline at end of file
diff --git a/docs/developer/uml/SecureServicesLayers.puml b/docs/developer/uml/SecureServicesLayers.puml
new file mode 100644
index 0000000..114b2fb
--- /dev/null
+++ b/docs/developer/uml/SecureServicesLayers.puml
@@ -0,0 +1,46 @@
+'-------------------------------------------------------------------------------
+' Copyright (c) 2020-2021, Arm Limited and Contributors. All rights reserved.
+'
+' SPDX-License-Identifier: BSD-3-Clause
+'
+'-------------------------------------------------------------------------------
+
+@startuml
+
+!include ../../uml/style-component.puml
+
+package "Client Processing Environment" COLOR_GREY1 {
+ NS_COMPONENT trusted_service_client as "Trusted Service client"
+ NS_IFC ns_rpc as "RPC"
+ NS_COMPONENT rpc_caller as "RPC Caller"
+ NS_IFC ns_messaging as "messaging"
+ NS_COMPONENT ns_messaging_layer as "Messaging Layer"
+}
+trusted_service_client --down-> ns_rpc
+ns_rpc-down->rpc_caller
+rpc_caller-down->ns_messaging
+ns_messaging-down->ns_messaging_layer
+
+package "Secure Processing Environment" COLOR_BLUE2 {
+ S_COMPONENT trusted_service_provider as "Trusted Service Provider"
+ S_COMPONENT rpc_endpoint as "RPC endpoint"
+ S_COMPONENT s_messaging_layer as "Messaging Layer"
+ S_COMPONENT backend_service as "Backend Service"
+ S_IFC s_rpc as "RPC"
+ S_IFC s_messaging as "messaging"
+ S_IFC s_backend as "backend interface"
+}
+
+trusted_service_provider --down-> s_rpc
+s_rpc-down->rpc_endpoint
+rpc_endpoint-down->s_messaging
+s_messaging-down->s_messaging_layer
+
+trusted_service_provider-down->s_backend
+s_backend-down->backend_service
+
+trusted_service_client<.>trusted_service_provider
+rpc_caller<.>rpc_endpoint
+ns_messaging_layer<.>s_messaging_layer
+
+@enduml
\ No newline at end of file
diff --git a/docs/developer/uml/ServiceDeployment.puml b/docs/developer/uml/ServiceDeployment.puml
new file mode 100644
index 0000000..8c6f954
--- /dev/null
+++ b/docs/developer/uml/ServiceDeployment.puml
@@ -0,0 +1,84 @@
+'-------------------------------------------------------------------------------
+' Copyright (c) 2020-2021, Arm Limited and Contributors. All rights reserved.
+'
+' SPDX-License-Identifier: BSD-3-Clause
+'
+'-------------------------------------------------------------------------------
+
+@startuml
+
+!include ../../uml/style-component.puml
+
+skinparam component {
+ BackgroundColor COLOR_BLUE2
+}
+
+skinparam package {
+ BackgroundColor COLOR_BLUE1
+}
+
+package "tools" {
+ component sw_qa as "Software QA Tools"
+ component compiler_toolchain as "Compiler Toolchain"
+}
+
+package "protocols" {
+ component proto_protobuf as "Protobuf interface definition"
+ component proto_packed_c as "Packed-C interface definition"
+}
+
+package "platform" {
+ component plat_interfaces as "Common driver interfaces"
+ component plat_providers as "Platform providers"
+}
+
+package "deployments" {
+ component deploy_deploy as "Deployment"
+ component depoy_build_cfg as "Deployment specific build configuration"
+ component deploy_init as "Deployment specific service initialization"
+}
+
+package "components" {
+ component comp_src as "Source files"
+ component comp_test_cases as "Test cases"
+ component comp_adapters as "Adapters"
+}
+
+package "external" {
+ component ext_all as "External components/libraries"
+}
+
+package "environments" {
+ component env_build_cfg as "Environment build configuration"
+ component env_libs as "Environment libraries"
+ component env_hdrs as "Environment header files"
+ component env_inst as "installation"
+ env_build_cfg-[hidden]->env_libs
+ env_build_cfg-[hidden]->env_hdrs
+}
+
+deploy_deploy ...> depoy_build_cfg
+deploy_deploy .up.> deploy_init
+
+deploy_deploy ..left..> proto_protobuf
+deploy_deploy ..left..> proto_packed_c
+
+deploy_deploy ..right..> env_build_cfg
+deploy_deploy ..right..> env_libs
+deploy_deploy ..right..> env_hdrs
+deploy_deploy ..right..> env_inst
+
+deploy_deploy ..up..> sw_qa
+deploy_deploy ..up..> compiler_toolchain
+
+deploy_deploy ..> ext_all
+
+deploy_deploy ..down..> comp_src
+deploy_deploy ..down..> comp_test_cases
+deploy_deploy ..down..> comp_adapters
+
+deploy_init -[hidden]up-> proto_protobuf
+
+comp_adapters ...> plat_interfaces
+
+@enduml
\ No newline at end of file
diff --git a/docs/developer/uml/ServiceLocationStrategyClassDiagram.puml b/docs/developer/uml/ServiceLocationStrategyClassDiagram.puml
new file mode 100644
index 0000000..4ef2c52
--- /dev/null
+++ b/docs/developer/uml/ServiceLocationStrategyClassDiagram.puml
@@ -0,0 +1,24 @@
+'-------------------------------------------------------------------------------
+' Copyright (c) 2020-2021, Arm Limited and Contributors. All rights reserved.
+'
+' SPDX-License-Identifier: BSD-3-Clause
+'
+'-------------------------------------------------------------------------------
+
+@startuml
+
+class service_location_strategy
+{
+ {abstract} service_context query(service_name)
+}
+
+class service_locator <<singleton>>
+{
+ void init()
+ void register_strategy(strategy)
+ service_context query(service_name)
+}
+
+service_locator --> "0..*" service_location_strategy
+
+@enduml
\ No newline at end of file
diff --git a/docs/developer/uml/ServiceLocatorClassDiagram.puml b/docs/developer/uml/ServiceLocatorClassDiagram.puml
new file mode 100644
index 0000000..0519f41
--- /dev/null
+++ b/docs/developer/uml/ServiceLocatorClassDiagram.puml
@@ -0,0 +1,37 @@
+'-------------------------------------------------------------------------------
+' Copyright (c) 2020-2021, Arm Limited and Contributors. All rights reserved.
+'
+' SPDX-License-Identifier: BSD-3-Clause
+'
+'-------------------------------------------------------------------------------
+
+@startuml
+
+class service_client
+
+class rpc_caller
+{
+ rpc_call_handle call_begin()
+ int call_invoke()
+ void call_end()
+}
+
+abstract class service_context
+{
+ {abstract} rpc_caller open()
+ {abstract} void close(rpc_caller)
+}
+
+class service_locator <<singleton>>
+{
+ service_context query(service_name)
+ void relinquish(service_context)
+}
+
+service_locator ..> "finds" service_context
+service_context ..> "opens session" rpc_caller
+service_client ..> "queries" service_locator
+service_client --> service_context
+service_client --> rpc_caller
+
+@enduml
\ No newline at end of file