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