On 4/11/10 7:50 AM, repository service wrote:
> Author: linux_junkie
> Date: Sun Apr 11 07:50:08 2010
> New Revision: 5402
> URL: https://tracker.coreboot.org/trac/coreboot/changeset/5402
>
> Log:
> Trivial changes to i82830 raminit.c for USE_PRINTK_IN_CAR.
> Signed-off-by: Joseph Smith <j...@settoplinux.org>
> Acked-by: Joseph Smith <j...@settoplinux.org>
>
> Modified:
>    trunk/src/northbridge/intel/i82830/raminit.c
>
> Modified: trunk/src/northbridge/intel/i82830/raminit.c
> ==============================================================================
> --- trunk/src/northbridge/intel/i82830/raminit.c      Sat Apr 10 00:25:27 
> 2010        (r5401)
> +++ trunk/src/northbridge/intel/i82830/raminit.c      Sun Apr 11 07:50:08 
> 2010        (r5402)
> @@ -30,16 +30,10 @@
>   

>  
>  static void ram_read32(u8 dimm_start, u32 offset)
>  {
>       if (offset == 0x55aa55aa) {
>   
...
> +             PRINTK_DEBUG("  Reading RAM at 0x%08x => 0x%08x\n", (dimm_start 
> * 32 * 1024 * 1024), read32(dimm_start * 32 * 1024 * 1024));
>  
>   
There is a good chance that this read does not happen unless debugging
is enabled. Is that on purpose?
It would be clearer to pull this out of the PRINTK like this:

#if CONFIG_RAM_DEBUG
    u32 value = read32(dimm_start * 32 * 1024 * 1024);
    PRINTK_DEBUG(" Reading RAM at 0x%08x => 0x%08x\n", (dimm_start * 32
* 1024 * 1024), value);
#endif

>                       /* MRS command */
>                       /* TODO: Set offset 0x1d0 according to DRT values */
> -                     PRINT_DEBUG(" MRS ");
> +                     PRINTK_DEBUG(" MRS\n");
>   
You could make these PRINTK(BIOS_DEBUG, ...) instead of
PRINTK_DEBUG(...) to be able to easily use different log levels with one
macro.


-- 
coreboot mailing list: coreboot@coreboot.org
http://www.coreboot.org/mailman/listinfo/coreboot

Reply via email to