cmsis_TZstack.h 2.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  1. /*
  2. * Copyright (c) 2015-2016 ARM Limited. All rights reserved.
  3. *
  4. * SPDX-License-Identifier: Apache-2.0
  5. *
  6. * Licensed under the Apache License, Version 2.0 (the License); you may
  7. * not use this file except in compliance with the License.
  8. * You may obtain a copy of the License at
  9. *
  10. * http://www.apache.org/licenses/LICENSE-2.0
  11. *
  12. * Unless required by applicable law or agreed to in writing, software
  13. * distributed under the License is distributed on an AS IS BASIS, WITHOUT
  14. * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  15. * See the License for the specific language governing permissions and
  16. * limitations under the License.
  17. *
  18. * ----------------------------------------------------------------------
  19. *
  20. * $Date: 18. February 2016
  21. * $Revision: V0.01
  22. *
  23. * Project: CMSIS-RTOS extensions for ARMv8-M TrustZone
  24. * Title: Secure Stack Management for RTOS on ARMv8-M TrustZone
  25. *
  26. * Version 0.01
  27. * Initial Proposal Phase
  28. *---------------------------------------------------------------------------*/
  29. #ifndef __cmsis_TZstack_H
  30. #define __cmsis_TZstack_H
  31. #include <stdint.h>
  32. /// Initialize Secure Process Stack Management
  33. /// \return execution status (0: success, <0: error)
  34. int32_t TZ_Init_Stack_S (void);
  35. /// Allocate Memory for Secure Process Stack Management
  36. /// \param[in] box_id secure box identifier
  37. /// \return value >= 0 context identifier
  38. /// \return value < 0 no memory available or internal error
  39. int32_t TZ_Alloc_Stack_S (uint32_t box_id);
  40. /// Free Memory for Secure Process Stack Management
  41. /// \param[in] context_id context identifier
  42. /// \return execution status (0: success, <0: error)
  43. int32_t TZ_Free_Stack_S (int32_t context_id);
  44. /// Load Secure Context
  45. /// \param[in] context_id context identifier
  46. /// \return execution status (0: success, <0: error)
  47. int32_t TZ_Load_Context_S (int32_t context_id);
  48. /// Store Secure Context
  49. /// \param[in] context_id context identifier
  50. /// \return execution status (0: success, <0: error)
  51. int32_t TZ_Store_Context_S (int32_t context_id);
  52. #endif // __cmsis_TZstack_H