blob: c18fdf2f4b8a36d2729efc513d1bbc348c2d91ac [file] [log] [blame]
Lucian Paul-Trifu3519afe2022-03-08 15:02:31 +00001/*
2 * Copyright (c) 2021 Arm Limited and Contributors. All rights reserved.
3 *
4 * SPDX-License-Identifier: BSD-3-Clause
5 *
6 */
7
8#ifndef __DRTM_CACHE_H
9#define __DRTM_CACHE_H
10
11#include <stdbool.h>
12
13/*
14 * XXX Note: the generic protected DRTM resources are being specialised into
15 * DRTM TCB hashes. Platform resources retrieved through the generic DRTM cache
16 * are going to be retrieved through bespoke interfaces instead.
17 * This file will be removed once the transition is complete.
18 */
19
20void drtm_cache_init(void);
21
22int drtm_cache_resource_opt(const char *id, size_t bytes, const char *data, bool cache_data);
23#define drtm_cache_resource(id, bytes, data) \
24 drtm_cache_resource_opt(id, bytes, data, true)
25#define drtm_cache_resource_ptr(id, bytes, data) \
26 drtm_cache_resource_opt(id, bytes, data, false)
27
28void drtm_cache_get_resource(const char *id,
29 const char **res_out, size_t *res_out_bytes);
30
31#endif /* __DRTM_CACHE_H */