FYI: Merge in progress...

YhLu YhLu at tyan.com
Wed Oct 20 15:40:01 CEST 2004


You still need wbinvd in disable_cache. It is called by raminit.c and
without it the mem can not init properly.

The amd_early_mtrr_init
 Only call do_early_mtrr_init
But that doesn't include

        /* Enable the access to AMD RdDram and WrDram extension bits */
        msr = rdmsr(SYSCFG_MSR);
        msr.lo |= SYSCFG_MSR_MtrrFixDramModEn;
        wrmsr(SYSCFG_MSR, msr);

....
        /* Disable the access to AMD RdDram and WrDram extension bits */
        msr = rdmsr(SYSCFG_MSR);
        msr.lo &= ~SYSCFG_MSR_MtrrFixDramModEn;
        wrmsr(SYSCFG_MSR, msr);


Also 

        /* Enable caching for 0 - 1MB using variable mtrr */
        msr = rdmsr(0x200);
        msr.hi &= 0xfffffff0; 
        msr.hi |= 0x00000000;
        msr.lo &= 0x00000f00; 
        msr.lo |= 0x00000000 | MTRR_TYPE_WRBACK;
        wrmsr(0x200, msr);
                
        msr = rdmsr(0x201);
        msr.hi &= 0xfffffff0;
        msr.hi |= 0x0000000f;
        msr.lo &= 0x000007ff;
        msr.lo |= (~((CONFIG_LB_MEM_TOPK << 10) - 1)) | 0x800;
        wrmsr(0x201, msr);

regards

YH
-----Original Message-----
From: ebiederman at lnxi.com [mailto:ebiederman at lnxi.com] 
Sent: Wednesday, October 20, 2004 1:46 PM
To: YhLu
Cc: Li-Ta Lo; 'Ronald G. Minnich'; 'LinuxBIOS'
Subject: Re: FYI: Merge in progress...

YhLu <YhLu at tyan.com> writes:

> Comment out disable_cache and enabe_cache in amd_early_mtrr_init you will
> get 5s speed up.
> 
> I checked old amd_early_mtrr.inc, it seems it only has enable cache, but
no
> wbinvd.

Right.  At the time I had no clue invalidates were a problem.

I have just removed the wbinvd, it was just there for good measure.

Eric



More information about the coreboot mailing list