1 /* SPDX-License-Identifier: BSD-3-Clause */
2 /*
3  * Copyright (c) 2014, ARM Limited and Contributors. All rights reserved.
4  * Copyright (c) 2018-2019, STMicroelectronics
5  */
6 
7 #ifndef __DRIVERS_STM32_ETZPC_H
8 #define __DRIVERS_STM32_ETZPC_H
9 
10 #include <util.h>
11 #include <types_ext.h>
12 
13 enum etzpc_decprot_attributes {
14 	ETZPC_DECPROT_S_RW = 0,
15 	ETZPC_DECPROT_NS_R_S_W = 1,
16 	ETZPC_DECPROT_MCU_ISOLATION = 2,
17 	ETZPC_DECPROT_NS_RW = 3,
18 	ETZPC_DECPROT_MAX = 4,
19 };
20 
21 /*
22  * Get the DECPROT attribute
23  * @decprot_id: ID that is the index of the DECPROT in the ETZPC interface
24  * Return attribute of this DECPROT
25  */
26 enum etzpc_decprot_attributes etzpc_get_decprot(uint32_t decprot_id);
27 
28 /*
29  * Configure the target TZMA secure memory range
30  * @tzma_id: ID that is the index of the TZMA in the ETZPC interface
31  * @tzma_value: Secure memory secure size in 4kByte page size. Note that this
32  * is an offset from the memory base address
33  */
34 void etzpc_configure_tzma(uint32_t tzma_id, uint16_t tzma_value);
35 
36 #endif /*__DRIVERS_STM32_ETZPC_H*/
37