Re: [PATCH] firmware: google: memconsole: Adapt to new coreboot ring buffer format

From: Greg Kroah-Hartman
Date: Fri Apr 28 2017 - 03:15:03 EST


On Thu, Apr 27, 2017 at 01:59:17PM -0700, Julius Werner wrote:
> This patch needs to be applied on top of the other memconsole patches
> currently queued up in char-misc-next (ending in 049a59db34e).
>
> -------------------------8<--------------------------------------------

That needs to go below the --- line, not above it.

>
> The upstream coreboot implementation of memconsole was enhanced from a
> single-boot console to a persistent ring buffer
> (https://review.coreboot.org/#/c/18301). This patch changes the kernel
> memconsole driver to be able to read the new format.
>
> In addition, it is desirable for the driver to always return the current
> state of the console, so that it may be used by runtime firmware to log
> further messages after the kernel is already initialized. The existing
> implementation would already re-read the buffer on every access, but
> only measured the total size of the console once during initialization.
> Thus, the generic console interface was redesigned to allow the
> implementation full control over how to process an access, and the
> coreboot implementation will re-read the console size every time.
>
> Finally, add a new /sys/firmware/rawlog node and change the existing
> /sys/firmware/log to sanitize non-printable characters from the output.
> With the new persistent console it becomes more likely that bytes might
> get slightly corrupted (due to DRAM degradation during a reboot), and
> it's usually undesirable to get stray control characters in the console
> dump because a bit in a letter flipped.

When you say things like "in addition" and "finally", that implies that
the code needs to be broken up into multiple patches. Rememeber, each
patch only should ever do 1 thing.

Please do that here and make a patch series.

thanks,

greg k-h