[PATCH 1/2] arch: x86: lib: acpi_table: Fix MCFG entries

Simon Glass sjg at chromium.org
Mon Feb 7 21:22:31 CET 2022


Hi Moritz,

On Sat, 5 Feb 2022 at 13:17, Moritz Fischer <moritzf at google.com> wrote:
>
> Commit d953137526cc ("x86: Move SSDT table to a writer function")
> introduced a bug where the actual MCFG entries are no longer generated.
>
> Cc: Simon Glass <sjg at chromium.org>
> Fixes: d953137526cc ("x86: Move SSDT table to a writer function")
> Signed-off-by: Moritz Fischer <moritzf at google.com>
> ---
>
> Hi Simon, Andriy,
>
> it looks like this got dropped when moving stuff around, I don't have HW
> to test this, but it seemed off.
>
> - Moritz
>
> ---
>
>  arch/x86/lib/acpi_table.c | 2 ++
>  1 file changed, 2 insertions(+)

Reviewed-by: Simon Glass <sjg at chromium.org>
Tested on: coral
Tested-by: Simon Glass <sjg at chromium.org>


>
> diff --git a/arch/x86/lib/acpi_table.c b/arch/x86/lib/acpi_table.c
> index c0534343f1..753bf39619 100644
> --- a/arch/x86/lib/acpi_table.c
> +++ b/arch/x86/lib/acpi_table.c
> @@ -499,6 +499,8 @@ int acpi_write_mcfg(struct acpi_ctx *ctx, const struct acpi_writer *entry)
>         header->length = sizeof(struct acpi_mcfg);
>         header->revision = 1;
>
> +       current = acpi_fill_mcfg(current);
> +
>         /* (Re)calculate length and checksum */
>         header->length = current - (u32)mcfg;
>         header->checksum = table_compute_checksum(mcfg, header->length);
> --
> 2.35.0.263.gb82422642f-goog
>


More information about the U-Boot mailing list