Arthur Heymans has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/33383 )
Change subject: nb/intel/nehalem: Prevent out of bounds read ......................................................................
Patch Set 1:
(1 comment)
Thx for finding this. Not sure if my suggestion makes the coverity happy. If you want to make that code a bit more readable you could also have a look at other raminit code. See for instance snb_normalize_tclk() in northbridge/intel/sandybridge/raminit_sandy.c
https://review.coreboot.org/#/c/33383/1/src/northbridge/intel/nehalem/ramini... File src/northbridge/intel/nehalem/raminit.c:
https://review.coreboot.org/#/c/33383/1/src/northbridge/intel/nehalem/ramini... PS1, Line 601: cycletime > min_cycletime[clock_speed_index] You want to die() if cycletime > min_cycletime[0], with a message like: "RAM init: Decoded SPD DRAM freq is slower than the controller minimum!"
You can add this before the loop.