36 die(
"Unknown stepping.\n");
47 if (!(capid & (1<<(79-64)))) {
52 if (!(capid & (1<<(57-32)))) {
56 if (!(capid & (1<<(56-32)))) {
63 if (!(capid & (1<<(48-32)))) {
67 const u32 gfx_variant = (capid>>(42-32)) & 0x7;
68 const u32 render_freq = ((capid>>(50-32) & 0x1) << 2) | ((capid>>(35-32)) & 0x3);
97 sysinfo->gs45_low_power_mode ?
"low" :
"high");
112 switch (render_freq) {
137 if (!(capid & (1<<(33-32)))) {
141 if (!(capid & (1<<(32-32)))) {
147 u32 ddr_cap = capid>>30 & 0x3;
165 const unsigned int max_fsb = (capid >> 28) & 0x3;
177 die(
"unknown FSB capability\n");
196 if (reg8 & (1 << 2)) {
202 if (reg8 & (1 << 7)) {
221 int dimm,
int addr,
int bitmask,
int expected)
230 die(
"Chipset only supports SO-DIMM\n");
233 die(
"Chipset doesn't support ECC RAM\n");
237 die(
"Chipset wants single or double sided DIMMs\n");
241 die(
"Chipset requires x8 or x16 width\n");
247 die(
"Chipset requires 256Mb, 512Mb, 1Gb or 2Gb chips.");
250 die(
"Chipset requires 8 banks on DDR3\n");
256 die(
"Code assumes 1/8ns MTB\n");
259 die(
"Code assumes 1/8ns MTB\n");
266 die(
"Only raw card types A, B, C, D and F are supported.\n");
321 config->channel[cur].banks = 8;
325 config->channel[cur].cas_latencies =
332 config->channel[cur].page_size =
config->channel[cur].width *
333 (1 <<
config->channel[cur].cols);
358 die(
"Unsupported FSB clock.\n");
367 default:
die(
"Unknown clock value.\n");
375 else if (*clock >= 400)
377 else if (*clock >= 333)
402 unsigned int cas_latencies = (
unsigned int)-1;
403 unsigned int tCKmin = 0, tAAmin = 0;
414 unsigned int fsb_mhz = 0;
421 unsigned int clock = 8000 / tCKmin;
424 printk(
BIOS_SPEW,
"DIMMs support %d MHz, but chipset only runs at up to %d. Limiting...\n",
431 unsigned int tCKproposed;
435 die(
"Couldn't find compatible clock / CAS settings.\n");
436 tCKproposed = 8000 / clock;
440 if (cas_latencies & (1 <<
CAS))
456 const unsigned int tCLK,
462 unsigned int tRASmin = 0, tRPmin = 0, tRCDmin = 0, tWRmin = 0;
479 const unsigned int tRFC_from_clock_and_cap[][4] = {
485 unsigned int tRFCmin = 0;
487 const unsigned int tRFC = tRFC_from_clock_and_cap
510 unsigned int tRRDmin = 0;
520 unsigned int tFAW_from_pagesize_and_clock[][3] = {
525 unsigned int tFAWmin = 0;
527 const unsigned int tFAW = tFAW_from_pagesize_and_clock
553 tCLK, tRASmin, tRPmin, tRCDmin, tRFCmin, tWRmin, tRDmin, tRRDmin, tFAWmin, tWL);
574 for (i = 0; i < 4; i++)
580 if ((spd == 7) || (spd == 8) || (spd == 0xb)) {
583 die(
"Multiple types of DIMM installed in the system, don't do that!\n");
589 die(
"Could not find any DIMM.\n");
597 die(
"DDR2 not supported at this time.\n");
602 die(
"Will never support DDR1.\n");
605 for (i = 0; i < 2; i++) {
608 " Raw card type: %4c\n"
609 " Row addr bits: %4u\n"
610 " Col addr bits: %4u\n"
617 " Max clock: %3u MHz\n"
647 const unsigned int chips_per_rank = 8 / spdinfo.
channel[i].
width;
673 "during warm boot, reset required.\n");
695 if (cur_freq != want_freq) {
696 printk(
BIOS_DEBUG,
"Changing memory frequency: old %x, new %x.\n", cur_freq, want_freq);
745 die(
"Unknown VCO frequency.\n");
756 const u16 render_freq_from_vco_and_gfxtype[][10] = {
758 { 0xd, 0xd, 0xe, 0xd, 0xb, 0xd, 0xb, 0xa, 0xd },
759 { 0xd, 0xe, 0xf, 0xd, 0xb, 0xd, 0xb, 0x9, 0xd },
760 { 0xc, 0xd, 0xf, 0xc, 0xa, 0xc, 0xa, 0x9, 0xc },
761 { 0xb, 0xc, 0xe, 0xb, 0x9, 0xb, 0x9, 0x8, 0xb },
763 const u16 sampler_freq_from_vco_and_gfxtype[][10] = {
765 { 0xc, 0xc, 0xd, 0xc, 0x9, 0xc, 0x9, 0x8, 0xc },
766 { 0xc, 0xd, 0xe, 0xc, 0x9, 0xc, 0x9, 0x8, 0xc },
767 { 0xa, 0xc, 0xd, 0xa, 0x8, 0xa, 0x8, 0x8, 0xa },
768 { 0xa, 0xa, 0xc, 0xa, 0x7, 0xa, 0x7, 0x6, 0xa },
770 const u16 display_clock_select_from_gfxtype[] = {
772 1, 1, 1, 1, 1, 1, 1, 0, 1
787 printk(
BIOS_DEBUG,
"Setting IGD memory frequencies for VCO #%d.\n", vco_idx);
790 ((render_freq_from_vco_and_gfxtype[vco_idx][gfx_idx]
792 ((sampler_freq_from_vco_and_gfxtype[vco_idx][gfx_idx]
855 die(
"SFF platform unsupported in RCOMP initialization.\n");
918 const int burst_length = 8;
919 const int tWTR = 4, tRTP = 1;
925 const int btb_wtr =
timings->tWL + burst_length/2 + tWTR;
930 reg = (reg & ~(0x7 << 15)) | ((9 -
timings->
CAS) << 15);
931 reg = (reg & ~(0xf << 10)) | ((
timings->
CAS - 3) << 10);
933 reg = (reg & ~(0x7 << 15)) | ((10 -
timings->
CAS) << 15);
934 reg = (reg & ~(0xf << 10)) | ((
timings->
CAS - 4) << 10);
936 reg = (reg & ~(0x7 << 5)) | (3 << 5);
937 reg = (reg & ~(0x7 << 0)) | (1 << 0);
941 reg = (reg & ~(0x03 << 28)) | ((tRTP & 0x03) << 28);
942 reg = (reg & ~(0x1f << 21)) | ((
timings->
tRAS & 0x1f) << 21);
943 reg = (reg & ~(0x07 << 10)) | (((
timings->
tRRD - 2) & 0x07) << 10);
944 reg = (reg & ~(0x07 << 5)) | (((
timings->
tRCD - 2) & 0x07) << 5);
945 reg = (reg & ~(0x07 << 0)) | (((
timings->
tRP - 2) & 0x07) << 0);
949 reg = (reg & ~(0x1f << 17)) | ((
timings->tFAW & 0x1f) << 17);
951 reg = (reg & ~(0x7 << 12)) | (0x2 << 12);
952 reg = (reg & ~(0xf << 6)) | (0x9 << 6);
954 reg = (reg & ~(0x7 << 12)) | (0x3 << 12);
955 reg = (reg & ~(0xf << 6)) | (0xc << 6);
957 reg = (reg & ~(0x1f << 0)) | (0x13 << 0);
962 reg = (reg & ~(0x03 << 26));
963 reg = (reg & ~(0x07 << 23)) | (((
timings->
CAS - 3) & 0x07) << 23);
964 reg = (reg & ~(0xff << 13)) | ((
timings->
tRFC & 0xff) << 13);
965 reg = (reg & ~(0x07 << 0)) | (((
timings->tWL - 2) & 0x07) << 0);
969 static const u8 timings_by_clock[4][3] = {
972 { 0x07, 0x0a, 0x0d },
973 { 0x3a, 0x46, 0x5d },
974 { 0x0c, 0x0e, 0x18 },
975 { 0x21, 0x28, 0x35 },
978 reg = (reg & ~(0x01f << 27)) | (timings_by_clock[0][clk_idx] << 27);
979 reg = (reg & ~(0x3ff << 17)) | (timings_by_clock[1][clk_idx] << 17);
980 reg = (reg & ~(0x03f << 10)) | (timings_by_clock[2][clk_idx] << 10);
981 reg = (reg & ~(0x1ff << 0)) | (timings_by_clock[3][clk_idx] << 0);
986 reg = (reg & ~(0xf << 28)) | (0x8 << 28);
987 reg = (reg & ~(0x00f << 22)) | ((burst_length/2 +
timings->
CAS + 2) << 22);
988 reg = (reg & ~(0x3ff << 12)) | (0x190 << 12);
989 reg = (reg & ~(0x00f << 4)) | ((
timings->
CAS - 2) << 4);
990 reg = (reg & ~(0x003 << 2)) | (0x001 << 2);
991 reg = (reg & ~(0x003 << 0));
995 reg = (reg & ~(0xffff << 16)) | (0x066a << 16);
1006 const int tRPALL = dimms[
ch].
banks == 8;
1010 reg |= tRPALL << 15;
1029 reg &= ~(0x3 << (61 - 32));
1031 reg |= 0x3 << (61 - 32);
1032 reg = (reg & ~(0x3 << (52 - 32))) | (0x2 << (52 - 32));
1033 reg = (reg & ~(0x7 << (48 - 32))) | ((
timings->
CAS - 3) << (48 - 32));
1034 reg = (reg & ~(0xf << (44 - 32))) | (0x7 << (44 - 32));
1036 reg = (reg & ~(0xf << (40 - 32))) | ((12 -
timings->
CAS) << (40 - 32));
1037 reg = (reg & ~(0xf << (36 - 32))) | (( 2 +
timings->
CAS) << (36 - 32));
1039 reg = (reg & ~(0xf << (40 - 32))) | ((13 -
timings->
CAS) << (40 - 32));
1040 reg = (reg & ~(0xf << (36 - 32))) | (( 1 +
timings->
CAS) << (36 - 32));
1042 reg = (reg & ~(0xf << (32 - 32))) | (0x7 << (32 - 32));
1046 reg = (reg & ~(0x7 << 28)) | (0x2 << 28);
1047 reg = (reg & ~(0x3 << 22)) | (0x2 << 22);
1048 reg = (reg & ~(0x7 << 12)) | (0x2 << 12);
1049 reg = (reg & ~(0x7 << 4)) | (0x2 << 4);
1055 reg = (reg & ~0x7) | 0x2;
1058 reg = (reg & ~0x7) | 0x5;
1077 4 << 29 | 3 << 25 | 0 << 22 | 1 << 10);
1090 static const u32 values_from_fsb_and_mem[][3][4] = {
1092 { 0x00000000, 0x00000000, 0x00180006, 0x00810060 },
1093 { 0x00000000, 0x00000000, 0x0000001c, 0x000300e0 },
1094 { 0x00000000, 0x00001c00, 0x03c00038, 0x0007e000 },
1098 { 0x00000000, 0x00000000, 0x0030000c, 0x000300c0 },
1099 { 0x00000000, 0x00000380, 0x0060001c, 0x00030c00 },
1104 { 0x00000000, 0x00000000, 0x0030000c, 0x000300c0 },
1108 const u32 *data = values_from_fsb_and_mem[fsb][ddr3clock];
1114 static const u32 from_fsb_and_mem[][3] = {
1116 { 0x40100401, 0x10040220, 0x08040110, },
1117 { 0x00000000, 0x40100401, 0x00080201, },
1118 { 0x00000000, 0x00000000, 0x40100401, },
1121 const unsigned int mchbar = 0x1258 + (
ch * 0x0100);
1133 const u32 timings_by_fsb[][2] = {
1134 { 0x1a, 0x01380138 },
1135 { 0x14, 0x00f000f0 },
1136 { 0x10, 0x00c000c0 },
1143 #define DEFAULT_PCI_MMIO_SIZE 2048
1144 #define HOST_BRIDGE PCI_DEVFN(0, 0)
1148 const struct device *dev;
1168 unsigned int base = 0;
1169 unsigned int total_mb[2] = { 0, 0 };
1176 const unsigned int rank_capacity_mb =
1182 base += rank_capacity_mb;
1183 total_mb[
ch] += rank_capacity_mb;
1187 base += rank_capacity_mb;
1188 total_mb[
ch] += rank_capacity_mb;
1201 const unsigned int page_size =
1224 uma_sizem = (gms_sizek + gsm_sizek) >> 10;
1233 const unsigned int MMIOstart = 4096 - mmio_size + uma_sizem;
1235 const unsigned int ME_SIZE = prejedec || !me_active ? 0 : 32;
1236 const unsigned int usedMEsize = (total_mb[0] != total_mb[1]) ? ME_SIZE : 2 * ME_SIZE;
1237 const unsigned int claimCapable =
1240 const unsigned int TOM = total_mb[0] + total_mb[1];
1241 unsigned int TOMminusME =
TOM - usedMEsize;
1242 unsigned int TOLUD = (TOMminusME < MMIOstart) ? TOMminusME : MMIOstart;
1243 unsigned int TOUUD = TOMminusME;
1244 unsigned int REMAPbase = 0xffff, REMAPlimit = 0;
1246 if (claimCapable && (TOMminusME >= (MMIOstart + 64))) {
1248 TOMminusME &= ~(64 - 1);
1251 if (TOMminusME > 4096) {
1252 REMAPbase = TOMminusME;
1253 REMAPlimit = REMAPbase + (4096 -
TOLUD);
1256 REMAPlimit = REMAPbase + (TOMminusME -
TOLUD);
1276 printk(
BIOS_DEBUG,
"Memory configured in dual-channel asymmetric mode.\n");
1280 printk(
BIOS_DEBUG,
"Memory configured in dual-channel interleaved mode.\n");
1290 "REMAP:\t base = %5uMB\n"
1291 "\t limit = %5uMB\n"
1292 "usedMEsize: %dMB\n",
1315 die(
"Stepping <B1 unsupported in clock-multiplexer selection.\n");
1321 const unsigned int b = 0x14b0 + (
ch * 0x0100);
1323 ((( cardF[
ch])?1:0) << 11) | mixed);
1326 (((!clk1067 && !cardF[
ch])?0:1) << 11) | mixed);
1328 ((( clk1067 && !cardF[
ch])?1:0) << 11) | mixed);
1330 ((( cardF[
ch])?3:2) << 11) | mixed);
1334 (((!clk1067 && !cardF[
ch])?2:3) << 11) | mixed);
1336 ((( clk1067 && !cardF[
ch])?3:2) << 11) | mixed);
1350 die(
"Stepping <B1 unsupported in write i/o initialization.\n");
1352 die(
"SFF platform unsupported in write i/o initialization.\n");
1354 static const u32 ddr3_667_800_by_stepping_ddr3_and_card[][2][2][4] = {
1357 { 0xa3255008, 0x26888209, 0x26288208, 0x6188040f },
1358 { 0x7524240b, 0xa5255608, 0x232b8508, 0x5528040f },
1361 { 0xa6255308, 0x26888209, 0x212b7508, 0x6188040f },
1362 { 0x7524240b, 0xa6255708, 0x132b7508, 0x5528040f },
1367 { 0xc5257208, 0x26888209, 0x26288208, 0x6188040f },
1368 { 0x7524240b, 0xc5257608, 0x232b8508, 0x5528040f },
1371 { 0xb6256308, 0x26888209, 0x212b7508, 0x6188040f },
1372 { 0x7524240b, 0xb6256708, 0x132b7508, 0x5528040f },
1376 static const u32 ddr3_1067_by_channel_and_card[][2][4] = {
1378 { 0xb2254708, 0x002b7408, 0x132b8008, 0x7228060f },
1379 { 0xb0255008, 0xa4254108, 0x4528b409, 0x9428230f },
1382 { 0xa4254208, 0x022b6108, 0x132b8208, 0x9228210f },
1383 { 0x6024140b, 0x92244408, 0x252ba409, 0x9328360c },
1392 ? ddr3_667_800_by_stepping_ddr3_and_card[a1step][2 - ddr3clock][cardF[
ch]]
1393 : ddr3_1067_by_channel_and_card[
ch][cardF[
ch]];
1413 const unsigned int base = 0x14b0 + (
ch * 0x0100);
1416 tmp &= ~((3 << 25) | (1 << 8) | (7 << 16) | (0xf << 20) | (1 << 27));
1418 switch (ddr3clock) {
1420 tmp |= (1 << 16) | (4 << 20);
1423 tmp |= (2 << 16) | (3 << 20);
1427 tmp |= (2 << 16) | (1 << 20);
1429 tmp |= (2 << 16) | (2 << 20);
1447 die(
"Stepping <B1 unsupported in "
1448 "system-memory i/o initialization.\n");
1452 tmp |= (1<<9) | (1<<13);
1456 tmp &= ~(0xff | (1<<11) | (1<<12) |
1457 (1<<16) | (1<<18) | (1<<27) | (0xf<<28));
1458 tmp |= (1<<7) | (1<<11) | (1<<16);
1459 switch (ddr3clock) {
1475 tmp &= ~((1<<20) | (7<<11) | (0xf << 24) | (0xf << 16));
1477 switch (ddr3clock) {
1479 tmp |= (2 << 24) | (10 << 16);
1482 tmp |= (3 << 24) | (7 << 16);
1485 tmp |= (4 << 24) | (4 << 16);
1497 tmp &= ~((0xf << 8) | (0x7 << 20) | 0xf | (0xf << 24));
1498 tmp |= (0x3 << 20) | (5 << 24);
1499 switch (ddr3clock) {
1501 tmp |= (2 << 8) | 0xc;
1504 tmp |= (3 << 8) | 0xa;
1507 tmp |= (4 << 8) | 0x7;
1513 tmp &= ~((3 << 4) | (3 << 16) | (3 << 30));
1514 tmp |= (2 << 4) | (2 << 16);
1542 die(
"tWR value unsupported in Jedec initialization.\n");
1562 static const u8 wr_lut[] = { 1, 2, 3, 4, 5, 5, 6, 6 };
1564 const int WL = ((
timings->tWL - 5) & 7) << 6;
1565 const int ODT_120OHMS = (1 << 9);
1566 const int ODS_34OHMS = (1 << 4);
1567 const int WR = (wr_lut[
timings->
tWR - 5] & 7) << 12;
1568 const int DLL1 = 1 << 11;
1570 const int INTERLEAVED = 1 << 6;
1584 read32((
u32 *)(rankaddr | ODT_120OHMS | ODS_34OHMS));
1586 read32((
u32 *)(rankaddr | WR | DLL1 |
CAS | INTERLEAVED));
1612 const int quadcore = cores == 4;
1652 if (dimms[
ch].ranks == 1)
1662 if (!channel && !rank)
1702 while (!(
read8((
u8 *)0xfed40000) & (1 << 7))) {}
static uint32_t read32(const void *addr)
static uint8_t read8(const void *addr)
static struct cpuid_result cpuid_ext(int op, unsigned int ecx)
#define DIV_ROUND_UP(x, y)
#define printk(level,...)
void __noreturn die(const char *fmt,...)
DEVTREE_CONST struct device * pcidev_path_on_root(pci_devfn_t devfn)
void raminit(struct romstage_params *params)
void gm45_early_reset(void)
static __always_inline uint8_t mchbar_read8(const uintptr_t offset)
#define mchbar_setbits32(addr, set)
static __always_inline void mchbar_write16(const uintptr_t offset, const uint16_t value)
static __always_inline void mchbar_write8(const uintptr_t offset, const uint8_t value)
static __always_inline void mchbar_clrsetbits8(uintptr_t offset, uint8_t clear, uint8_t set)
static __always_inline void mchbar_write32(const uintptr_t offset, const uint32_t value)
#define mchbar_clrbits8(addr, clear)
#define mchbar_clrbits16(addr, clear)
#define mchbar_setbits8(addr, set)
static __always_inline void mchbar_clrsetbits32(uintptr_t offset, uint32_t clear, uint32_t set)
static __always_inline uint32_t mchbar_read32(const uintptr_t offset)
#define mchbar_clrbits32(addr, clear)
static __always_inline void epbar_write8(const uintptr_t offset, const uint8_t value)
static __always_inline void mchbar_clrsetbits16(uintptr_t offset, uint16_t clear, uint16_t set)
static __always_inline uint16_t mchbar_read16(const uintptr_t offset)
static __always_inline void epbar_write32(const uintptr_t offset, const uint32_t value)
#define IF_RANK_POPULATED(dimms, ch, r)
#define CxDRBy_BOUND_MB(r, b)
void raminit_receive_enable_calibration(const timings_t *, const dimminfo_t *)
void init_igd(const sysinfo_t *const)
void raminit_rcomp_calibration(stepping_t stepping)
void igd_compute_ggc(sysinfo_t *const sysinfo)
u32 decode_igd_memory_size(u32 gms)
Decodes used Graphics Mode Select (GMS) to kilobytes.
#define CxDRBy_BOUND_SHIFT(r)
#define CLKCFG_MEMCLK_MASK
#define CLKCFG_MEMCLK_SHIFT
#define CxDRBy_BOUND_MASK(r)
void raminit_thermal(const sysinfo_t *)
#define CLKCFG_FSBCLK_MASK
#define CxDRT0_BtB_WtR_MASK
#define DCC_SET_EREG_MASK
#define PMSTS_BOTH_SELFREFRESH
#define CxDCLKDIS_MCHBAR(x)
#define CxDRBy_MCHBAR(x, r)
#define CxDRT0_BtB_WtP_MASK
void raminit_write_training(const mem_clock_t, const dimminfo_t *, int s3resume)
#define CxWRTy_MCHBAR(ch, s)
u32 decode_igd_gtt_size(u32 gsm)
Decodes used Graphics Stolen Memory (GSM) to kilobytes.
#define CxDRT0_BtB_WtR_SHIFT
#define CxDRA_PAGESIZE(r, p)
#define CxDRA_BANKS(r, b)
#define CxDRC2_NOTPOP_MASK
#define CxDRC0_RANKEN_MASK
#define CxDRA_PAGESIZE_MASK
#define CxDRC1_NOTPOP_MASK
void raminit_read_training(const dimminfo_t *, int s3resume)
@ CHANNEL_MODE_DUAL_ASYNC
@ CHANNEL_MODE_DUAL_INTERLEAVED
#define CxDRT0_BtB_WtP_SHIFT
static __always_inline void pci_and_config16(const struct device *dev, u16 reg, u16 andmask)
static __always_inline void pci_and_config8(const struct device *dev, u16 reg, u8 andmask)
static __always_inline void pci_update_config8(const struct device *dev, u16 reg, u8 mask, u8 or)
static __always_inline u16 pci_read_config16(const struct device *dev, u16 reg)
static __always_inline void pci_or_config8(const struct device *dev, u16 reg, u8 ormask)
static __always_inline u32 pci_read_config32(const struct device *dev, u16 reg)
static __always_inline u8 pci_read_config8(const struct device *dev, u16 reg)
static __always_inline void pci_write_config16(const struct device *dev, u16 reg, u16 val)
static __always_inline void pci_write_config8(const struct device *dev, u16 reg, u8 val)
static int smbus_read_byte(struct device *const dev, u8 addr)
void timestamp_add_now(enum timestamp_id id)
#define BIOS_INFO
BIOS_INFO - Expected events.
#define BIOS_DEBUG
BIOS_DEBUG - Verbose output.
#define BIOS_SPEW
BIOS_SPEW - Excessively verbose output.
#define BIOS_WARNING
BIOS_WARNING - Bad configuration.
static struct dramc_channel const ch[2]
static void vc1_program_timings(const fsb_clock_t fsb)
static void calculate_derived_timings(sysinfo_t *const sysinfo, const unsigned int tCLK, const spdinfo_t *const spdinfo)
int raminit_read_vco_index(void)
static unsigned int find_common_clock_cas(sysinfo_t *const sysinfo, const spdinfo_t *const spdinfo)
static void ddr3_calibrate_zq(void)
static void memory_io_init(const mem_clock_t ddr3clock, const dimminfo_t *const dimms, const stepping_t stepping, const int sff)
static void clock_crossing_setup(const fsb_clock_t fsb, const mem_clock_t ddr3clock, const dimminfo_t *const dimms)
static void ddr3_read_io_init(const mem_clock_t ddr3clock, const dimminfo_t *const dimms, const int sff)
static void verify_ddr3_dimm(sysinfo_t *const sysinfo, int dimm)
static mem_clock_t clock_index(const unsigned int clock)
static void ddr3_select_clock_mux(const mem_clock_t ddr3clock, const dimminfo_t *const dimms, const stepping_t stepping)
static unsigned int get_mmio_size(void)
static void rcomp_initialization(const stepping_t stepping, const int sff)
static void dram_optimizations(const timings_t *const timings, const dimminfo_t *const dimms)
#define DEFAULT_PCI_MMIO_SIZE
static void dram_powerup(const int resume)
static void post_jedec_sequence(const int cores)
static int test_dimm(sysinfo_t *const sysinfo, int dimm, int addr, int bitmask, int expected)
void enter_raminit_or_reset(void)
static void set_igd_memory_frequencies(const sysinfo_t *const sysinfo)
static void collect_dimm_config(sysinfo_t *const sysinfo)
static void program_memory_map(const dimminfo_t *const dimms, const channel_mode_t mode, const int prejedec, u16 ggc)
void get_gmch_info(sysinfo_t *sysinfo)
static void lower_clock(unsigned int *const clock)
static void normalize_clock(unsigned int *const clock)
void raminit_reset_readwrite_pointers(void)
static void reset_on_bad_warmboot(void)
static void jedec_init(const timings_t *const timings, const dimminfo_t *const dimms)
static void prejedec_memory_map(const dimminfo_t *const dimms, channel_mode_t mode)
static void odt_setup(const timings_t *const timings, const int sff)
static void configure_dram_control_mode(const timings_t *const timings, const dimminfo_t *const dimms)
static const gmch_gfx_t gmch_gfx_types[][5]
static void dram_program_timings(const timings_t *const timings)
static void misc_settings(const timings_t *const timings, const stepping_t stepping)
static void ddr3_write_io_init(const mem_clock_t ddr3clock, const dimminfo_t *const dimms, const stepping_t stepping, const int sff)
static void collect_ddr3(sysinfo_t *const sysinfo, spdinfo_t *const config)
static void set_system_memory_frequency(const timings_t *const timings)
static void verify_ddr3(sysinfo_t *const sysinfo, int mask)
static void dram_program_banks(const dimminfo_t *const dimms)
u32 raminit_get_rank_addr(unsigned int channel, unsigned int rank)
static fsb_clock_t read_fsb_clock(void)
#define IF_CHANNEL_POPULATED(dimms, idx)
#define FOR_EACH_POPULATED_CHANNEL(dimms, idx)
#define FOR_EACH_POPULATED_RANK(dimms, ch, r)
#define FOR_EACH_POPULATED_RANK_IN_CHANNEL(dimms, ch, r)
#define FOR_EACH_CHANNEL(idx)
#define RANKS_PER_CHANNEL
#define CHANNEL_IS_CARDF(dimms, idx)
#define CHANNEL_IS_POPULATED(dimms, idx)
#define PCI_CLASS_REVISION
#define PCI_DEV(SEGBUS, DEV, FN)
DEVTREE_CONST void * chip_info
unsigned int rank_capacity_mb
unsigned int rank_capacity_mb
enum chip_cap chip_capacity
struct spdinfo_t::@321 channel[2]
unsigned int cas_latencies
unsigned int chip_capacity
struct timings selected_timings