blob: 1f417015e0a1d70c040c8836a71ae19be6e62d44 [file] [log] [blame]
Julian Hallc2d78b52021-07-28 09:36:51 +01001/*
2 * Copyright (c) 2021, Arm Limited and Contributors. All rights reserved.
3 * SPDX-License-Identifier: BSD-3-Clause
4 */
5
6#ifndef TS_DISCOVERY_GET_SERVICE_INFO_H
7#define TS_DISCOVERY_GET_SERVICE_INFO_H
8
9#include <stdint.h>
10
11/**
12 * Parameter definitions for the GET_SERVICE_INFO operation.
13 *
14 * Returns information about how to communicate with the service
15 * interface.
16 */
17
18/* Mandatory fixed sized output parameters */
19struct __attribute__ ((__packed__)) ts_discovery_get_service_info_out
20{
21 /* The RPC interface id that should be used to
22 * communicate with this service provder instance.
23 */
24 uint16_t interface_id;
25
26 /* The instance number assigned to this service provider.
27 * Used for identifying a particular instance of a service
28 * provider within a system that may host multiple instances.
29 * This instance may be used as a binding by clients and may be
30 * reflected at the kernel/userspace interface via a device node
31 * with a particular instance e.g. /dev/tpm0.
32 */
33 uint16_t instance;
34
35 /* A bitmap of supported access protocol encodings for parameter
36 * serialization. A service provider may support 1..* encodings.
37 */
38 uint32_t supported_encodings;
39
Julian Hall3e614542021-07-29 11:47:47 +010040 /* The maximum supported payloadsize for an RPC call request or
41 * response. This limit will be imposed by the underlying RPC
42 * layer used by a client to call service operations. If the
43 * maximum payload size is different between call requests and
44 * responses, the smaller value should be used.
Julian Hallc2d78b52021-07-28 09:36:51 +010045 */
Julian Hall3e614542021-07-29 11:47:47 +010046 uint32_t max_payload;
Julian Hallc2d78b52021-07-28 09:36:51 +010047};
48
49/* Variable length output parameter tags */
50enum
51{
52 /* Identifies the service naming authority e.g 'trustedfirmware.org' */
53 TS_DISOVERY_GET_SERVICE_INFO_OUT_TAG_NAME_AUTHORITY = 1,
54
55 /* The service name string assigned by the naming authority e.g. 'crypto' */
56 TS_DISOVERY_GET_SERVICE_INFO_OUT_TAG_SERVICE_NAME = 2
57};
58
59#endif /* TS_DISCOVERY_GET_SERVICE_INFO_H */