Re: [PATCH v1 0/6] google firmware support

From: Mike Waychison
Date: Tue Jan 25 2011 - 14:58:55 EST


On Mon, Jan 24, 2011 at 7:01 PM, Greg KH <greg@xxxxxxxxx> wrote:
> On Mon, Jan 24, 2011 at 04:24:34PM -0800, Mike Waychison wrote:
>>
>>    - [5] prepares for [6] by introducing prepend_to_dmesg() which
>>      allows drivers to prepend pre-kernel messages to the dmesg at
>>      bootup.
>
> That seems "rude".  Why can't you just pick out from the kernel log the
> data you need when it gets printed?  This seems like you feel your code
> should always get a "First Post!" message.

Well, the use case we have is that we prepend all the bios output (and
anything emitted by option roms and boot loaders via int 10h). This
typically runs in the 100+ lines of output.

Basically, everything the user sees on the console after power up is
available to him in the dmesg. We did this out of convenience as it
makes for a good looking log :)

That said, it's dmesg, and we don't build automation on anything in
there if we can help it. I can move this memory console dump
elsewhere (/sys/firmware/log ?)

>  What happens when someone
> else wants this and you get dueling "firsts"?

No idea :)

Originally I had something a little different for getting this done:
I had introduced a weak symbol called something like
"arch_dmesg_fixup()" that could be made strong in the architecture
code somewhere (in my case, it was in this driver). That sort of
pattern would allow us to enforce having only one 'first post'
callback :)

Anyhow, let me know what you think about /sys/firmware/log or similar.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/