Mistake on this page?
Report an issue in GitHub or email us
hal/spm_api.h
1 
2 /** \addtogroup hal */
3 /** @{*/
4 /* Copyright (c) 2017-2018 ARM Limited
5  *
6  * SPDX-License-Identifier: Apache-2.0
7  *
8  * Licensed under the Apache License, Version 2.0 (the "License");
9  * you may not use this file except in compliance with the License.
10  * You may obtain a copy of the License at
11  *
12  * http://www.apache.org/licenses/LICENSE-2.0
13  *
14  * Unless required by applicable law or agreed to in writing, software
15  * distributed under the License is distributed on an "AS IS" BASIS,
16  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
17  * See the License for the specific language governing permissions and
18  * limitations under the License.
19  */
20 
21 #ifndef __SPM_API_H__
22 #define __SPM_API_H__
23 
24 #include <stdint.h>
25 #include <stddef.h>
26 
27 #ifdef __cplusplus
28 extern "C" {
29 #endif
30 
31 
32 /** @defgroup SPM-HAL SPM HAL API
33  * The HAL functions for PSA SPM
34  * @{
35  */
36 
37 
38 /* ------------------------------------ HAL-SPE API ------------------------- */
39 
40 
41 #if defined(COMPONENT_SPE)
42 /**
43  * Start running the NSPE.
44  *
45  * Secure Processing Environment (SPE) expected to boot first. Once all
46  * the initializations are done, Nonsecure Processing Environment (NSPE)
47  * should be booted.
48  *
49  * @note The function must be implemented by target specific code.
50  */
51 void spm_hal_start_nspe(void);
52 
53 
54 /**
55  * Configure memory protection mechanism.
56  *
57  * Apply memory protection schemes to ensure secure memory can only be accessed
58  * from secure-state.
59  *
60  * @note The function must be implemented by target specific code.
61  *
62  */
64 
65 #endif // defined(COMPONENT_SPE)
66 
67 /* ---------------------------------- HAL-Mailbox API ----------------------- */
68 
69 #if defined(COMPONENT_SPM_MAILBOX)
70 /**
71  * @brief Wakeup mailbox dispatcher thread
72  *
73  * Arm implements this function, which is expected to be called by target-
74  * specific Inter-Processor-Communication logic on mailbox interrupt handler.
75  *
76  */
77 void spm_mailbox_irq_callback(void);
78 
79 /**
80  * @brief Notify the peer processor about a general event occurrence.
81  *
82  * Wake up the peer processor waiting on the mailbox driver event.
83  *
84  * @note Implement the functions below with target-specific code.
85  */
86 void spm_hal_mailbox_notify(void);
87 
88 #endif // defined(COMPONENT_SPM_MAILBOX)
89 
90 /** @}*/
91 
92 #ifdef __cplusplus
93 }
94 #endif
95 
96 #endif // __SPM_API_H__
97 
98 /** @}*/
void spm_hal_mailbox_notify(void)
Notify the peer processor about a general event occurrence.
void spm_hal_memory_protection_init(void)
Configure memory protection mechanism.
void spm_mailbox_irq_callback(void)
Wakeup mailbox dispatcher thread.
void spm_hal_start_nspe(void)
Start running the NSPE.
Important Information for this Arm website

This site uses cookies to store information on your computer. By continuing to use our site, you consent to our cookies. If you are not happy with the use of these cookies, please review our Cookie Policy to learn how they can be disabled. By disabling cookies, some features of the site will not work.