Re: [PATCH] x86/efi-bgrt: Switch pr_err() to pr_debug() for invalid BGRT

Josh Triplett
2015-06-29T14:00:22Z

On Mon, Jun 29, 2015 at 03:13:05PM +0200, Borislav Petkov wrote:
> On Mon, Jun 29, 2015 at 01:06:42PM +0100, Matt Fleming wrote:
> > From: Matt Fleming <matt.fleming-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
> >
> > It's totally legitimate, per the ACPI spec, for the firmware to set the
> > BGRT 'status' field to zero to indicate that the BGRT image isn't being
> > displayed, and we shouldn't be printing an error message in that case
> > because it's just noise for users. So swap pr_err() for pr_debug().
> >
> > However, Josh points that out it still makes sense to test the validity
> > of the upper 7 bits of the 'status' field, since they're marked as
> > "reserved" in the spec and must be zero. If firmware violates this it
> > really *is* an error.
>
> Sounds to me this should be
>
> pr_warn(FW_WARN "... );
>
> then, no?
>
> So that it hopefully gets caught at early testing when fw can still be
> fixed...?
>
> Better yet FW_BUG even...

Definitely not FW_BUG. The field is reserved *now*; it would be
legitimate for a new version of the BGRT spec to define one of those
bits for something else.

- Josh Triplett