Julian Hall | 8cff2b8 | 2020-11-23 18:12:17 +0100 | [diff] [blame] | 1 | /* |
Julian Hall | eae7179 | 2022-07-05 15:57:40 +0100 | [diff] [blame] | 2 | * Copyright (c) 2020-2022, Arm Limited and Contributors. All rights reserved. |
Julian Hall | 8cff2b8 | 2020-11-23 18:12:17 +0100 | [diff] [blame] | 3 | * |
| 4 | * SPDX-License-Identifier: BSD-3-Clause |
| 5 | */ |
| 6 | |
| 7 | #include <service_locator.h> |
| 8 | #include <service/locator/standalone/services/crypto/crypto_service_context.h> |
julhal01 | 3a4207d | 2021-03-08 13:32:08 +0000 | [diff] [blame] | 9 | #include <service/locator/standalone/services/internal-trusted-storage/its_service_context.h> |
| 10 | #include <service/locator/standalone/services/protected-storage/ps_service_context.h> |
julhal01 | 3ec4c32 | 2021-02-05 17:30:49 +0000 | [diff] [blame] | 11 | #include <service/locator/standalone/services/test-runner/test_runner_service_context.h> |
Julian Hall | 700aa36 | 2021-05-13 15:30:39 +0100 | [diff] [blame] | 12 | #include <service/locator/standalone/services/attestation/attestation_service_context.h> |
Julian Hall | eae7179 | 2022-07-05 15:57:40 +0100 | [diff] [blame] | 13 | #include <service/locator/standalone/services/block-storage/block_storage_service_context.h> |
Julian Hall | 2ca63d8 | 2022-12-21 15:20:43 +0000 | [diff] [blame^] | 14 | #include <service/locator/standalone/services/fwu/fwu_service_context.h> |
Julian Hall | 976f9cd | 2021-10-08 09:52:01 +0100 | [diff] [blame] | 15 | #include <service/locator/standalone/services/smm-variable/smm_variable_service_context.h> |
Julian Hall | 8cff2b8 | 2020-11-23 18:12:17 +0100 | [diff] [blame] | 16 | #include "standalone_location_strategy.h" |
| 17 | #include "standalone_service_registry.h" |
| 18 | |
| 19 | void service_locator_envinit(void) |
| 20 | { |
Julian Hall | 976f9cd | 2021-10-08 09:52:01 +0100 | [diff] [blame] | 21 | static crypto_service_context crypto_context("sn:trustedfirmware.org:crypto:0"); |
| 22 | standalone_service_registry::instance()->regsiter_service_instance(&crypto_context); |
julhal01 | 3ec4c32 | 2021-02-05 17:30:49 +0000 | [diff] [blame] | 23 | |
Julian Hall | 976f9cd | 2021-10-08 09:52:01 +0100 | [diff] [blame] | 24 | static its_service_context its_service_context("sn:trustedfirmware.org:internal-trusted-storage:0"); |
| 25 | standalone_service_registry::instance()->regsiter_service_instance(&its_service_context); |
julhal01 | 3a4207d | 2021-03-08 13:32:08 +0000 | [diff] [blame] | 26 | |
Julian Hall | 976f9cd | 2021-10-08 09:52:01 +0100 | [diff] [blame] | 27 | static ps_service_context ps_service_context("sn:trustedfirmware.org:protected-storage:0"); |
| 28 | standalone_service_registry::instance()->regsiter_service_instance(&ps_service_context); |
julhal01 | 3a4207d | 2021-03-08 13:32:08 +0000 | [diff] [blame] | 29 | |
Julian Hall | 976f9cd | 2021-10-08 09:52:01 +0100 | [diff] [blame] | 30 | static test_runner_service_context test_runner_context("sn:trustedfirmware.org:test-runner:0"); |
| 31 | standalone_service_registry::instance()->regsiter_service_instance(&test_runner_context); |
julhal01 | 3ec4c32 | 2021-02-05 17:30:49 +0000 | [diff] [blame] | 32 | |
Julian Hall | 976f9cd | 2021-10-08 09:52:01 +0100 | [diff] [blame] | 33 | static attestation_service_context attestation_context("sn:trustedfirmware.org:attestation:0"); |
| 34 | standalone_service_registry::instance()->regsiter_service_instance(&attestation_context); |
Julian Hall | 700aa36 | 2021-05-13 15:30:39 +0100 | [diff] [blame] | 35 | |
Julian Hall | eae7179 | 2022-07-05 15:57:40 +0100 | [diff] [blame] | 36 | static block_storage_service_context block_storage_context("sn:trustedfirmware.org:block-storage:0"); |
| 37 | standalone_service_registry::instance()->regsiter_service_instance(&block_storage_context); |
| 38 | |
Julian Hall | 2ca63d8 | 2022-12-21 15:20:43 +0000 | [diff] [blame^] | 39 | static fwu_service_context fwu_context("sn:trustedfirmware.org:fwu:0"); |
| 40 | standalone_service_registry::instance()->regsiter_service_instance(&fwu_context); |
| 41 | |
Julian Hall | 976f9cd | 2021-10-08 09:52:01 +0100 | [diff] [blame] | 42 | static smm_variable_service_context smm_variable_context("sn:trustedfirmware.org:smm-variable:0"); |
| 43 | standalone_service_registry::instance()->regsiter_service_instance(&smm_variable_context); |
| 44 | |
| 45 | service_locator_register_strategy(standalone_location_strategy()); |
julhal01 | 3a4207d | 2021-03-08 13:32:08 +0000 | [diff] [blame] | 46 | } |