From bcab8b0a411adaa6f2791ec5ea36d73efc0aa1e9 Mon Sep 17 00:00:00 2001 From: Rob Barnes Date: Mon, 17 Aug 2020 22:50:10 -0600 Subject: soc/amd/picasso: Store ddr_frequency in MT/s MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This field eventually gets interpretedĀ as MT/s by SMBIOS instead of MHz. Translate from Mhz to MT/s by multiplying by 2. BUG=b:154654737 TEST=dmidecode -t 17 matches expected speed Change-Id: I51b58cb0380f2a2bf000347395ac918ac0717060 Signed-off-by: Rob Barnes Reviewed-on: https://review.coreboot.org/c/coreboot/+/44540 Tested-by: build bot (Jenkins) Reviewed-by: Raul Rangel Reviewed-by: Furquan Shaikh --- src/soc/amd/picasso/dmi.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'src/soc') diff --git a/src/soc/amd/picasso/dmi.c b/src/soc/amd/picasso/dmi.c index 860778d76f..3988616896 100644 --- a/src/soc/amd/picasso/dmi.c +++ b/src/soc/amd/picasso/dmi.c @@ -27,7 +27,15 @@ static void transfer_memory_info(const TYPE17_DMI_INFO *dmi17, dimm->ddr_type = dmi17->MemoryType; - dimm->ddr_frequency = dmi17->Speed; + /** + * Based on the name, ddr_frequency should hold the memory clock + * frequency in MHz. However it is interpreted as MT/s in SMBIOS + * downstream. So multiply by 2 to translate to memory speed in MT/s. + * ddr_frequency is used for setting both config speed and max + * speed. Using config speed so we don't get the false impression + * that the RAM is running faster than it actually is. + */ + dimm->ddr_frequency = 2 * dmi17->ConfigSpeed; dimm->rank_per_dimm = dmi17->Attributes; -- cgit v1.2.3