Kyösti Mälkki has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/36192 )
Change subject: vc/amd/agesa: Fix out of bounds read ......................................................................
Patch Set 4:
(2 comments)
https://review.coreboot.org/c/coreboot/+/36192/2/src/vendorcode/amd/agesa/f1... File src/vendorcode/amd/agesa/f12/Proc/Mem/Tech/mtthrcSeedTrain.c:
https://review.coreboot.org/c/coreboot/+/36192/2/src/vendorcode/amd/agesa/f1... PS2, Line 329: if ((RxEn >= NBPtr->MinRxEnSeedGross) && (RxEn <= NBPtr->MaxRxEnSeedTotal)) {
Coverity seemed to attempt to evaluate all branches, but I'm definitely unfamiliar with it. […]
Sources had one static initializer for right-hand side of comparison, so those could get treated as constants. Looks like left-hand side would also have predetermined range of values.
https://review.coreboot.org/c/coreboot/+/36192/2/src/vendorcode/amd/agesa/f1... PS2, Line 359: MemClkCycle = (UINT8) (PassTestRxEnDly[ByteLane] >> 5);
Since you point it out, I'm surprised Coverity didn't flag this or even the use in original line #34 […]
Is the file run through preprocessor before coverity analysis? IDS_HDT_CONSOLE() may just have empty expansion everywhere, inlcuding that line #343.