On Sat, 11 Nov 2023 at 06:42, Heinrich Schuchardt <[email protected]> wrote: > > The size of the ACPI table header is not a multiple of 8. We have to mark > struct acpi_xsdt as packed to correctly read the entries. > > Signed-off-by: Heinrich Schuchardt <[email protected]> > --- > include/acpi/acpi_table.h | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-)
Reviewed-by: Simon Glass <[email protected]> It is really unfortunate. Would it be worth adding a test for this, which actually checks the member offset? > > diff --git a/include/acpi/acpi_table.h b/include/acpi/acpi_table.h > index a3b67259e6..20ac3b51ba 100644 > --- a/include/acpi/acpi_table.h > +++ b/include/acpi/acpi_table.h > @@ -80,7 +80,7 @@ struct acpi_rsdt { > }; > > /* XSDT (Extended System Description Table) */ > -struct acpi_xsdt { > +struct __packed acpi_xsdt { > struct acpi_table_header header; > u64 entry[MAX_ACPI_TABLES]; > }; > -- > 2.40.1 > Regards, Simon

