[coreboot] pci and console changes

Carl-Daniel Hailfinger c-d.hailfinger.devel.2006 at gmx.net
Sun Aug 10 01:20:08 CEST 2008


On 10.08.2008 01:15, Peter Stuge wrote:
> On Sun, Aug 10, 2008 at 12:57:42AM +0200, Carl-Daniel Hailfinger wrote:
>   
>>> -static int console_loglevel(void)
>>> +static int loglevel = CONFIG_DEFAULT_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.
>>     
>
> Doesn't it live on the heap/stack in cache?
>   

Unfortunately not. It's a global variable (so not on stack) and we do
nothing to allow global variables. Look at the hoops the printk buffer
code is jumping through to get some sort of global variables.

The good news is that the printk buffer helpers can be amended to store
any number of global variables.

Regards,
Carl-Daniel

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





More information about the coreboot mailing list