[coreboot] [v2] r4252 - trunk/coreboot-v2/src/cpu/amd/car

ron minnich rminnich at gmail.com
Mon May 4 22:06:32 CEST 2009


> +
> +#if HAVE_ACPI_RESUME == 1
> +       /* clear only coreboot used region of memory. Note: this may break ECC enabled boards */
> +       clear_memory( _RAMBASE,  (CONFIG_LB_MEM_TOPK << 10) -  _RAMBASE - DCACHE_RAM_SIZE);
> +#else
>         clear_memory(0,  ((CONFIG_LB_MEM_TOPK<<10) - DCACHE_RAM_SIZE));
> -
> +#endif
>  }
>

here is a suggestion.

replace all this with:
       /* clear the coreboot memory */
       clear_memory( _RAMBASE,  (CONFIG_LB_MEM_TOPK << 10) -  _RAMBASE
- DCACHE_RAM_SIZE);
       /* We need to sync up ECC tags if this is a power-on or reset */
       /* we should have a clean way to test this but, for now, we'll
just always do it.
        * Note: fixing this in the right way will speed up resume
substantially.
        */
       /* init all non-coreboot memory ECC tags */
       memcpy(non-lb-memory-pointer, non-lb-memory-pointer, non-lb-memory-size);

I will leave it to you to fill in the blanks. Please, no #ifdef around
this very important piece of code. Let's not put in changes that we
*know* will break boards :-)

ron




More information about the coreboot mailing list