[coreboot] [patch][v2] AMD Fam10 memory controller updates

Peter Stuge peter at stuge.se
Tue Apr 8 18:33:09 CEST 2008


On Tue, Apr 08, 2008 at 09:27:15AM -0600, Marc Jones wrote:
> Removed confusing whitespace changes.

Awesome. Made the patch 1/3 smaller too!


Two questions:

> Index: coreboot-v2/src/northbridge/amd/amdmct/mct/mct_d.c
> @@ -3358,10 +3395,8 @@
>  	/* Tri-state unused ODTs when motherboard termination is available */
>  
>  	// FIXME: skip for Ax
> -
> -	dev = pDCTstat->dev_dct;
> -	word = 0;
> -	for (cs = 0; cs < 8; cs += 2) {
> +	// FIXME: BUG53109 function can incorrectly program F2x[1,0]9C_x0C[11:8]_ODTTri
> +/*	for (cs = 0; cs < 8; cs += 2) {
>  		if (!(pDCTstat->CSPresent & (1 << cs))) {
>  			if (!(pDCTstat->CSPresent & (1 << (cs + 1))))
>  				word |= (1 << (cs >> 1));
> @@ -3372,6 +3407,7 @@
>  	val = Get_NB32_index_wait(dev, index_reg, index);
>  	val |= (word << 8);
>  	Set_NB32_index_wait(dev, index_reg, index, val);
> +*/
>  }

Can you comment on this comment? Why not just remove the code?


> Index: coreboot-v2/src/northbridge/amd/amdmct/mct/mctecc_d.c
> @@ -101,7 +101,7 @@
>  
>  	OF_ScrubCTL = 0;		/* Scrub CTL for Dcache, L2, and dram */
>  	val = mctGet_NVbits(NV_DCBKScrub);
> -	mct_AdjustScrub_D(pDCTstatA, val);
> +	mct_AdjustScrub_D(pDCTstatA, (u16) &val);

Will this really work?

val is u32, mct_AdjustScrub_D() wants u16*, isn't this
casting/truncating the pointer?


//Peter




More information about the coreboot mailing list