summaryrefslogtreecommitdiff
path: root/src/arch
diff options
context:
space:
mode:
Diffstat (limited to 'src/arch')
-rw-r--r--src/arch/arm64/tables.c19
-rw-r--r--src/arch/x86/Kconfig6
2 files changed, 17 insertions, 8 deletions
diff --git a/src/arch/arm64/tables.c b/src/arch/arm64/tables.c
index b97297c1b9..c66612b7f2 100644
--- a/src/arch/arm64/tables.c
+++ b/src/arch/arm64/tables.c
@@ -1,12 +1,27 @@
/* SPDX-License-Identifier: GPL-2.0-only */
-#include <bootmem.h>
-#include <boot/tables.h>
+#include <acpi/acpi.h>
+#include <assert.h>
#include <boot/coreboot_tables.h>
+#include <boot/tables.h>
+#include <bootmem.h>
+#include <cbmem.h>
#include <symbols.h>
+static void write_acpi_table(void)
+{
+ const size_t max_acpi_size = CONFIG_MAX_ACPI_TABLE_SIZE_KB * KiB;
+ const uintptr_t acpi_start = (uintptr_t)cbmem_add(CBMEM_ID_ACPI, max_acpi_size);
+ assert(IS_ALIGNED(acpi_start, 16));
+ const uintptr_t acpi_end = write_acpi_tables(acpi_start);
+ assert(acpi_end < acpi_start + max_acpi_size);
+ printk(BIOS_DEBUG, "ACPI tables: %ld bytes.\n", acpi_end - acpi_start);
+}
+
void arch_write_tables(uintptr_t coreboot_table)
{
+ if (CONFIG(HAVE_ACPI_TABLES))
+ write_acpi_table();
}
void bootmem_arch_add_ranges(void)
diff --git a/src/arch/x86/Kconfig b/src/arch/x86/Kconfig
index ec1171b505..8676fad863 100644
--- a/src/arch/x86/Kconfig
+++ b/src/arch/x86/Kconfig
@@ -298,12 +298,6 @@ config MAX_PIRQ_LINKS
table specifies links greater than 4, pirq_route_irqs will not
function properly, unless this variable is correctly set.
-config MAX_ACPI_TABLE_SIZE_KB
- int
- default 144
- help
- Set the maximum size of all ACPI tables in KiB.
-
config MEMLAYOUT_LD_FILE
string
default "src/arch/x86/memlayout.ld"