[PATCH v1] cmd: acpi: Print revisions in hex format

Wolfgang Wallner wolfgang.wallner at br-automation.com
Tue Sep 8 17:32:08 CEST 2020


Hi Andy,

-----"Andy Shevchenko" <andy.shevchenko at gmail.com> schrieb: -----
> Betreff: Re: [PATCH v1] cmd: acpi: Print revisions in hex format
> 
> On Tue, Sep 8, 2020 at 5:58 PM Wolfgang Wallner
> <wolfgang.wallner at br-automation.com> wrote:
> > -----"Andy Shevchenko" <andriy.shevchenko at linux.intel.com> schrieb: -----
> > > Betreff: [PATCH v1] cmd: acpi: Print revisions in hex format
> > >
> > > The revisions are usually dates in hex-decimal format representing
> > > YYYYmmdd. Print them in hex to see this clearly.
> > >
> > > Before:
> > >   ...
> > >   FACP 000e5420 0000f4 (v06 U-BOOT U-BOOTBL 538970376 INTL 0)
> > >   DSDT 000e4780 000ba0 (v02 U-BOOT U-BOOTBL 65536 INTL 538968870)
> > >   ...
> > > After:
> > >   ...
> > >   FACP 000e5420 0000f4 (v06 U-BOOT U-BOOTBL 20200908 INTL 0)
> > >   DSDT 000e4780 000ba0 (v02 U-BOOT U-BOOTBL 10000 INTL 20200326)
> > >   ...
> > >
> > > Fixes: 0b885bcfd9b0 ("acpi: Add an acpi command")
> > > Cc: Wolfgang Wallner <wolfgang.wallner at br-automation.com>
> > > Signed-off-by: Andy Shevchenko <andriy.shevchenko at linux.intel.com>
> > > ---
> > >  cmd/acpi.c | 2 +-
> > >  1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > Reviewed-by: Wolfgang Wallner <wolfgang.wallner at br-automation.com>
> > Tested-by: Wolfgang Wallner <wolfgang.wallner at br-automation.com>
> > Tested on a custom Apollolake board.
> 
> Thanks!

You're welcome.

> 
> > Related to "acpi list":
> > During my recent ACPI debugging I found it very useful to have the checksum
> > printed for each table with "acpi list". Would there be interest to have that
> > upstream? If so I would send a patch.
> 
> Can you elaborate what was the problem that checksum helped?

Sure. I saw two strange things with the ACPI checksums:

1) The DSDT length included uninitialized bytes from alignment. This is
described in the following link:

   https://lists.denx.de/pipermail/u-boot/2020-September/425378.html
   
This was the actual bug I was looking for.
   
2) acpi_create_spcr() is missing a memset(). The other acpi_create_xxxx()
functions perform a memset on their structure, acpi_create_spcr() does not
and as a result the contents of this table are party uninitialized.

I plan to send a patch for both of them.

Regards, Wolfgang







More information about the U-Boot mailing list