mbed library sources. Supersedes mbed-src.

Dependents:   Nucleo_Hello_Encoder BLE_iBeaconScan AM1805_DEMO DISCO-F429ZI_ExportTemplate1 ... more

Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers spm_api.h Source File

spm_api.h

00001 
00002 /** \addtogroup hal */
00003 /** @{*/
00004 /* Copyright (c) 2017-2018 ARM Limited
00005  *
00006  * SPDX-License-Identifier: Apache-2.0
00007  *
00008  * Licensed under the Apache License, Version 2.0 (the "License");
00009  * you may not use this file except in compliance with the License.
00010  * You may obtain a copy of the License at
00011  *
00012  *     http://www.apache.org/licenses/LICENSE-2.0
00013  *
00014  * Unless required by applicable law or agreed to in writing, software
00015  * distributed under the License is distributed on an "AS IS" BASIS,
00016  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
00017  * See the License for the specific language governing permissions and
00018  * limitations under the License.
00019  */
00020 
00021 #ifndef __SPM_API_H__
00022 #define __SPM_API_H__
00023 
00024 #include <stdint.h>
00025 #include <stddef.h>
00026 
00027 #ifdef __cplusplus
00028 extern "C" {
00029 #endif
00030 
00031 
00032 /** @defgroup SPM-HAL SPM HAL API
00033  *  The HAL functions for PSA SPM
00034  * @{
00035  */
00036 
00037 
00038 /* ------------------------------------ HAL-SPE API ------------------------- */
00039 
00040 
00041 #if defined(COMPONENT_SPE)
00042 /**
00043  * Start running the NSPE.
00044  *
00045  * Secure Processing Environment (SPE) expected to boot first. Once all
00046  * the initializations are done, Nonsecure Processing Environment (NSPE)
00047  * should be booted.
00048  *
00049  * @note The function must be implemented by target specific code.
00050  */
00051 void spm_hal_start_nspe(void);
00052 
00053 
00054 /**
00055  * Configure memory protection mechanism.
00056  *
00057  * Apply memory protection schemes to ensure secure memory can only be accessed
00058  * from secure-state.
00059  *
00060  * @note The function must be implemented by target specific code.
00061  *
00062  */
00063 void spm_hal_memory_protection_init(void);
00064 
00065 #endif // defined(COMPONENT_SPE)
00066 
00067 /* ---------------------------------- HAL-Mailbox API ----------------------- */
00068 
00069 #if defined(COMPONENT_SPM_MAILBOX)
00070 /**
00071  * @brief Wakeup mailbox dispatcher thread
00072  *
00073  * Arm implements this function, which is expected to be called by target-
00074  * specific Inter-Processor-Communication logic on mailbox interrupt handler.
00075  *
00076  */
00077 void spm_mailbox_irq_callback(void);
00078 
00079 /**
00080  * @brief Notify the peer processor about a general event occurrence.
00081  *
00082  * Wake up the peer processor waiting on the mailbox driver event.
00083  *
00084  * @note Implement the functions below with target-specific code.
00085  */
00086 void spm_hal_mailbox_notify(void);
00087 
00088 #endif // defined(COMPONENT_SPM_MAILBOX)
00089 
00090 /** @}*/
00091 
00092 #ifdef __cplusplus
00093 }
00094 #endif
00095 
00096 #endif  // __SPM_API_H__
00097 
00098 /** @}*/