coreboot
coreboot is an Open Source project aimed at replacing the proprietary BIOS found in most computers.
bootblock.c
Go to the documentation of this file.
1 /* SPDX-License-Identifier: GPL-2.0-only */
2 
3 #include <device/mmio.h>
4 #include <bootblock_common.h>
5 #include <soc/grf.h>
6 #include <soc/mmu_operations.h>
7 #include <soc/clock.h>
8 
10 {
11  rkclk_init();
12 
13  /* all ddr range non-secure */
14  write32(&rk3399_pmusgrf->ddr_rgn_con[16], 0xff << 16 | 0);
15 
16  /* tzma_rosize = 0, all sram non-secure */
17  write32(&rk3399_pmusgrf->soc_con4, 0x3ff << 16 | 0);
18 
19  /* emmc master secure */
20  write32(&rk3399_pmusgrf->soc_con7, 1 << 23 | 1 << 24 | 0 << 8 | 0 << 7);
21 
22  /* glb_slv_secure_bypass */
23  write32(&rk3399_pmusgrf->pmu_slv_con0, 1 << 16 | 1);
24 }
static void write32(void *addr, uint32_t val)
Definition: mmio.h:40
void bootblock_soc_init(void)
Definition: bootblock.c:27
static struct rk3399_pmusgrf_regs *const rk3399_pmusgrf
Definition: grf.h:321
void rkclk_init(void)
Definition: clock.c:232
u32 ddr_rgn_con[35]
Definition: grf.h:267
u32 pmu_slv_con0
Definition: grf.h:297