coreboot
coreboot is an Open Source project aimed at replacing the proprietary BIOS found in most computers.
ramstage.c File Reference
#include <arch/cpu.h>
#include <acpi/acpi_pm.h>
#include <console/console.h>
#include <cpu/intel/microcode.h>
#include <cpu/x86/cr.h>
#include <cpu/x86/msr.h>
#include <device/device.h>
#include <device/pci_def.h>
#include <device/pci_ops.h>
#include <intelblocks/acpi_wake_source.h>
#include <fsp/util.h>
#include <soc/gpio.h>
#include <soc/lpc.h>
#include <soc/msr.h>
#include <soc/pattrs.h>
#include <soc/pci_devs.h>
#include <soc/pm.h>
#include <soc/ramstage.h>
Include dependency graph for ramstage.c:

Go to the source code of this file.

Macros

#define SHOW_PATTRS   1
 

Functions

static void detect_num_cpus (struct pattrs *attrs)
 
static void fill_in_msr (msr_t *msr, int idx)
 
static void fill_in_pattrs (void)
 
int soc_fill_acpi_wake (const struct chipset_power_state *ps, uint32_t *pm1, uint32_t **gpe0)
 
void soc_init_pre_device (struct soc_intel_braswell_config *config)
 

Variables

struct pattrs __global_pattrs
 
static const char *const stepping_str []
 

Macro Definition Documentation

◆ SHOW_PATTRS

#define SHOW_PATTRS   1

Definition at line 22 of file ramstage.c.

Function Documentation

◆ detect_num_cpus()

static void detect_num_cpus ( struct pattrs attrs)
static

Definition at line 26 of file ramstage.c.

References attrs, cpuid_ext(), cpuid_result::ebx, and cpuid_result::ecx.

Referenced by fill_in_pattrs().

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

◆ fill_in_msr()

static void fill_in_msr ( msr_t msr,
int  idx 
)
inlinestatic

Definition at line 47 of file ramstage.c.

References BIOS_DEBUG, msr_struct::hi, msr_struct::lo, printk, rdmsr(), and SHOW_PATTRS.

Referenced by fill_in_pattrs().

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

◆ fill_in_pattrs()

◆ soc_fill_acpi_wake()

int soc_fill_acpi_wake ( const struct chipset_power_state ps,
uint32_t pm1,
uint32_t **  gpe0 
)

Definition at line 121 of file ramstage.c.

References chipset_power_state::gpe0_en, chipset_power_state::gpe0_sts, chipset_power_state::pm1_en, and chipset_power_state::pm1_sts.

Referenced by pm_fill_gnvs().

Here is the caller graph for this function:

◆ soc_init_pre_device()

void soc_init_pre_device ( struct soc_intel_braswell_config config)

Definition at line 133 of file ramstage.c.

References config, CR4_OSFXSR, CR4_OSXMMEXCPT, fill_in_pattrs(), gpio_config, intel_silicon_init(), mainboard_get_gpios(), read_cr4(), set_max_freq(), setup_soc_gpios(), and write_cr4().

Here is the call graph for this function:

Variable Documentation

◆ __global_pattrs

struct pattrs __global_pattrs

Definition at line 1 of file ramstage.c.

Referenced by pattrs_get().

◆ stepping_str

const char* const stepping_str[]
static
Initial value:
= {
"A0", "A1", "B0", "B1", "B2", "B3", "C0", "D1"
}

Definition at line 56 of file ramstage.c.

Referenced by fill_in_pattrs().