coreboot
coreboot is an Open Source project aimed at replacing the proprietary BIOS found in most computers.
quickpath.c File Reference
#include <console/console.h>
#include <cpu/intel/model_2065x/model_2065x.h>
#include <cpu/x86/msr.h>
#include <delay.h>
#include <device/pci_def.h>
#include <device/pci_ops.h>
#include <northbridge/intel/ironlake/raminit.h>
#include <types.h>
Include dependency graph for quickpath.c:

Go to the source code of this file.

Data Structures

struct  stru1
 

Macros

#define NORTHBRIDGE   PCI_DEV(0, 0, 0)
 

Functions

static unsigned int gcd (unsigned int a, unsigned int b)
 
static int div_roundup (int a, int b)
 
static unsigned int lcm (unsigned int a, unsigned int b)
 
static void compute_frequence_ratios (struct raminfo *info, u16 freq1, u16 freq2, int num_cycles_2, int num_cycles_1, int round_it, int add_freqs, struct stru1 *result)
 
static void compute_274265 (struct raminfo *info)
 
static void program_274265 (const struct ram_training *const training)
 
static void set_2d5x_reg (struct raminfo *info, u16 reg, u16 freq1, u16 freq2, int num_cycles_2, int num_cycles_1, int num_cycles_3, int num_cycles_4, int reverse)
 
static void set_6d_reg (struct raminfo *info, u16 reg, u16 freq1, u16 freq2, int num_cycles_1, int num_cycles_2, int num_cycles_3, int num_cycles_4)
 
static void set_2dx8_reg (struct raminfo *info, u16 reg, u8 mode, u16 freq1, u16 freq2, int num_cycles_2, int num_cycles_1, int round_it, int add_freqs)
 
static void set_2dxx_series (struct raminfo *info, int s3resume)
 
static u16 quickpath_configure_pll_ratio (struct raminfo *info, const u8 x2ca8)
 
void early_quickpath_init (struct raminfo *info, const u8 x2ca8)
 
void late_quickpath_init (struct raminfo *info, const int s3resume)
 

Macro Definition Documentation

◆ NORTHBRIDGE

#define NORTHBRIDGE   PCI_DEV(0, 0, 0)

Definition at line 12 of file quickpath.c.

Function Documentation

◆ compute_274265()

static void compute_274265 ( struct raminfo info)
static

Definition at line 148 of file quickpath.c.

References div_roundup(), frequency_11(), fsbcycle_ps(), get_max_timing(), halfcycle_ps(), info, lcm(), mchbar_clrsetbits32(), mchbar_read8(), and NUM_CHANNELS.

Referenced by late_quickpath_init().

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

◆ compute_frequence_ratios()

static void compute_frequence_ratios ( struct raminfo info,
u16  freq1,
u16  freq2,
int  num_cycles_2,
int  num_cycles_1,
int  round_it,
int  add_freqs,
struct stru1 result 
)
static

Definition at line 57 of file quickpath.c.

References div_roundup(), gcd(), lcm(), MAX, and MIN.

Referenced by set_2d5x_reg(), set_2dx8_reg(), and set_6d_reg().

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

◆ div_roundup()

static int div_roundup ( int  a,
int  b 
)
inlinestatic

Definition at line 31 of file quickpath.c.

References DIV_ROUND_UP.

Referenced by compute_274265(), compute_frequence_ratios(), and set_2d5x_reg().

Here is the caller graph for this function:

◆ early_quickpath_init()

◆ gcd()

static unsigned int gcd ( unsigned int  a,
unsigned int  b 
)
static

Definition at line 14 of file quickpath.c.

Referenced by compute_frequence_ratios(), and lcm().

Here is the caller graph for this function:

◆ late_quickpath_init()

void late_quickpath_init ( struct raminfo info,
const int  s3resume 
)

◆ lcm()

static unsigned int lcm ( unsigned int  a,
unsigned int  b 
)
static

Definition at line 36 of file quickpath.c.

References gcd().

Referenced by compute_274265(), and compute_frequence_ratios().

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

◆ program_274265()

static void program_274265 ( const struct ram_training *const  training)
static

Definition at line 233 of file quickpath.c.

References mchbar_clrbits8, mchbar_setbits8, mchbar_write16(), mchbar_write32(), NUM_CHANNELS, printk, RAM_SPEW, ram_training::reg274265, and ram_training::reg2ca9_bit0.

Referenced by late_quickpath_init().

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

◆ quickpath_configure_pll_ratio()

static u16 quickpath_configure_pll_ratio ( struct raminfo info,
const u8  x2ca8 
)
static

Definition at line 439 of file quickpath.c.

References info, mchbar_read16(), mchbar_setbits16, mchbar_setbits32, mchbar_setbits8, mchbar_write16(), pci_read_config32(), pci_write_config8(), QPI_PHY_0, QPI_PLL_RATIO, and QPI_PLL_STATUS.

Referenced by early_quickpath_init().

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

◆ set_2d5x_reg()

static void set_2d5x_reg ( struct raminfo info,
u16  reg,
u16  freq1,
u16  freq2,
int  num_cycles_2,
int  num_cycles_1,
int  num_cycles_3,
int  num_cycles_4,
int  reverse 
)
static

◆ set_2dx8_reg()

static void set_2dx8_reg ( struct raminfo info,
u16  reg,
u8  mode,
u16  freq1,
u16  freq2,
int  num_cycles_2,
int  num_cycles_1,
int  round_it,
int  add_freqs 
)
static

Definition at line 327 of file quickpath.c.

References compute_frequence_ratios(), stru1::divisor_f3_to_fmax, stru1::divisor_f4_to_fmax, stru1::freq3_to_2_remainder, stru1::freq4_to_max_remainder, stru1::freq_diff_reduced, stru1::freq_min_reduced, stru1::freqs_reversed, info, and mchbar_write32().

Referenced by set_2dxx_series().

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

◆ set_2dxx_series()

static void set_2dxx_series ( struct raminfo info,
int  s3resume 
)
static

Definition at line 372 of file quickpath.c.

References frequency_11(), info, mchbar_write32(), printk, RAM_SPEW, set_2d5x_reg(), set_2dx8_reg(), and set_6d_reg().

Referenced by late_quickpath_init().

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

◆ set_6d_reg()

static void set_6d_reg ( struct raminfo info,
u16  reg,
u16  freq1,
u16  freq2,
int  num_cycles_1,
int  num_cycles_2,
int  num_cycles_3,
int  num_cycles_4 
)
static

Definition at line 302 of file quickpath.c.

References compute_frequence_ratios(), stru1::divisor_f4_to_fmax, stru1::freq4_to_max_remainder, info, mchbar_write32(), printk, and RAM_SPEW.

Referenced by set_2dxx_series().

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