blob: 65428b4dde9b220ef29888e573828aed2da76e57 [file] [log] [blame]
AlexeiFedorovb8851a72025-04-24 11:40:28 +01001/*
2 * Copyright (c) 2025, Arm Limited. All rights reserved.
3 *
4 * SPDX-License-Identifier: BSD-3-Clause
5 *
6 */
7
8#ifndef REALM_DA_HELPERS_H
9#define REALM_DA_HELPERS_H
10
11#include <realm_rsi.h>
12
13/*
14 * Currently assigning one device is supported, for more than one device the VMM
15 * view of vdev_id and Realm view of device_id must match
16 */
17#define RDEV_ID (0x0UL)
18
19#define RDEV_TDISP_VERSION_MAX (0x10)
20
21struct rdev {
22 unsigned long id;
23 unsigned long inst_id;
24};
25
26unsigned long realm_rdev_init(struct rdev *rdev, unsigned long rdev_id);
27unsigned long realm_rsi_rdev_start(struct rdev *rdev);
28unsigned long realm_rsi_rdev_stop(struct rdev *rdev);
29unsigned long realm_rsi_rdev_get_interface_report(struct rdev *rdev);
30unsigned long realm_rsi_rdev_get_state(struct rdev *rdev);
31unsigned long realm_rsi_rdev_lock(struct rdev *rdev);
32int realm_verify_device_attestation(struct rdev *rdev,
33 struct rsi_dev_info *rdev_info);
34unsigned long realm_rsi_rdev_get_measurements(struct rdev *rdev,
35 struct rsi_dev_measure_params *mparams);
36unsigned long realm_rsi_rdev_get_info(struct rdev *rdev,
37 struct rsi_dev_info *rdev_info);
38
39#endif /* REALM_DA_HELPERS_H */