Message ID | 20231112155808.135585-2-sjg@chromium.org |
---|---|
State | Superseded |
Delegated to: | Heinrich Schuchardt |
Headers | show |
Series | efi: Minor improvements for the EFI app | expand |
On 11/12/23 16:58, Simon Glass wrote: > Since struct acpi_table_header is not a multiple of 64 bits, use the > __packed option for struct acpi_xsdt > > This ensures that the entry[] array starts on the correct boundary. > Typically we keep the original signed-off-by when reposting patches. Thanks for picking this change up. Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com> As in your review you suggested to add a unit test I have done so in my v2: [PATCH v2 1/2] acpi: fix struct acpi_xsdt https://patchwork.ozlabs.org/project/uboot/patch/20231112070316.17982-2-heinrich.schuchardt@canonical.com/ > Signed-off-by: Simon Glass <sjg@chromium.org> > --- > > include/acpi/acpi_table.h | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/include/acpi/acpi_table.h b/include/acpi/acpi_table.h > index 1f85de091d39..59ab79ed17c2 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]; > };
Hi Heinrich, On Sun, 12 Nov 2023 at 09:46, Heinrich Schuchardt <heinrich.schuchardt@canonical.com> wrote: > > On 11/12/23 16:58, Simon Glass wrote: > > Since struct acpi_table_header is not a multiple of 64 bits, use the > > __packed option for struct acpi_xsdt > > > > This ensures that the entry[] array starts on the correct boundary. > > > > Typically we keep the original signed-off-by when reposting patches. > > Thanks for picking this change up. > > Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com> > > As in your review you suggested to add a unit test I have done so in my v2: > > [PATCH v2 1/2] acpi: fix struct acpi_xsdt > https://patchwork.ozlabs.org/project/uboot/patch/20231112070316.17982-2-heinrich.schuchardt@canonical.com/ Oh yes, this is a duplicate patch to yours...I had it hanging around for a while. So we can drop it. > > > Signed-off-by: Simon Glass <sjg@chromium.org> > > --- > > > > include/acpi/acpi_table.h | 2 +- > > 1 file changed, 1 insertion(+), 1 deletion(-) > > > > diff --git a/include/acpi/acpi_table.h b/include/acpi/acpi_table.h > > index 1f85de091d39..59ab79ed17c2 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]; > > }; > Regards, Simon
diff --git a/include/acpi/acpi_table.h b/include/acpi/acpi_table.h index 1f85de091d39..59ab79ed17c2 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]; };
Since struct acpi_table_header is not a multiple of 64 bits, use the __packed option for struct acpi_xsdt This ensures that the entry[] array starts on the correct boundary. Signed-off-by: Simon Glass <sjg@chromium.org> --- include/acpi/acpi_table.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)