Nicola Corna (nicola(a)corna.info) just uploaded a new patch set to gerrit, which you can find at https://review.coreboot.org/17476
-gerrit
commit 15fda93a8eda9de2a52a35f63474a42ee1679016
Author: Nicola Corna <nicola(a)corna.info>
Date: Wed Nov 16 08:57:15 2016 +0100
device/dram/ddr3: add FTB timings
SPD revision 1.1 introduced FTB timings, an extra set of SPD values that
specify a more precise tCKmin, tAAmin, tRCDmin, tRPmin and tRCmin.
For backwards compatibility, the MTB is usually rounded up and the FTB
part is negative. For this reason some memories were not set up optimally,
as the FTB part was ignored and the resulting timing wasn't set to the
minimum value.
The tests were performed on a Lenovo X220 with two Micron 8KTF51264HZ-1G9E
(1866 MHz): reading only the MTB part, Coreboot reported a tCKmin of
1.125 ns, corresponding to a working frequency of 800 MHz; with the
additional tCKmin FTB part (-0.054 ns) the new (rounded) value is
1.070 ns, valid for a 933 MHz operation.
Some manufacturers (like Micron) seems to expect a small rounding on the
timings, so a nearest-value rounding is performed. If this assumption
isn't correct, an error up to ~2 ps can be committed, which is low enough
to be safely ignored.
Change-Id: Ib98f2e70820f207429d04ca6421680109a81f457
Signed-off-by: Nicola Corna <nicola(a)corna.info>
---
src/device/dram/ddr3.c | 32 +++++++++++++++++++++++++-------
1 file changed, 25 insertions(+), 7 deletions(-)
diff --git a/src/device/dram/ddr3.c b/src/device/dram/ddr3.c
index cb5b685..1034852 100644
--- a/src/device/dram/ddr3.c
+++ b/src/device/dram/ddr3.c
@@ -108,9 +108,10 @@ int spd_decode_ddr3(dimm_attr * dimm, spd_raw_data spd)
{
int ret;
u16 crc, spd_crc;
- u8 ftb_divisor, ftb_dividend, capacity_shift, bus_width;
+ u8 capacity_shift, bus_width;
u8 reg8;
u32 mtb; /* medium time base */
+ u32 ftb; /* fine time base */
unsigned int val, param;
ret = SPD_STATUS_OK;
@@ -242,12 +243,6 @@ int spd_decode_ddr3(dimm_attr * dimm, spd_raw_data spd)
dimm->size_mb = ((1 << (capacity_shift + (25 - 20))) * bus_width
* dimm->ranks) / dimm->width;
- /* Fine Timebase (FTB) Dividend/Divisor */
- /* Dividend */
- ftb_dividend = (spd[9] >> 4) & 0x0f;
- /* Divisor */
- ftb_divisor = spd[9] & 0x0f;
-
/* Medium Timebase =
* Medium Timebase (MTB) Dividend /
* Medium Timebase (MTB) Divisor */
@@ -280,6 +275,29 @@ int spd_decode_ddr3(dimm_attr * dimm, spd_raw_data spd)
/* Minimum Four Activate Window Delay Time (tFAWmin) */
dimm->tFAW = (((spd[28] & 0x0f) << 8) + spd[29]) * mtb;
+ /* FTB is introduced in SPD revision 1.1 */
+ if (spd[1] >= 0x11 && spd[9])
+ {
+ /* Fine timebase (1/256 ps) =
+ * Fine Timebase (FTB) Dividend /
+ * Fine Timebase (FTB) Divisor */
+ ftb = (((u16) spd[9] & 0xf0) << 4) / (spd[9] & 0x0f);
+
+ /* SPD recommends to round up the MTB part and use a negative
+ * FTB, so a negative rounding should be always safe */
+
+ /* SDRAM Minimum Cycle Time (tCKmin) correction */
+ dimm->tCK +=(s32)((s8) spd[34] * ftb - 500) / 1000;
+ /* Minimum CAS Latency Time (tAAmin) correction */
+ dimm->tAA += (s32)((s8) spd[35] * ftb - 500) / 1000;
+ /* Minimum RAS# to CAS# Delay Time (tRCDmin) correction */
+ dimm->tRCD += (s32)((s8) spd[36] * ftb - 500) / 1000;
+ /* Minimum Row Precharge Delay Time (tRPmin) correction */
+ dimm->tRP += (s32)((s8) spd[37] * ftb - 500) / 1000;
+ /* Minimum Active to Active/Refresh Delay Time (tRCmin) corr. */
+ dimm->tRC += (s32)((s8) spd[38] * ftb - 500) / 1000;
+ }
+
/* SDRAM Optional Features */
reg8 = spd[30];
printram(" Optional features :");
the following patch was just integrated into master:
commit 533a3859c8306772e585a734361bc2f0b242c075
Author: Paul Menzel <paulepanter(a)users.sourceforge.net>
Date: Sun Nov 27 22:17:44 2016 +0100
nb/intel/i945/gma: Declare count variable outside 'for' loop
Building an image for the Lenovo X60 on Debian 8.5 (jessie) with GCC 4.9.2,
compilation fails with the error below.
```
$ gcc --version
gcc (Debian 4.9.2-10) 4.9.2
[…]
$ make # lenovo/x60 with native graphics initialization
[…]
CC ramstage/northbridge/intel/i945/gma.o
src/northbridge/intel/i945/gma.c: In function 'probe_edid':
src/northbridge/intel/i945/gma.c:570:2: error: 'for' loop initial declarations are only allowed in C99 or C11 mode
for (int i = 0; i < 8; i++) {
^
src/northbridge/intel/i945/gma.c:570:2: note: use option -std=c99, -std=gnu99, -std=c11 or -std=gnu11 to compile your code
Makefile:316: recipe for target 'build/ramstage/northbridge/intel/i945/gma.o' failed
make: *** [build/ramstage/northbridge/intel/i945/gma.o] Error 1
```
Fix this by declaring the count variable outside the 'for' loop.
Change-Id: Icf69337ee46c86bafc4e1320fd99f8f8f5155bfe
Signed-off-by: Paul Menzel <paulepanter(a)users.sourceforge.net>
Reviewed-on: https://review.coreboot.org/17623
Tested-by: build bot (Jenkins)
Reviewed-by: Arthur Heymans <arthur(a)aheymans.xyz>
See https://review.coreboot.org/17623 for details.
-gerrit
the following patch was just integrated into master:
commit 2966c9958985ed5a856f9aa6cfdb6dfa45ea8bf9
Author: Patrick Rudolph <siro(a)das-labor.org>
Date: Sat Nov 19 15:46:42 2016 +0100
nb/intel/sandybridge/raminit: Support CL > 11
The code won't allow anything beyond CL11 due to short
CAS Latency mask and a bug in mr0 which had the wrong
bit set for CL > 11.
Increase the CAS bitmask, fix the mr0 reg to allow CAS Latencies
from CL 5 to CL 18.
Use defines instead of hardcoding min and max CAS latencies.
Tested on X220 with two 1866 MHz, CL13 memories
Tested-By: Nicola Corna <nicola(a)corna.info>
Change-Id: I576ee20a923fd63d360a6a8e86c675dd069d53d6
Signed-off-by: Patrick Rudolph <siro(a)das-labor.org>
Reviewed-on: https://review.coreboot.org/17502
Tested-by: build bot (Jenkins)
Reviewed-by: Aaron Durbin <adurbin(a)chromium.org>
Reviewed-by: Kyösti Mälkki <kyosti.malkki(a)gmail.com>
See https://review.coreboot.org/17502 for details.
-gerrit
the following patch was just integrated into master:
commit ca387539b540fb4cbf4f4c2be860d6d8a752b7e5
Author: Kevin Chiu <Kevin.Chiu(a)quantatw.com>
Date: Wed Nov 23 18:06:39 2016 +0800
google/pyro: disable unused devices
The following devices i2c5, i2c6, i2c7, spi1, spi2, uart3
are not used.
BUG=none
BRANCH=master
TEST=emerge-pyro coreboot
Change-Id: I3b7b96e72b82af1885926800ee99beff07755bbc
Signed-off-by: Kevin Chiu <Kevin.Chiu(a)quantatw.com>
Reviewed-on: https://review.coreboot.org/17589
Tested-by: build bot (Jenkins)
Reviewed-by: Martin Roth <martinroth(a)google.com>
Reviewed-by: Aaron Durbin <adurbin(a)chromium.org>
Reviewed-by: Paul Menzel <paulepanter(a)users.sourceforge.net>
See https://review.coreboot.org/17589 for details.
-gerrit
the following patch was just integrated into master:
commit 02ca68d9fa46a136ed200d8fc9684cfbaebe69a9
Author: Kyösti Mälkki <kyosti.malkki(a)gmail.com>
Date: Tue Nov 29 17:45:56 2016 +0200
intel/sch: Switch to MMCONF_SUPPORT_DEFAULT
Forgot to actually "flip the bit" in commit
ebc21d1 intel/sch: Switch to MMCONF_SUPPORT_DEFAULT
Change-Id: Ic095594acb08bae17a6443bc302eb8bfb1ce2083
Signed-off-by: Kyösti Mälkki <kyosti.malkki(a)gmail.com>
Reviewed-on: https://review.coreboot.org/17640
Tested-by: build bot (Jenkins)
Reviewed-by: Aaron Durbin <adurbin(a)chromium.org>
See https://review.coreboot.org/17640 for details.
-gerrit
the following patch was just integrated into master:
commit 5a1a1b5fe699f389fef945c0dbb608aaa0ec91d7
Author: Sumeet Pawnikar <sumeet.r.pawnikar(a)intel.com>
Date: Thu Nov 24 14:31:54 2016 +0530
mainboard/google/reef: Set DPTF CPU passive temperature trip point to 95C
This pach sets the DPTF passive temperature trip point for CPU back to
95 degree celsius from 61 degree celsius as per previous thermal
optimizations (https://review.coreboot.org/#/c/16766/).
BUG=chrome-os-partner:60038
BRANCH=master
TEST=built, booted on Reef and verified the passive trip point
funtionality.
Change-Id: I83ce69b19a94e4ea8ebedfc06f259579ed6dd5d3
Signed-off-by: Sumeet Pawnikar <sumeet.r.pawnikar(a)intel.com>
Reviewed-on: https://review.coreboot.org/17598
Tested-by: build bot (Jenkins)
Reviewed-by: Venkateswarlu V Vinjamuri <venkateswarlu.v.vinjamuri(a)intel.com>
Reviewed-by: Aaron Durbin <adurbin(a)chromium.org>
See https://review.coreboot.org/17598 for details.
-gerrit
the following patch was just integrated into master:
commit 1cae20c47fa40be1b61dcad6029fa718c5c59af9
Author: PH Hsu <ph.hsu(a)mediatek.com>
Date: Mon Nov 14 16:21:20 2016 +0800
google/oak: Add DRAM configuration for Samsung K4E8E324EB
Add the configuration for Samsung K4E8E324EB and assign it to RAM_CODE 5.
BUG=chrome-os-partner:58983
TEST=verified on Hana EVT.
Change-Id: Iea55eb393b21e37f36d454706531f588101ee651
Signed-off-by: Patrick Georgi <pgeorgi(a)chromium.org>
Original-Commit-Id: 38d34ed0a0b420e1ab300a47b99035153be5b5d0
Original-Change-Id: I28724c1cf5cf12f47911a571c20280ddab4500d5
Original-Signed-off-by: PH Hsu <ph.hsu(a)mediatek.com>
Original-Reviewed-on: https://chromium-review.googlesource.com/410926
Original-Commit-Ready: Julius Werner <jwerner(a)chromium.org>
Original-Tested-by: Yidi Lin <yidi.lin(a)mediatek.com>
Original-Reviewed-by: Julius Werner <jwerner(a)chromium.org>
Reviewed-on: https://review.coreboot.org/17567
Tested-by: build bot (Jenkins)
Reviewed-by: Paul Menzel <paulepanter(a)users.sourceforge.net>
Reviewed-by: Martin Roth <martinroth(a)google.com>
See https://review.coreboot.org/17567 for details.
-gerrit