coreboot
coreboot is an Open Source project aimed at replacing the proprietary BIOS found in most computers.
romstage.c File Reference
#include <arch/stages.h>
#include <console/console.h>
#include <fmap.h>
#include <soc/dramc_param.h>
#include <soc/emi.h>
#include <soc/mmu_operations.h>
#include <soc/mt6358.h>
#include <soc/pll.h>
#include <soc/rtc.h>
#include "early_init.h"
Include dependency graph for romstage.c:

Go to the source code of this file.

Macros

#define CALIBRATION_REGION   "RW_DDR_TRAINING"
 
#define CALIBRATION_REGION_SIZE   0x2000
 

Functions

 _Static_assert (sizeof(struct dramc_param)<=CALIBRATION_REGION_SIZE, "sizeof(struct dramc_param) exceeds " CALIBRATION_REGION)
 
static bool read_calibration_data_from_flash (struct dramc_param *dparam)
 
static bool write_calibration_data_to_flash (const struct dramc_param *dparam)
 
void platform_romstage_main (void)
 

Variables

static struct dramc_param dramc_parameter
 
static struct dramc_param_ops dparam_ops
 

Macro Definition Documentation

◆ CALIBRATION_REGION

#define CALIBRATION_REGION   "RW_DDR_TRAINING"

Definition at line 16 of file romstage.c.

◆ CALIBRATION_REGION_SIZE

#define CALIBRATION_REGION_SIZE   0x2000

Definition at line 17 of file romstage.c.

Function Documentation

◆ _Static_assert()

_Static_assert ( sizeof(struct dramc_param)<=  CALIBRATION_REGION_SIZE,
"sizeof(struct dramc_param) exceeds "  CALIBRATION_REGION 
)

◆ platform_romstage_main()

void platform_romstage_main ( void  )

◆ read_calibration_data_from_flash()

static bool read_calibration_data_from_flash ( struct dramc_param dparam)
static

Definition at line 22 of file romstage.c.

References BIOS_DEBUG, CALIBRATION_REGION, fmap_read_area(), length, and printk.

Here is the call graph for this function:

◆ write_calibration_data_to_flash()

static bool write_calibration_data_to_flash ( const struct dramc_param dparam)
static

Definition at line 32 of file romstage.c.

Variable Documentation

◆ dparam_ops

struct dramc_param_ops dparam_ops
static
Initial value:
= {
.param = &dramc_parameter,
.read_from_flash = &read_calibration_data_from_flash,
.write_to_flash = &write_calibration_data_to_flash,
}
static struct dramc_param dramc_parameter
Definition: romstage.c:43
static bool read_calibration_data_from_flash(struct dramc_param *dparam)
Definition: romstage.c:22
static bool write_calibration_data_to_flash(const struct dramc_param *dparam)
Definition: romstage.c:32

Definition at line 32 of file romstage.c.

Referenced by mt_mem_init(), mt_mem_init_run(), and platform_romstage_main().

◆ dramc_parameter

struct dramc_param dramc_parameter
static

Definition at line 32 of file romstage.c.

Referenced by mtk_dram_init().