x86/tables: Upgrade error to critical

When more ACPI tables are written than space is available in CBMEM, the
buffer overflow corrupts other CBMEM tables and a successful boot is unlikely.

Upgrade the error message to critical and be more precise what to do.

Change-Id: I152842945f552905729265f7d623cd581dd0a8d0
Signed-off-by: Patrick Rudolph <patrick.rudolph@9elements.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/77714
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Naresh <naresh.solanki.2011@gmail.com>
This commit is contained in:
Patrick Rudolph 2023-09-07 09:59:41 +02:00 committed by Martin L Roth
parent ba7a9eefcf
commit f372c40b90
1 changed files with 4 additions and 2 deletions

View File

@ -101,8 +101,10 @@ static unsigned long write_acpi_table(unsigned long rom_table_end)
rom_table_end = ALIGN_UP(rom_table_end, 16);
new_high_table_pointer = write_acpi_tables(high_table_pointer);
if (new_high_table_pointer > (high_table_pointer
+ max_acpi_size))
printk(BIOS_ERR, "Increase ACPI size\n");
+ max_acpi_size)) {
printk(BIOS_CRIT, "ACPI tables overflowed and corrupted CBMEM!\n");
printk(BIOS_ERR, "Increase config MAX_ACPI_TABLE_SIZE_KB!\n");
}
printk(BIOS_DEBUG, "ACPI tables: %ld bytes.\n",
new_high_table_pointer - high_table_pointer);