This was a hack for our own branch. I never did a proper fix because we
were only using seabios short term.

On Mon, Mar 16, 2020 at 10:44 AM Paul Menzel <pmen...@molgen.mpg.de> wrote:

> From: Raul E Rangel <rran...@chromium.org>
> Date: Tue, 14 Jan 2020 14:19:00 -0700
>
> There seems to be a mismatch between the ACPI table coreboot writes, and
> what SeaBIOS is scanning:
>
> SeaBIOS:
> Scanning: 0x00000000 : 0x00001000
> Scanning: 0xade50000 : 0xb0000000
>
> Coreboot:
> IMD ROOT    0. affff000 00001000
> IMD SMALL   1. afffe000 00001000
> FSP MEMORY  2. aeffe000 01000000
> CONSOLE     3. aefde000 00020000
> TIME STAMP  4. aefdd000 00000910
> TSEG        5. adfdd000 01000000
> RAMSTAGE    6. adede000 000ff000
> REFCODE     7. ade8e000 00050000
> ACPI GNVS   8. ade8d000 00001000
> COREBOOT    9. ade85000 00008000
> ACPI       10. ade61000 00024000
> TPM2 TCGLOG11. ade51000 00010000
> SMBIOS     12. ade50000 00000800
>
> BUG=none
> TEST=Dali is able to boot
>
> Change-Id: I1db339f08d0754b836f84fe87cbf1139f27270e1
> Signed-off-by: Raul E Rangel <rran...@chromium.org>
> Reviewed-on:
>
> https://chromium-review.googlesource.com/c/chromiumos/third_party/seabios/+/2001559
> Reviewed-by
> <https://chromium-review.googlesource.com/c/chromiumos/third_party/seabios/+/2001559Reviewed-by>:
> Martin Roth <martinr...@chromium.org>
> Commit-Queue: Martin Roth <martinr...@chromium.org>
> Tested-by: Martin Roth <martinr...@chromium.org>
> ---
> The real bug should be fixed here.
>
>   src/fw/coreboot.c | 14 +++++++++++++-
>   1 file changed, 13 insertions(+), 1 deletion(-)
>
> diff --git a/src/fw/coreboot.c b/src/fw/coreboot.c
> index 7c0954b..b95c680 100644
> --- a/src/fw/coreboot.c
> +++ b/src/fw/coreboot.c
> @@ -243,10 +243,19 @@ void coreboot_debug_putc(char c)
>   static void
>   scan_tables(u32 start, u32 size)
>   {
> +    if (size > 0x100000) {
> +        dprintf(5, "Size is too large: %d\n", size);
> +        size = 0x100000;
> +    }
>       void *p = (void*)ALIGN(start, 16);
>       void *end = (void*)start + size;
> -    for (; p<end; p += 16)
> +    dprintf(5, "Scanning: %p : %p\n", p, end);
> +    for (; p<end; p += 16) {
>           copy_table(p);
> +        // dprintf(5, ".");
> +    }
> +
> +    dprintf(3, "\nDone Scanning\n");
>   }
>
>   void
> @@ -266,9 +275,12 @@ coreboot_platform_setup(void)
>       int i, count = MEM_RANGE_COUNT(cbm);
>       for (i=0; i<count; i++) {
>           struct cb_memory_range *m = &cbm->map[i];
> +
> +        dprintf(3, "Looking at type: %x\n", m->type);
>           if (m->type == CB_MEM_TABLE)
>               scan_tables(m->start, m->size);
>       }
> +    dprintf(3, "Done relocating coreboot bios tables\n");
>
>       find_acpi_features();
>   }
> --
> 2.25.1
>
_______________________________________________
SeaBIOS mailing list -- seabios@seabios.org
To unsubscribe send an email to seabios-le...@seabios.org

Reply via email to