[coreboot] proposed patch to src/lib/console.c

Myles Watson mylesgw at gmail.com
Tue Apr 21 16:32:28 CEST 2009


On Mon, Apr 13, 2009 at 11:28 AM, ron minnich <rminnich at gmail.com> wrote:
> On Mon, Apr 13, 2009 at 10:24 AM, Peter Stuge <peter at stuge.se> wrote:
>> ron minnich wrote:
>>> calling console output functions BEFORE console_init is called is
>>> an error. This kind of band-aid covers up an error in code, but
>>> does not fix it.
>>
>> I'm in favor, but it could maybe become more complicated when looking
>> at several different console types, because they can only be
>> initialized at different points during startup.
>
> right, but that's not how the code works. Basically, as written, the
> code assumes that no console output is possible
> before console_init is called, and it assumes that all output is
> possible after console_init is called.
>
> Hence, if people follow the simple rule: don't call these before
> console_init, and it's ok to call them after console_init, we can
> remove the bandaid and make this code usable in CAR.

Is there a good way to tell what breaks when we take this out?  How
can you tell from the code whether it's too early to call the
functions?  I like the cleanup, but if it will break my boards I'd
like to know how to fix it afterward.

Thanks,
Myles




More information about the coreboot mailing list