[coreboot-gerrit] Patch set updated for coreboot: amd/mct/ddr3: Wait for northbridge P-state transitions

Timothy Pearson (tpearson@raptorengineering.com) gerrit at coreboot.org
Mon Jan 9 20:22:45 CET 2017


Timothy Pearson (tpearson at raptorengineering.com) just uploaded a new patch set to gerrit, which you can find at https://review.coreboot.org/18069

-gerrit

commit 7a351edf317345d70338a4829e9ed64f1a8246d8
Author: Timothy Pearson <tpearson at raptorengineering.com>
Date:   Mon Jan 9 12:33:22 2017 -0600

    amd/mct/ddr3: Wait for northbridge P-state transitions
    
    The existing code waiting for northbridge P-state transitions
    contained a logical error preventing correct operation.  Fix
    the logical error and force coreboot to wait for the P-state
    transitions per the BKDG.
    
    Found-by: Coverity Scan #1347388
    Change-Id: I35f498c836db1439734abe684354c18c8e160368
    Signed-off-by: Timothy Pearson <tpearson at raptorengineering.com>
---
 src/northbridge/amd/amdmct/mct_ddr3/mct_d.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/northbridge/amd/amdmct/mct_ddr3/mct_d.c b/src/northbridge/amd/amdmct/mct_ddr3/mct_d.c
index d1d6e8f..958b382 100644
--- a/src/northbridge/amd/amdmct/mct_ddr3/mct_d.c
+++ b/src/northbridge/amd/amdmct/mct_ddr3/mct_d.c
@@ -6737,7 +6737,7 @@ void mct_ForceNBPState0_En_Fam15(struct MCTStatStruc *pMCTstat,
 			/* Wait until CurNbPState == NbPstateLo */
 			do {
 				dword2 = Get_NB32(pDCTstat->dev_nbctl, 0x174);
-			} while (((dword2 << 19) & 0x7) != (dword & 0x3));
+			} while (((dword2 >> 19) & 0x7) != (dword & 0x3));
 		}
 		dword = Get_NB32(pDCTstat->dev_nbctl, 0x170);
 		dword &= ~(0x3 << 6);		/* NbPstateHi = 0 */
@@ -6748,7 +6748,7 @@ void mct_ForceNBPState0_En_Fam15(struct MCTStatStruc *pMCTstat,
 			/* Wait until CurNbPState == 0 */
 			do {
 				dword2 = Get_NB32(pDCTstat->dev_nbctl, 0x174);
-			} while (((dword2 << 19) & 0x7) != 0);
+			} while (((dword2 >> 19) & 0x7) != 0);
 		}
 	}
 }



More information about the coreboot-gerrit mailing list