docs: Add 24.12 release notes
[coreboot2.git] / src / soc / samsung / exynos5250 / trustzone.c
blob408694f3947f1308104f16d3915fd3b2f6a34a40
1 /* SPDX-License-Identifier: GPL-2.0-only */
3 #include <device/mmio.h>
4 #include <soc/trustzone.h>
6 /* Setting TZPC[TrustZone Protection Controller] */
7 void trustzone_init(void)
9 struct exynos_tzpc *tzpc;
10 unsigned int addr;
12 for (addr = TZPC0_BASE; addr <= TZPC9_BASE; addr += TZPC_BASE_OFFSET) {
13 tzpc = (struct exynos_tzpc *)addr;
15 if (addr == TZPC0_BASE)
16 write32(&tzpc->r0size, R0SIZE);
18 write32(&tzpc->decprot0set, DECPROTXSET);
19 write32(&tzpc->decprot1set, DECPROTXSET);
21 if (addr != TZPC9_BASE) {
22 write32(&tzpc->decprot2set, DECPROTXSET);
23 write32(&tzpc->decprot3set, DECPROTXSET);