blob: bd0e8fda95d79dc230b912efbaae8d466383bab2 [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
40 /* The maximum supported size for an RPC call request. This limit
41 * will be imposed by the underlying RPC layer used by a client
42 * to call service operations.
43 */
44 uint32_t max_req_size;
45};
46
47/* Variable length output parameter tags */
48enum
49{
50 /* Identifies the service naming authority e.g 'trustedfirmware.org' */
51 TS_DISOVERY_GET_SERVICE_INFO_OUT_TAG_NAME_AUTHORITY = 1,
52
53 /* The service name string assigned by the naming authority e.g. 'crypto' */
54 TS_DISOVERY_GET_SERVICE_INFO_OUT_TAG_SERVICE_NAME = 2
55};
56
57#endif /* TS_DISCOVERY_GET_SERVICE_INFO_H */