1 /*
2  * Copyright (c) 2021-2024, Arm Limited. All rights reserved.
3  *
4  * SPDX-License-Identifier: BSD-3-Clause
5  *
6  */
7 
8 #ifndef __TFM_HAL_MULTI_CORE_H__
9 #define __TFM_HAL_MULTI_CORE_H__
10 
11 #include <stddef.h>
12 #include <stdint.h>
13 
14 #include "tfm_multi_core.h"
15 
16 /**
17  * \brief Performs the necessary actions to start the non-secure CPU running
18  *        the code at the specified address.
19  *
20  * \param[in] start_addr       The entry point address of non-secure code.
21  */
22 void tfm_hal_boot_ns_cpu(uintptr_t start_addr);
23 
24 /**
25  * \brief Called on the secure CPU.
26  *        Flags that the secure CPU has completed its initialization
27  *        Waits, if necessary, for the non-secure CPU to flag that
28  *        it has completed its initialisation
29  */
30 void tfm_hal_wait_for_ns_cpu_ready(void);
31 
32 /**
33  * \brief Retrieve the current active security configuration information and
34  *        fills the \ref security_attr_info_t.
35  *
36  * \param[in]  p               Base address of target memory region
37  * \param[in]  s               Size of target memory region
38  * \param[out] p_attr          Address of \ref security_attr_info_t to be filled
39  *
40  * \return void
41  */
42 void tfm_hal_get_mem_security_attr(const void *p, size_t s,
43                                    struct security_attr_info_t *p_attr);
44 
45 /**
46  * \brief Retrieve the secure memory protection configuration information and
47  *        fills the \ref mem_attr_info_t.
48  *
49  * \param[in]  p               Base address of target memory region
50  * \param[in]  s               Size of target memory region
51  * \param[out] p_attr          Address of \ref mem_attr_info_t to be filled
52  *
53  * \return void
54  */
55 void tfm_hal_get_secure_access_attr(const void *p, size_t s,
56                                     struct mem_attr_info_t *p_attr);
57 
58 /**
59  * \brief Retrieve the non-secure memory protection configuration information
60  *        and fills the \ref mem_attr_info_t.
61  *
62  * \param[in]  p               Base address of target memory region
63  * \param[in]  s               Size of target memory region
64  * \param[out] p_attr          Address of \ref mem_attr_info_t to be filled
65  *
66  * \return void
67  */
68 void tfm_hal_get_ns_access_attr(const void *p, size_t s,
69                                 struct mem_attr_info_t *p_attr);
70 
71 #endif /* __TFM_HAL_MULTI_CORE_H__ */
72