Files
Linux_Drivers/u-boot-2021.10/arch/arm/mach-stm32mp/include/mach/tzc.h
sam.xiang f8fc109960 [uboot] create uboot from github:
repo: https://github.com/u-boot/u-boot
	commit: d80bb749fab53da72c4a0e09b8c2d2aaa3103c91

Change-Id: Ie6434426e1ec15bc08bb1832798e371f3fd5fb29
2023-03-10 20:30:57 +08:00

34 lines
815 B
C

/* SPDX-License-Identifier: GPL-2.0+ */
/*
* Simple API for configuring TrustZone memory regions
*
* The premise is that the desired TZC layout is known beforehand, and it can
* be configured in one step. tzc_configure() provides this functionality.
*/
#ifndef MACH_TZC_H
#define MACH_TZC_H
#include <linux/types.h>
enum tzc_sec_mode {
TZC_ATTR_SEC_NONE = 0,
TZC_ATTR_SEC_R = 1,
TZC_ATTR_SEC_W = 2,
TZC_ATTR_SEC_RW = 3
};
struct tzc_region {
uintptr_t base;
uintptr_t top;
enum tzc_sec_mode sec_mode;
uint16_t nsec_id;
uint16_t filters_mask;
};
int tzc_configure(uintptr_t tzc, const struct tzc_region *cfg);
int tzc_disable_filters(uintptr_t tzc, uint16_t filters_mask);
int tzc_enable_filters(uintptr_t tzc, uint16_t filters_mask);
void tzc_dump_config(uintptr_t tzc);
#endif /* MACH_TZC_H */