1 /* 2 * Copyright (c) 2017-2020, STMicroelectronics - All Rights Reserved 3 * 4 * SPDX-License-Identifier: BSD-3-Clause 5 */ 6 7 #ifndef DRIVERS_ST_ETZPC_H 8 #define DRIVERS_ST_ETZPC_H 9 10 /* Define security level for each peripheral (DECPROT) */ 11 enum etzpc_decprot_attributes { 12 ETZPC_DECPROT_S_RW = 0, 13 ETZPC_DECPROT_NS_R_S_W = 1, 14 ETZPC_DECPROT_MCU_ISOLATION = 2, 15 ETZPC_DECPROT_NS_RW = 3, 16 ETZPC_DECPROT_MAX = 4, 17 }; 18 19 void etzpc_configure_decprot(uint32_t decprot_id, 20 enum etzpc_decprot_attributes decprot_attr); 21 enum etzpc_decprot_attributes etzpc_get_decprot(uint32_t decprot_id); 22 void etzpc_lock_decprot(uint32_t decprot_id); 23 24 void etzpc_configure_tzma(uint32_t tzma_id, uint16_t tzma_value); 25 uint16_t etzpc_get_tzma(uint32_t tzma_id); 26 void etzpc_lock_tzma(uint32_t tzma_id); 27 bool etzpc_get_lock_tzma(uint32_t tzma_id); 28 29 uint8_t etzpc_get_num_per_sec(void); 30 uint8_t etzpc_get_revision(void); 31 uintptr_t etzpc_get_base_address(void); 32 33 int etzpc_init(void); 34 35 #endif /* DRIVERS_ST_ETZPC_H */ 36