coreboot
coreboot is an Open Source project aimed at replacing the proprietary BIOS found in most computers.
memory.c File Reference
#include <assert.h>
#include <bootmode.h>
#include <cbfs.h>
#include <console/console.h>
#include <ip_checksum.h>
#include <security/vboot/vboot_common.h>
#include <soc/dramc_param.h>
#include <soc/dramc_pi_api.h>
#include <soc/emi.h>
#include <soc/mt6358.h>
#include <symbols.h>
Include dependency graph for memory.c:

Go to the source code of this file.

Functions

static int mt_mem_test (void)
 
static void dump_param_header (const struct dramc_param *dparam)
 
static u32 compute_checksum (const struct dramc_param *dparam)
 
static int dram_run_fast_calibration (const struct dramc_param *dparam, u16 config)
 
static int dram_run_full_calibration (struct dramc_param *dparam, u32 ddr_geometry, u16 config)
 
static void set_source_to_flash (struct sdram_params *freq_params)
 
static void init_sdram_params (struct sdram_params *dst, const struct sdram_params *src)
 
static void mt_mem_init_run (struct dramc_param_ops *dparam_ops)
 
void mt_mem_init (struct dramc_param_ops *dparam_ops)
 

Function Documentation

◆ compute_checksum()

static u32 compute_checksum ( const struct dramc_param dparam)
static

Definition at line 64 of file memory.c.

References compute_ip_checksum(), and dramc_param::freq_params.

Referenced by dram_run_fast_calibration(), and mt_mem_init_run().

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

◆ dram_run_fast_calibration()

static int dram_run_fast_calibration ( const struct dramc_param dparam,
u16  config 
)
static

Definition at line 70 of file memory.c.

References BIOS_ERR, BIOS_WARNING, checksum(), dramc_param_header::checksum, compute_checksum(), config, dramc_param_header::config, dump_param_header(), dramc_param::header, is_valid_dramc_param(), and printk.

Referenced by mt_mem_init_run().

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

◆ dram_run_full_calibration()

static int dram_run_full_calibration ( struct dramc_param dparam,
u32  ddr_geometry,
u16  config 
)
static

◆ dump_param_header()

static void dump_param_header ( const struct dramc_param dparam)
static

◆ init_sdram_params()

static void init_sdram_params ( struct sdram_params dst,
const struct sdram_params src 
)
static

Definition at line 140 of file memory.c.

References DRAM_DFS_SHUFFLE_1, DRAM_DFS_SHUFFLE_MAX, and memcpy().

Referenced by mt_mem_init_run().

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

◆ mt_mem_init()

void mt_mem_init ( struct dramc_param_ops dparam_ops)

Definition at line 223 of file memory.c.

References dparam_ops, mt_mem_init_run(), and pmic_set_vcore_vol().

Here is the call graph for this function:

◆ mt_mem_init_run()

◆ mt_mem_test()

static int mt_mem_test ( void  )
static

Definition at line 15 of file memory.c.

References _dram, addr, BIOS_DEBUG, BIOS_ERR, complex_mem_test(), CONFIG, dramc_get_rank_size(), printk, RANK_0, and RANK_MAX.

Referenced by mt_mem_init_run().

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

◆ set_source_to_flash()

static void set_source_to_flash ( struct sdram_params freq_params)
static

Definition at line 133 of file memory.c.

References DRAM_DFS_SHUFFLE_1, DRAM_DFS_SHUFFLE_MAX, and DRAMC_PARAM_SOURCE_FLASH.

Referenced by mt_mem_init_run().

Here is the caller graph for this function: