blob: afab51ed39124a45491521d6a04e62ff63a3b234 [file] [log] [blame]
Antonio de Angelis8908f472018-08-31 15:44:25 +01001/*
2 * Copyright (c) 2018, Arm Limited. All rights reserved.
3 *
4 * SPDX-License-Identifier: BSD-3-Clause
5 *
6 */
7
8#ifndef __TFM_CRYPTO_UTILS_H__
9#define __TFM_CRYPTO_UTILS_H__
10
11#ifdef __cplusplus
12extern "C" {
13#endif
14
15#include "tfm_secure_api.h"
16
17/**
18 * \brief Checks that a given type of access on a memory address with a
19 * a given size is allowed
20 *
21 * \param[in] addr Base address to be checked
22 * \param[in] size Size of the buffer to checked
23 * \param[in] access Type of access (1: READ ONLY, 2: READ/WRITE)
24 *
25 * \return Returns values as described in \ref tfm_crypto_err_t
26 */
27enum tfm_crypto_err_t tfm_crypto_memory_check(void *addr,
28 uint32_t size,
29 uint32_t access);
30#ifdef __cplusplus
31}
32#endif
33
34#endif /* __TFM_CRYPTO_UTILS_H__ */