blob: db4f04555a39e50fbf97e7907067889a2455ba10 [file] [log] [blame]
Javier Almansa Sobrinoc4ad5b02022-07-05 19:05:14 +01001/*
2 * SPDX-License-Identifier: BSD-3-Clause
3 * SPDX-FileCopyrightText: Copyright TF-RMM Contributors.
4 */
5
6#ifndef TEST_HARNESS_H
7#define TEST_HARNESS_H
8
9#include <buffer.h>
10
11/*
12 * Below functions are to be defined by the tests and allow them to implement
13 * specific host harness APIs as defined in host_harness.h
14 */
15
16/*
17 * Map a given granule address to a specific slot buffer
18 * Args
19 * slot - Slot buffer type where to map to
20 * addr - Granule address to map
21 * ns - Flag to indicate if the granule is a non-secure one
22 * Return
23 * The VA (or platform equivalent) where the granule was mapped to
24 */
25void *test_buffer_map(enum buffer_slot slot,
26 unsigned long addr, bool ns);
27
28/*
29 * Unmap a given granule from its corresponding slot buffer given the
30 * mapped granule address.
31 */
32void test_buffer_unmap(void *buf);
33
34#endif /* TEST_HARNESS */