Jacob Garber has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/33183
Change subject: mb/google/poppy: Ensure SPD index is non-zero
......................................................................
mb/google/poppy: Ensure SPD index is non-zero
Memory id's are 1-indexed, so we need to check that the SPD index is
non-zero before converting it to the 0-indexed value in the bitmap.
Change-Id: Icc542239d91c39b89c23f31856c28e7c20b2fc4d
Signed-off-by: Jacob Garber <jgarber1(a)ualberta.ca>
Found-by: Coverity CID 1387028
---
M src/mainboard/google/poppy/variants/nami/memory.c
1 file changed, 5 insertions(+), 1 deletion(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/83/33183/1
diff --git a/src/mainboard/google/poppy/variants/nami/memory.c b/src/mainboard/google/poppy/variants/nami/memory.c
index b7f5185..b6e3d2c 100644
--- a/src/mainboard/google/poppy/variants/nami/memory.c
+++ b/src/mainboard/google/poppy/variants/nami/memory.c
@@ -66,8 +66,12 @@
p->type = MEMORY_DDR4;
p->use_sec_spd = 0;
+ int spd_index = variant_memory_sku();
+ if (spd_index == 0)
+ die("SPD index is 0\n");
+
/* Rcomp resistor values are different for SDP and DDP. */
- if (ddp_bitmap & MEM_ID(variant_memory_sku())) {
+ if (ddp_bitmap & MEM_ID(spd_index)) {
p->rcomp_resistor = rcomp_resistor_ddp;
p->rcomp_resistor_size = sizeof(rcomp_resistor_ddp);
} else {
--
To view, visit https://review.coreboot.org/c/coreboot/+/33183
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-Change-Id: Icc542239d91c39b89c23f31856c28e7c20b2fc4d
Gerrit-Change-Number: 33183
Gerrit-PatchSet: 1
Gerrit-Owner: Jacob Garber <jgarber1(a)ualberta.ca>
Gerrit-MessageType: newchange
Nico Huber has posted comments on this change. ( https://review.coreboot.org/c/libgfxinit/+/27154 )
Change subject: gma pipe setup: Fix secondary pipe cursors <= Sandy Bridge
......................................................................
Patch Set 3:
Registers are described in
https://01.org/sites/default/files/documentation/snb_ihd_os_vol3_part2.pdf
--
To view, visit https://review.coreboot.org/c/libgfxinit/+/27154
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: libgfxinit
Gerrit-Branch: master
Gerrit-Change-Id: I4d79f59a8cb693d73d6da666525f091021efb4fd
Gerrit-Change-Number: 27154
Gerrit-PatchSet: 3
Gerrit-Owner: Nico Huber <nico.h(a)gmx.de>
Gerrit-Reviewer: Adrian-Ken Rueegsegger <ken(a)codelabs.ch>
Gerrit-Reviewer: Arthur Heymans <arthur(a)aheymans.xyz>
Gerrit-Reviewer: Nico Huber <nico.h(a)gmx.de>
Gerrit-Reviewer: Patrick Georgi <pgeorgi(a)google.com>
Gerrit-Reviewer: Paul Menzel <paulepanter(a)users.sourceforge.net>
Gerrit-Reviewer: Reto Buerki <reet(a)codelabs.ch>
Gerrit-Comment-Date: Fri, 14 Jun 2019 18:15:15 +0000
Gerrit-HasComments: No
Gerrit-Has-Labels: No
Gerrit-MessageType: comment