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