From f5f7962091e453feb2e3f1bfe79dbace5e087c3e Mon Sep 17 00:00:00 2001 From: Maximilian Brune Date: Wed, 23 Oct 2024 15:19:45 +0200 Subject: acpi: x86: Write FADT in common code Write the FADT in common code since it's used on all architectures. Since the FADT is mandatory all SoCs or mainboards must implement the introduced function acpi_fill_fadt() and properly update the FADT. Signed-off-by: Patrick Rudolph Reviewed-by: Simon Glass Cc: Simon Glass Cc: Bin Meng --- arch/sandbox/lib/acpi_table.c | 6 ++++++ 1 file changed, 6 insertions(+) create mode 100644 arch/sandbox/lib/acpi_table.c (limited to 'arch/sandbox/lib/acpi_table.c') diff --git a/arch/sandbox/lib/acpi_table.c b/arch/sandbox/lib/acpi_table.c new file mode 100644 index 00000000000..10b7ce441ae --- /dev/null +++ b/arch/sandbox/lib/acpi_table.c @@ -0,0 +1,6 @@ +// SPDX-License-Identifier: GPL-2.0+ +#include + +void acpi_fill_fadt(struct acpi_fadt *fadt) +{ +} \ No newline at end of file -- cgit v1.2.3 From 4a3fc0f525dabecaf7e84d4d9761b56c5aebf345 Mon Sep 17 00:00:00 2001 From: Patrick Rudolph Date: Wed, 23 Oct 2024 15:19:46 +0200 Subject: acpi: x86: Move MADT to common code Write MADT in common code and let the SoC fill out the body by calling acpi_fill_madt() which must be implemented at SoC level. Signed-off-by: Patrick Rudolph Reviewed-by: Simon Glass Cc: Simon Glass Cc: Bin Meng --- arch/sandbox/lib/acpi_table.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'arch/sandbox/lib/acpi_table.c') diff --git a/arch/sandbox/lib/acpi_table.c b/arch/sandbox/lib/acpi_table.c index 10b7ce441ae..90bb96d1e35 100644 --- a/arch/sandbox/lib/acpi_table.c +++ b/arch/sandbox/lib/acpi_table.c @@ -3,4 +3,9 @@ void acpi_fill_fadt(struct acpi_fadt *fadt) { -} \ No newline at end of file +} + +void *acpi_fill_madt(struct acpi_madt *madt, struct acpi_ctx *ctx) +{ + return ctx->current; +} -- cgit v1.2.3