From 26a18c674d0a01eac30f383ed6bc4162ce3ffa01 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20=C5=BBygowski?= Date: Wed, 5 Nov 2025 14:13:30 +0100 Subject: [PATCH] acpi: Clear whole FACS table before filling it MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Running FWTS detected a problem with FACS having non-zero values in reserved fields: FAILED [MEDIUM] FACSReservedNonZero: Test 1, FACS Reserved field must be zero, got 0x00fe7bcd instead FAILED [HIGH] FACSReservedBitsNonZero: Test 1, FACS OSPM Flags Bits [31..1] must be zero, got 0xf23bcdd8 instead FAILED [LOW] FACSInvalidReserved1: Test 1, FACS: 2nd Reserved field is non-zero Clear whole FACS table and then start filling the non-zero values to fix the issue. TEST=Run FWTS V25.01.00 on Gigabyte MZ33-AR1 and see no error for FACS test. Change-Id: I2af4caea155e3707e3b7832824e81e6b69f836a5 Signed-off-by: Michał Żygowski Reviewed-on: https://review.coreboot.org/c/coreboot/+/89923 Reviewed-by: Paul Menzel Reviewed-by: Patrick Rudolph Tested-by: build bot (Jenkins) --- src/acpi/acpi.c | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/src/acpi/acpi.c b/src/acpi/acpi.c index 7dad21f12d..b22c4bc2c0 100644 --- a/src/acpi/acpi.c +++ b/src/acpi/acpi.c @@ -936,14 +936,9 @@ static void acpi_create_facs(void *header) { acpi_facs_t *facs = header; + memset(facs, 0, sizeof(acpi_facs_t)); memcpy(facs->signature, "FACS", 4); facs->length = sizeof(acpi_facs_t); - facs->hardware_signature = 0; - facs->firmware_waking_vector = 0; - facs->global_lock = 0; - facs->flags = 0; - facs->x_firmware_waking_vector_l = 0; - facs->x_firmware_waking_vector_h = 0; facs->version = get_acpi_table_revision(FACS); }