1 // SPDX-License-Identifier: GPL-2.0+
3 * Write an ACPI Firmware ACPI Control Structure (FACS) table
5 * Copyright 2021 Google LLC
8 #define LOG_CATEGORY LOGC_ACPI
10 #include <acpi/acpi_table.h>
12 #include <linux/string.h>
14 int acpi_write_facs(struct acpi_ctx *ctx, const struct acpi_writer *entry)
16 struct acpi_facs *facs = ctx->current;
18 memset((void *)facs, '\0', sizeof(struct acpi_facs));
20 memcpy(facs->signature, "FACS", 4);
21 facs->length = sizeof(struct acpi_facs);
22 facs->hardware_signature = 0;
23 facs->firmware_waking_vector = 0;
24 facs->global_lock = 0;
26 facs->x_firmware_waking_vector_l = 0;
27 facs->x_firmware_waking_vector_h = 0;
31 acpi_inc(ctx, sizeof(struct acpi_facs));
35 ACPI_WRITER(1facs, "FACS", acpi_write_facs, 0);