From c8062ff9b485f75648003884222ccb6a6d814e93 Mon Sep 17 00:00:00 2001 From: Subrata Banik Date: Fri, 7 Jul 2023 09:21:22 +0000 Subject: [PATCH] mb/google/rex/var/ovis: Enable both Memory Channels (MC0 and MC1) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This patch skips reading the MEM_CH_SEL GPIO aka GPP_E13 to determine the memory channel configuration. The signal behavior is not proper, hence limiting the DIMM capacity to half (only MC0 is enabled). This patch always reports the full memory capacity as in dual channel (both MC0 and MC1 enabled). This change is necessary to ensure that the system reports the correct memory capacity, even if the MEM_CH_SEL GPIO is not working properly. BUG=b:290174538 TEST=Able to detect 32GB memory capacity while booting google/ovis. Without this patch: localhost ~ # cat /proc/meminfo MemTotal: 16183080 kB With this patch: localhost ~ # cat /proc/meminfo   MemTotal: 32673664 kB Change-Id: I6c3fa941abb044b79b13785f7b65d09957f0487d Signed-off-by: Subrata Banik Reviewed-on: https://review.coreboot.org/c/coreboot/+/76359 Reviewed-by: Sumeet R Pawnikar Tested-by: build bot (Jenkins) Reviewed-by: Eric Lai Reviewed-by: Kapil Porwal --- .../google/rex/variants/ovis/Makefile.inc | 1 + src/mainboard/google/rex/variants/ovis/memory.c | 16 ++++++++++++++++ 2 files changed, 17 insertions(+) create mode 100644 src/mainboard/google/rex/variants/ovis/memory.c diff --git a/src/mainboard/google/rex/variants/ovis/Makefile.inc b/src/mainboard/google/rex/variants/ovis/Makefile.inc index 2fa692abed..b7851227d7 100644 --- a/src/mainboard/google/rex/variants/ovis/Makefile.inc +++ b/src/mainboard/google/rex/variants/ovis/Makefile.inc @@ -1,3 +1,4 @@ bootblock-y += gpio.c romstage-y += gpio.c +romstage-y += memory.c ramstage-y += gpio.c diff --git a/src/mainboard/google/rex/variants/ovis/memory.c b/src/mainboard/google/rex/variants/ovis/memory.c new file mode 100644 index 0000000000..f3cdf5ff28 --- /dev/null +++ b/src/mainboard/google/rex/variants/ovis/memory.c @@ -0,0 +1,16 @@ +/* SPDX-License-Identifier: GPL-3.0-or-later */ + +#include + +bool variant_is_half_populated(void) +{ + /* + * FIXME: b/290253752 - Memory Capacity is incorrect + * MEM_CH_SEL GPIO (GPP_E13) is not working as expected on Ovis as result + * channel select configuration is set to single (MC0) instead dual (MC0/1). + * Only MC0 is reporting DIMM attached and MC1 is disable. + * + * W/A: Always report full memory capacity as in dual channel (MC0/1). + */ + return false; +}