coreboot
coreboot is an Open Source project aimed at replacing the proprietary BIOS found in most computers.
addressmap.c File Reference
#include <assert.h>
#include <device/mmio.h>
#include <commonlib/helpers.h>
#include <console/console.h>
#include <soc/addressmap.h>
#include <soc/id.h>
#include <soc/mc.h>
#include <soc/sdram.h>
#include <symbols.h>
#include <soc/nvidia/tegra/types.h>
#include <types.h>
Include dependency graph for addressmap.c:

Go to the source code of this file.

Functions

int sdram_size_mb (void)
 
static void carveout_from_regs (uintptr_t *base_mib, size_t *size_mib, uint32_t bom, uint32_t bom_hi, uint32_t size)
 
void carveout_range (int id, uintptr_t *base_mib, size_t *size_mib)
 
void print_carveouts (void)
 
static void memory_in_range (uintptr_t *base_mib, uintptr_t *end_mib, int ignore_carveout_id)
 
void memory_in_range_below_4gb (uintptr_t *base_mib, uintptr_t *end_mib)
 
void memory_in_range_above_4gb (uintptr_t *base_mib, uintptr_t *end_mib)
 
void trustzone_region_init (void)
 
void gpu_region_init (void)
 
void nvdec_region_init (void)
 
void tsec_region_init (void)
 
void vpr_region_init (void)
 

Variables

static uintptr_t tz_base_mib
 
static const size_t tz_size_mib = CONFIG_TRUSTZONE_CARVEOUT_SIZE_MB
 

Function Documentation

◆ carveout_from_regs()

static void carveout_from_regs ( uintptr_t base_mib,
size_t size_mib,
uint32_t  bom,
uint32_t  bom_hi,
uint32_t  size 
)
static

Definition at line 38 of file addressmap.c.

Referenced by carveout_range().

Here is the caller graph for this function:

◆ carveout_range()

◆ gpu_region_init()

◆ memory_in_range()

static void memory_in_range ( uintptr_t base_mib,
uintptr_t end_mib,
int  ignore_carveout_id 
)
static

Definition at line 167 of file addressmap.c.

References _dram, base, CARVEOUT_NUM, carveout_range(), MiB, and sdram_size_mb().

Referenced by gpu_region_init(), memory_in_range_above_4gb(), memory_in_range_below_4gb(), nvdec_region_init(), trustzone_region_init(), tsec_region_init(), and vpr_region_init().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ memory_in_range_above_4gb()

void memory_in_range_above_4gb ( uintptr_t base_mib,
uintptr_t end_mib 
)

Definition at line 226 of file addressmap.c.

References CARVEOUT_NUM, and memory_in_range().

Referenced by tegra210_mmu_config().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ memory_in_range_below_4gb()

void memory_in_range_below_4gb ( uintptr_t base_mib,
uintptr_t end_mib 
)

Definition at line 219 of file addressmap.c.

References CARVEOUT_NUM, and memory_in_range().

Referenced by cbmem_top_chipset(), and tegra210_mmu_config().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ nvdec_region_init()

void nvdec_region_init ( void  )

Definition at line 297 of file addressmap.c.

References CARVEOUT_NVDEC, MC_SECURITY_CARVEOUT_LOCKED, memory_in_range(), NVDEC_CARVEOUT_SIZE_MB, tegra_mc_regs::security_carveout1_bom, tegra_mc_regs::security_carveout1_bom_hi, tegra_mc_regs::security_carveout1_cfg0, setbits32, TEGRA_MC_BASE, and write32().

Referenced by romstage().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ print_carveouts()

void print_carveouts ( void  )

Definition at line 127 of file addressmap.c.

References base, BIOS_INFO, CARVEOUT_NUM, carveout_range(), MiB, and printk.

Referenced by tegra210_mmu_config().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ sdram_size_mb()

int sdram_size_mb ( void  )

Definition at line 19 of file addressmap.c.

References tegra_mc_regs::emem_cfg, MC_EMEM_CFG_SIZE_MB_MASK, MC_EMEM_CFG_SIZE_MB_SHIFT, read32(), and TEGRA_MC_BASE.

Referenced by memory_in_range().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ trustzone_region_init()

void trustzone_region_init ( void  )

Definition at line 233 of file addressmap.c.

References assert, CARVEOUT_TZ, context_avp(), MC_SMMU_CONFIG_ENABLE, memory_in_range(), tegra_mc_regs::security_cfg0, tegra_mc_regs::security_cfg1, tegra_mc_regs::smmu_config, TEGRA_MC_BASE, tz_base_mib, tz_size_mib, and write32().

Referenced by ramstage_entry(), and romstage().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ tsec_region_init()

◆ vpr_region_init()

void vpr_region_init ( void  )

Variable Documentation

◆ tz_base_mib

◆ tz_size_mib

const size_t tz_size_mib = CONFIG_TRUSTZONE_CARVEOUT_SIZE_MB
static