coreboot
coreboot is an Open Source project aimed at replacing the proprietary BIOS found in most computers.
cpu.c File Reference
#include <amdblocks/cpu.h>
#include <amdblocks/mca.h>
#include <amdblocks/reset.h>
#include <amdblocks/smm.h>
#include <assert.h>
#include <cpu/cpu.h>
#include <cpu/x86/mp.h>
#include <cpu/x86/mtrr.h>
#include <cpu/x86/msr.h>
#include <cpu/x86/smm.h>
#include <acpi/acpi.h>
#include <device/device.h>
#include <device/pci_ops.h>
#include <soc/pci_devs.h>
#include <soc/cpu.h>
#include <soc/smi.h>
#include <soc/iomap.h>
#include <console/console.h>
#include <cpu/amd/microcode.h>
#include <types.h>
Include dependency graph for cpu.c:

Go to the source code of this file.

Functions

 _Static_assert (CONFIG_MAX_CPUS==8, "Do not override MAX_CPUS. To reduce the number of " "available cores, use the downcore_mode and disable_smt devicetree settings instead.")
 
static void pre_mp_init (void)
 
static void post_mp_init (void)
 
void mp_init_cpus (struct bus *cpu_bus)
 
static void model_17_init (struct device *dev)
 

Variables

static const struct mp_ops mp_ops
 
static struct device_operations cpu_dev_ops
 
static struct cpu_device_id cpu_table []
 
static const struct cpu_driver model_17 __cpu_driver
 

Function Documentation

◆ _Static_assert()

_Static_assert ( CONFIG_MAX_CPUS  = =8,
"Do not override MAX_CPUS. To reduce the number of " "available  cores,
use the downcore_mode and disable_smt devicetree settings instead."   
)

◆ model_17_init()

static void model_17_init ( struct device dev)
static

Definition at line 69 of file cpu.c.

◆ mp_init_cpus()

void mp_init_cpus ( struct bus cpu_bus)

Definition at line 59 of file cpu.c.

References CB_SUCCESS, die_with_post_code, FLASH_BASE_ADDR, mp_init_with_smm(), MTRR_TYPE_WRPROT, mtrr_use_temp_range(), and POST_HW_INIT_FAILURE.

Here is the call graph for this function:

◆ post_mp_init()

static void post_mp_init ( void  )
static

Definition at line 42 of file cpu.c.

◆ pre_mp_init()

static void pre_mp_init ( void  )
static

Definition at line 36 of file cpu.c.

References x86_mtrr_check(), and x86_setup_mtrrs_with_detect_no_above_4gb().

Here is the call graph for this function:

Variable Documentation

◆ __cpu_driver

const struct cpu_driver model_17 __cpu_driver
static
Initial value:
= {
.ops = &cpu_dev_ops,
.id_table = cpu_table,
}
static struct cpu_device_id cpu_table[]
Definition: cpu.c:81
static struct device_operations cpu_dev_ops
Definition: cpu.c:77

Definition at line 69 of file cpu.c.

◆ cpu_dev_ops

struct device_operations cpu_dev_ops
static
Initial value:
= {
.init = model_17_init,
}
static void model_17_init(struct device *dev)
Definition: cpu.c:69

Definition at line 69 of file cpu.c.

◆ cpu_table

struct cpu_device_id cpu_table[]
static
Initial value:
= {
{ 0, 0 },
}
#define X86_VENDOR_AMD
Definition: cpu.h:140
#define PICASSO_B0_CPUID
Definition: cpu.h:7
#define RAVEN2_A1_CPUID
Definition: cpu.h:10
#define PICASSO_B1_CPUID
Definition: cpu.h:8
#define RAVEN1_B0_CPUID
Definition: cpu.h:6
#define RAVEN2_A0_CPUID
Definition: cpu.h:9

Definition at line 69 of file cpu.c.

◆ mp_ops

const struct mp_ops mp_ops
static
Initial value:
= {
.pre_mp_init = pre_mp_init,
.get_cpu_count = get_cpu_count,
.get_smm_info = get_smm_info,
.relocation_handler = smm_relocation_handler,
.post_mp_init = post_mp_init,
}
void smm_relocation_handler(int cpu, uintptr_t curr_smbase, uintptr_t staggered_smbase)
Definition: smmrelocate.c:90
int get_cpu_count(void)
Definition: cpu.c:10
static void pre_mp_init(void)
Definition: cpu.c:36
static void post_mp_init(void)
Definition: cpu.c:42
static void get_smm_info(uintptr_t *perm_smbase, size_t *perm_smsize, size_t *smm_save_state_size)
Definition: cpu.c:149

Definition at line 42 of file cpu.c.