On 09.08.2008 22:18, ron minnich wrote:
> Added a find function, and other things. I would really appreciate a
> review here.
>
> Peter is supposed to be in greece on the beach. HA!
>
> This is working on DBE62. Now that it is done I can do some more K8 work --
> assuming it meets with approval.
>
> [...]
>   

Patch looks mostly OK except one part:

> Index: lib/console.c
> ===================================================================
> --- lib/console.c     (revision 726)
> +++ lib/console.c     (working copy)
> @@ -8,9 +8,30 @@
>  int vtxprintf(void (*)(unsigned char, void *arg), 
>               void *arg, const char *, va_list);
>  
> -static int console_loglevel(void)
> +static int loglevel = CONFIG_DEFAULT_CONSOLE_LOGLEVEL;
> +
> +/**
> + * set the console log level
> + * There are no invalid settings, although there are ones that 
> + * do not make much sense. 
> + *
> + * @param level The new level
> + */
> +void set_loglevel(unsigned level) {
> +     if (level > BIOS_SPEW)
> +             printk(BIOS_ALWAYS, "Warning: ridiculous log level setting: %d 
> (max %d)\n", 
> +                     level, BIOS_SPEW);
> +     loglevel = level;
> +}
> +
> +/**
> + * get the console log level
> + *
> + * @return The level
> + */
> +static unsigned int console_loglevel(void)
>  {
> -     return CONFIG_DEFAULT_CONSOLE_LOGLEVEL;
> +     return loglevel;
>  }
>  
>  #ifdef CONFIG_CONSOLE_BUFFER
> @@ -150,9 +171,9 @@
>               COREBOOT_EXTRA_VERSION
>               " "
>               COREBOOT_BUILD
> -             " starting...\n";
> +             " starting... (console logging at %d)\n";
>  
> -     printk(BIOS_INFO, console_test);
> +     printk(BIOS_ALWAYS, console_test, console_loglevel());
>  }
>  
>  /**
>
>   

NACK that part. It will not work and/or it will crash. Sorry.

I take the NACK back if you explain how you can store a variable (not a
constant) in ROM.

Regards,
Carl-Daniel

-- 
http://www.hailfinger.org/


--
coreboot mailing list
[email protected]
http://www.coreboot.org/mailman/listinfo/coreboot

Reply via email to