TF-M Reference Manual  1.2.0
TrustedFirmware-M
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
tfm_multi_core.h
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2019-2020, Arm Limited. All rights reserved.
3  *
4  * SPDX-License-Identifier: BSD-3-Clause
5  *
6  */
7 
8 #ifndef __TFM_MULTI_CORE_H__
9 #define __TFM_MULTI_CORE_H__
10 
11 #include <stdbool.h>
12 
13 /* Security attributes of target memory region in memory access check. */
15  bool is_valid; /* Whether the target memory region is valid */
16  bool is_secure; /* Secure memory or non-secure memory */
17 };
18 
19 /* Memory access attributes of target memory region in memory access check. */
21  bool is_mpu_enabled; /* Whether memory protection unit(s) enabled */
22  bool is_valid; /* Whether the target memory region is valid */
23  bool is_xn; /* Execute Never or not */
24  bool is_priv_rd_allow; /* Privileged read is allowed or not */
25  bool is_priv_wr_allow; /* Privileged write is allowed or not */
26  bool is_unpriv_rd_allow; /* Unprivileged read is allowed or not */
27  bool is_unpriv_wr_allow; /* Unprivileged write is allowed or not */
28 };
29 
43 void tfm_get_mem_region_security_attr(const void *p, size_t s,
44  struct security_attr_info_t *p_attr);
45 
60 void tfm_get_secure_mem_region_attr(const void *p, size_t s,
61  struct mem_attr_info_t *p_attr);
62 
77 void tfm_get_ns_mem_region_attr(const void *p, size_t s,
78  struct mem_attr_info_t *p_attr);
79 
90 int32_t tfm_has_access_to_region(const void *p, size_t s, uint32_t attr);
91 
92 #endif /* __TFM_MULTI_CORE_H__ */
void tfm_get_ns_mem_region_attr(const void *p, size_t s, struct mem_attr_info_t *p_attr)
Retrieve general non-secure memory protection configuration information of the target memory region a...
void tfm_get_mem_region_security_attr(const void *p, size_t s, struct security_attr_info_t *p_attr)
Retrieve general security isolation configuration information of the target memory region according t...
int32_t tfm_has_access_to_region(const void *p, size_t s, uint32_t attr)
Check whether a memory access is allowed to access to a memory range.
void tfm_get_secure_mem_region_attr(const void *p, size_t s, struct mem_attr_info_t *p_attr)
Retrieve general secure memory protection configuration information of the target memory region accor...