aboutsummaryrefslogtreecommitdiff
path: root/components/service/locator/standalone/standalone_env.cpp
blob: 41dd206abecb01a6297920af5625a88bfb2448fd (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
/*
 * Copyright (c) 2020-2021, Arm Limited and Contributors. All rights reserved.
 *
 * SPDX-License-Identifier: BSD-3-Clause
 */

#include <service_locator.h>
#include <service/locator/standalone/services/crypto/crypto_service_context.h>
#include <service/locator/standalone/services/test-runner/test_runner_service_context.h>
#include "standalone_location_strategy.h"
#include "standalone_service_registry.h"

void service_locator_envinit(void)
{
    static crypto_service_context crypto_context("sn:trustedfirmware.org:crypto:0");
    standalone_service_registry::instance()->regsiter_service_instance(&crypto_context);

    static test_runner_service_context test_runner_context("sn:trustedfirmware.org:test-runner:0");
    standalone_service_registry::instance()->regsiter_service_instance(&test_runner_context);

    service_locator_register_strategy(standalone_location_strategy());
}