[coreboot] [PATCH] More explicite and straight way to set seed

Bao, Zheng Zheng.Bao at amd.com
Wed Dec 1 06:50:25 CET 2010


More explicite and straight way to set seed.

Signed-off-by: Zheng Bao <zheng.bao at amd.com>


Index: src/northbridge/amd/amdmct/mct/mctsrc.c
===================================================================
--- src/northbridge/amd/amdmct/mct/mctsrc.c	(revision 6135)
+++ src/northbridge/amd/amdmct/mct/mctsrc.c	(working copy)
@@ -1023,13 +1023,9 @@
 
 	dev = pDCTstat->dev_dct;
 	for (index = 0x50; index <= 0x52; index ++) {
-		val = Get_NB32_index_wait(dev, index_reg, index);
-		val |= (FenceTrnFinDlySeed & 0x1F);
+		val = (FenceTrnFinDlySeed & 0x1F);
 		if (index != 0x52) {
-			val &= ~(0xFF << 8);
-			val |= (val & 0xFF) << 8;
-			val &= 0xFFFF;
-			val |= val << 16;
+			val |= val << 8 | val << 16 | val << 24;
 		}
 		Set_NB32_index_wait(dev, index_reg, index, val);
 	}
Index: src/northbridge/amd/amdmct/mct_ddr3/mctsrc.c
===================================================================
--- src/northbridge/amd/amdmct/mct_ddr3/mctsrc.c	(revision 6135)
+++ src/northbridge/amd/amdmct/mct_ddr3/mctsrc.c	(working copy)
@@ -972,13 +972,9 @@
 	 */
 	dev = pDCTstat->dev_dct;
 	for (index = 0x50; index <= 0x52; index ++) {
-		val = Get_NB32_index_wait(dev, index_reg, index) &
~0xFF;
-		val |= (FenceTrnFinDlySeed & 0x1F);
+		val = (FenceTrnFinDlySeed & 0x1F);
 		if (index != 0x52) {
-			val &= ~(0xFF << 8);
-			val |= (val & 0xFF) << 8;
-			val &= 0xFFFF;
-			val |= val << 16;
+			val |= val << 8 | val << 16 | val << 24;
 		}
 		Set_NB32_index_wait(dev, index_reg, index, val);
 	}
-------------- next part --------------
A non-text attachment was scrubbed...
Name: amdmct_succinct.patch
Type: application/octet-stream
Size: 1498 bytes
Desc: amdmct_succinct.patch
URL: <http://www.coreboot.org/pipermail/coreboot/attachments/20101201/2ee46efd/attachment.obj>


More information about the coreboot mailing list