The official Mbed 2 C/C++ SDK provides the software platform and libraries to build your applications.
Dependents: hello SerialTestv11 SerialTestv12 Sierpinski ... more
mbed 2
This is the mbed 2 library. If you'd like to learn about Mbed OS please see the mbed-os docs.
TARGET_VBLUNO52/tz_context.h@166:5aab5a7997ee, 2018-04-20 (annotated)
- Committer:
- Anna Bridge
- Date:
- Fri Apr 20 11:08:29 2018 +0100
- Revision:
- 166:5aab5a7997ee
- Parent:
- 148:fd96258d940d
Updating mbed 2 version number
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
Kojto | 148:fd96258d940d | 1 | /* |
Kojto | 148:fd96258d940d | 2 | * Copyright (c) 2015-2016 ARM Limited. All rights reserved. |
Kojto | 148:fd96258d940d | 3 | * |
Kojto | 148:fd96258d940d | 4 | * SPDX-License-Identifier: Apache-2.0 |
Kojto | 148:fd96258d940d | 5 | * |
Kojto | 148:fd96258d940d | 6 | * Licensed under the Apache License, Version 2.0 (the License); you may |
Kojto | 148:fd96258d940d | 7 | * not use this file except in compliance with the License. |
Kojto | 148:fd96258d940d | 8 | * You may obtain a copy of the License at |
Kojto | 148:fd96258d940d | 9 | * |
Kojto | 148:fd96258d940d | 10 | * www.apache.org/licenses/LICENSE-2.0 |
Kojto | 148:fd96258d940d | 11 | * |
Kojto | 148:fd96258d940d | 12 | * Unless required by applicable law or agreed to in writing, software |
Kojto | 148:fd96258d940d | 13 | * distributed under the License is distributed on an AS IS BASIS, WITHOUT |
Kojto | 148:fd96258d940d | 14 | * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
Kojto | 148:fd96258d940d | 15 | * See the License for the specific language governing permissions and |
Kojto | 148:fd96258d940d | 16 | * limitations under the License. |
Kojto | 148:fd96258d940d | 17 | * |
Kojto | 148:fd96258d940d | 18 | * ---------------------------------------------------------------------------- |
Kojto | 148:fd96258d940d | 19 | * |
Kojto | 148:fd96258d940d | 20 | * $Date: 21. September 2016 |
Kojto | 148:fd96258d940d | 21 | * $Revision: V1.0 |
Kojto | 148:fd96258d940d | 22 | * |
Kojto | 148:fd96258d940d | 23 | * Project: TrustZone for ARMv8-M |
Kojto | 148:fd96258d940d | 24 | * Title: Context Management for ARMv8-M TrustZone |
Kojto | 148:fd96258d940d | 25 | * |
Kojto | 148:fd96258d940d | 26 | * Version 1.0 |
Kojto | 148:fd96258d940d | 27 | * Initial Release |
Kojto | 148:fd96258d940d | 28 | *---------------------------------------------------------------------------*/ |
Kojto | 148:fd96258d940d | 29 | |
Kojto | 148:fd96258d940d | 30 | #ifndef TZ_CONTEXT_H |
Kojto | 148:fd96258d940d | 31 | #define TZ_CONTEXT_H |
Kojto | 148:fd96258d940d | 32 | |
Kojto | 148:fd96258d940d | 33 | #include <stdint.h> |
Kojto | 148:fd96258d940d | 34 | |
Kojto | 148:fd96258d940d | 35 | #ifndef TZ_MODULEID_T |
Kojto | 148:fd96258d940d | 36 | #define TZ_MODULEID_T |
Kojto | 148:fd96258d940d | 37 | /// \details Data type that identifies secure software modules called by a process. |
Kojto | 148:fd96258d940d | 38 | typedef uint32_t TZ_ModuleId_t; |
Kojto | 148:fd96258d940d | 39 | #endif |
Kojto | 148:fd96258d940d | 40 | |
Kojto | 148:fd96258d940d | 41 | /// \details TZ Memory ID identifies an allocated memory slot. |
Kojto | 148:fd96258d940d | 42 | typedef uint32_t TZ_MemoryId_t; |
Kojto | 148:fd96258d940d | 43 | |
Kojto | 148:fd96258d940d | 44 | /// Initialize secure context memory system |
Kojto | 148:fd96258d940d | 45 | /// \return execution status (1: success, 0: error) |
Kojto | 148:fd96258d940d | 46 | uint32_t TZ_InitContextSystem_S (void); |
Kojto | 148:fd96258d940d | 47 | |
Kojto | 148:fd96258d940d | 48 | /// Allocate context memory for calling secure software modules in TrustZone |
Kojto | 148:fd96258d940d | 49 | /// \param[in] module identifies software modules called from non-secure mode |
Kojto | 148:fd96258d940d | 50 | /// \return value != 0 id TrustZone memory slot identifier |
Kojto | 148:fd96258d940d | 51 | /// \return value 0 no memory available or internal error |
Kojto | 148:fd96258d940d | 52 | TZ_MemoryId_t TZ_AllocModuleContext_S (TZ_ModuleId_t module); |
Kojto | 148:fd96258d940d | 53 | |
Kojto | 148:fd96258d940d | 54 | /// Free context memory that was previously allocated with \ref TZ_AllocModuleContext_S |
Kojto | 148:fd96258d940d | 55 | /// \param[in] id TrustZone memory slot identifier |
Kojto | 148:fd96258d940d | 56 | /// \return execution status (1: success, 0: error) |
Kojto | 148:fd96258d940d | 57 | uint32_t TZ_FreeModuleContext_S (TZ_MemoryId_t id); |
Kojto | 148:fd96258d940d | 58 | |
Kojto | 148:fd96258d940d | 59 | /// Load secure context (called on RTOS thread context switch) |
Kojto | 148:fd96258d940d | 60 | /// \param[in] id TrustZone memory slot identifier |
Kojto | 148:fd96258d940d | 61 | /// \return execution status (1: success, 0: error) |
Kojto | 148:fd96258d940d | 62 | uint32_t TZ_LoadContext_S (TZ_MemoryId_t id); |
Kojto | 148:fd96258d940d | 63 | |
Kojto | 148:fd96258d940d | 64 | /// Store secure context (called on RTOS thread context switch) |
Kojto | 148:fd96258d940d | 65 | /// \param[in] id TrustZone memory slot identifier |
Kojto | 148:fd96258d940d | 66 | /// \return execution status (1: success, 0: error) |
Kojto | 148:fd96258d940d | 67 | uint32_t TZ_StoreContext_S (TZ_MemoryId_t id); |
Kojto | 148:fd96258d940d | 68 | |
Kojto | 148:fd96258d940d | 69 | #endif // TZ_CONTEXT_H |