Frequency selection

Introduction

This chapter explains the frequency selection done on Sandybride and Ivybridge.

Definitions

SymbolDescriptionUnitsValid region
SCKDRAM system clock cycle times-
tCKDRAM system clock cycle time1/256th ns-
DCKData clock cycle time: The time between two SCK clock edgess-
SPDManufacturer set memory timings located on an EEPROM on every DIMMbytes-
REFCKReference clock, either 100 or 133Mhz100, 133
MULTDRAM PLL multiplier-[3-12]
XMPExtreme Memory Profiles--

SPD

The SPD located on every DIMM is factory program with various timings. One of them specifies the maximum clock frequency the DIMM should be used with. The operating frequency is stores as fixed point value (tCK), rounded to the next smallest supported operating frequency. Some SPD contains additional and optional XMP data, that stores so called "performance" modes, that advertises higher clock frequencies.

XMP profiles

At time of writing coreboot's raminit is able to parse XMP profile 1 and 2. Only XMP profile 1 is being used in case it advertises:

  • 1.5V operating voltage
  • The channel's installed DIMM count doesn't exceed the XMP coded limit

In case the XMP profile doesn't fullfill those limits, the regular SPD will be used.

Note: XMP Profiles are supported since coreboot 4.4.

It is possible to ignore the max DIMM count limit set by XMP profiles. By activating Kconfig option NATIVE_RAMINIT_IGNORE_XMP_MAX_DIMMS it is possible to install two DIMMs per channel, even if XMP tells you not to do.

Note: Ignoring XMP Profiles limit is supported since coreboot 4.7.

Soft fuses

Every board manufacturer does program "soft" fuses to indicate the maximum DRAM frequency supported. However, those fuses don't set a limit in hardware and thus are called "soft" fuses, as it is possible to ignore them.

Note: Ignoring the fuses might cause system instability !

On Sandy Bride CAPID0_A is being read, and on Ivybridge CAPID0_B is being read. coreboot reads those registers and honors the limit in case the Kconfig option CONFIG_NATIVE_RAMINIT_IGNORE_MAX_MEM_FUSES wasn't set. Power users that want to let their RAM run at DRAM's "stock" frequency need to enable the Kconfig symbol.

It is possible to override the soft fuses limit by using a board-specific devicetree setting.

Note: Ignoring max mem freq. fuses is supported since coreboot 4.7.

Hard fuses

"Hard" fuses are programmed by Intel and limit the maximum frequency that can be used on a given CPU/board/chipset. At time of writing there's no register to read this limit, before trying to set a given DRAM frequency. The memory PLL won't lock, indicating that the chosen memory multiplier isn't available. In this case coreboot tries the next smaller memory multiplier until the PLL will lock.

Devicetree

The devicetree register max_mem_clock_mhz overrides the "soft" fuses set by the board manufacturer.

By using this register it's possible to force a minimum operating frequency.

Reference clock

While Sandybride supports 133 MHz reference clock (REFCK), Ivy Bridge also supports 100 MHz reference clock. The reference clock is multiplied by the DRAM multiplier to select the DRAM frequency (SCK) by the following formula:

REFCK * MULT = 1 / DCK

Note: Since coreboot 4.6 Ivy Bridge supports 100MHz REFCK.

Sandy Bride's supported frequencies

SCK [Mhz]DDR [Mhz]Mutiplier (MULT)Reference clock (REFCK)Comment
400DDR3-8003133 MHz
533DDR3-10664133 MHz
666DDR3-13335133 MHz
800DDR3-16006133 MHz
933DDR3-18667133 MHz
1066DDR3-21668133 MHz

Ivybridge's supported frequencies

SCK [Mhz]DDR [Mhz]Mutiplier (MULT)Reference clock (REFCK)Comment
400DDR3-8003133 MHz
533DDR3-10664133 MHz
666DDR3-13335133 MHz
800DDR3-16006133 MHz
933DDR3-18667133 MHz
1066DDR3-21668133 MHz
700DDR3-14007100 MHz'1
800DDR3-16008100 MHz'1
900DDR3-18009100 MHz'1
1000DDR3-200010100 MHz'1
1100DDR3-220011100 MHz'1
1200DDR3-240012100 MHz'1

'1: since coreboot 4.6

Multiplier selection

coreboot select the maximum frequency to operate at by the following formula:

if devicetree's max_mem_clock_mhz > 0:
     freq_max := max_mem_clock_mhz
else:
     freq_max := soft_fuse_max_mhz

for i in SPDs:
     freq_max := MIN(freq_max, ddr_spd_max_mhz[i])```

As you can see, by using DIMMs with different maximum DRAM frequencies, the 
slowest DIMMs' frequency will be selected, to prevent over-clocking it.

The selected frequency gives the PLL multiplier to operate at. In case the PLL 
locks (see Take me to [Hard fuses](#hard_fuses)) the frequency will be used for 
all DIMMs. At this point it's not possible to change the multiplier again, 
until the system has been powered off. In case the PLL doesn't lock, the next 
smaller multiplier will be used until a working multiplier will be found.