coreboot
coreboot is an Open Source project aimed at replacing the proprietary BIOS found in most computers.
raminit.c File Reference
#include <stdint.h>
#include <acpi/acpi.h>
#include <assert.h>
#include <cbfs.h>
#include <cbmem.h>
#include <cf9_reset.h>
#include <console/console.h>
#include <device/dram/ddr3.h>
#include <device/pci_def.h>
#include <device/pci_ops.h>
#include <device/smbus_host.h>
#include <mrc_cache.h>
#include <soc/gpio.h>
#include <soc/iomap.h>
#include <soc/iosf.h>
#include <soc/pci_devs.h>
#include <soc/romstage.h>
#include <security/vboot/vboot_common.h>
Include dependency graph for raminit.c:

Go to the source code of this file.

Macros

#define SPD_SIZE   256
 

Functions

uintptr_t smbus_base (void)
 
int smbus_enable_iobar (uintptr_t base)
 
static void ABI_X86 send_to_console (unsigned char b)
 
static void populate_smbios_tables (void *dram_data, int speed, int num_channels)
 
static void print_dram_info (void *dram_data)
 
void raminit (struct mrc_params *mp, int prev_sleep_state)
 

Variables

static u8 spd_buf [NUM_CHANNELS][SPD_SIZE]
 

Macro Definition Documentation

◆ SPD_SIZE

#define SPD_SIZE   256

Definition at line 116 of file raminit.c.

Function Documentation

◆ populate_smbios_tables()

static void populate_smbios_tables ( void dram_data,
int  speed,
int  num_channels 
)
static

Definition at line 56 of file raminit.c.

References spd_add_smbios17(), spd_decode_ddr3(), SPD_STATUS_CRC_ERROR, and SPD_STATUS_OK.

Referenced by print_dram_info().

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

◆ print_dram_info()

static void print_dram_info ( void dram_data)
static

Definition at line 72 of file raminit.c.

References BIOS_INFO, DRP, DRP_RANK_MASK, DTR0, iosf_dunit_ch0_read(), iosf_dunit_ch1_read(), iosf_dunit_read(), PCI_DEV, pci_read_config32(), populate_smbios_tables(), printk, SOC_DEV, and SOC_FUNC.

Referenced by raminit().

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

◆ raminit()

◆ send_to_console()

static void ABI_X86 send_to_console ( unsigned char  b)
static

Definition at line 51 of file raminit.c.

References do_putchar().

Referenced by raminit().

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

◆ smbus_base()

uintptr_t smbus_base ( void  )

Definition at line 22 of file raminit.c.

◆ smbus_enable_iobar()

int smbus_enable_iobar ( uintptr_t  base)

Definition at line 27 of file raminit.c.

Variable Documentation

◆ spd_buf

u8 spd_buf[NUM_CHANNELS][SPD_SIZE]
static

Definition at line 117 of file raminit.c.

Referenced by raminit().