coreboot
coreboot is an Open Source project aimed at replacing the proprietary BIOS found in most computers.
trustzone.c
Go to the documentation of this file.
1
/* SPDX-License-Identifier: GPL-2.0-only */
2
3
#include <
device/mmio.h
>
4
#include <
soc/trustzone.h
>
5
6
/* Setting TZPC[TrustZone Protection Controller] */
7
void
trustzone_init
(
void
)
8
{
9
struct
exynos_tzpc
*tzpc;
10
unsigned
int
addr
;
11
12
for
(
addr
=
TZPC0_BASE
;
addr
<=
TZPC9_BASE
;
addr
+=
TZPC_BASE_OFFSET
) {
13
tzpc = (
struct
exynos_tzpc
*)
addr
;
14
15
if
(
addr
==
TZPC0_BASE
)
16
write32
(&tzpc->
r0size
,
R0SIZE
);
17
18
write32
(&tzpc->
decprot0set
,
DECPROTXSET
);
19
write32
(&tzpc->
decprot1set
,
DECPROTXSET
);
20
21
if
(
addr
!=
TZPC9_BASE
) {
22
write32
(&tzpc->
decprot2set
,
DECPROTXSET
);
23
write32
(&tzpc->
decprot3set
,
DECPROTXSET
);
24
}
25
}
26
}
write32
static void write32(void *addr, uint32_t val)
Definition:
mmio.h:40
addr
static u32 addr
Definition:
cirrus.c:14
trustzone_init
void trustzone_init(void)
Definition:
trustzone.c:7
mmio.h
exynos_tzpc
Definition:
trustzone.h:36
exynos_tzpc::decprot1set
u32 decprot1set
Definition:
trustzone.h:43
exynos_tzpc::r0size
u32 r0size
Definition:
trustzone.h:37
exynos_tzpc::decprot0set
u32 decprot0set
Definition:
trustzone.h:40
exynos_tzpc::decprot3set
u32 decprot3set
Definition:
trustzone.h:49
exynos_tzpc::decprot2set
u32 decprot2set
Definition:
trustzone.h:46
trustzone.h
TZPC9_BASE
#define TZPC9_BASE
Definition:
trustzone.h:20
DECPROTXSET
#define DECPROTXSET
Definition:
trustzone.h:34
TZPC_BASE_OFFSET
#define TZPC_BASE_OFFSET
Definition:
trustzone.h:9
TZPC0_BASE
#define TZPC0_BASE
Definition:
trustzone.h:11
R0SIZE
#define R0SIZE
Definition:
trustzone.h:28
src
soc
samsung
exynos5250
trustzone.c
Generated by
1.9.1