mirror of
https://github.com/AsahiLinux/u-boot
synced 2024-11-10 23:24:38 +00:00
eacb6d0ba2
Move this table over to use a writer function, moving the code from the x86 implementation. Add a pointer to the DSDT in struct acpi_ctx so we can reference it later. Disable this table for sandbox since we don't actually compile real ASL code. Signed-off-by: Simon Glass <sjg@chromium.org>
35 lines
825 B
C
35 lines
825 B
C
// SPDX-License-Identifier: GPL-2.0+
|
|
/*
|
|
* Write an ACPI Firmware ACPI Control Structure (FACS) table
|
|
*
|
|
* Copyright 2021 Google LLC
|
|
*/
|
|
|
|
#define LOG_CATEGORY LOGC_ACPI
|
|
|
|
#include <common.h>
|
|
#include <acpi/acpi_table.h>
|
|
#include <dm/acpi.h>
|
|
|
|
int acpi_write_facs(struct acpi_ctx *ctx, const struct acpi_writer *entry)
|
|
{
|
|
struct acpi_facs *facs = ctx->current;
|
|
|
|
memset((void *)facs, '\0', sizeof(struct acpi_facs));
|
|
|
|
memcpy(facs->signature, "FACS", 4);
|
|
facs->length = sizeof(struct acpi_facs);
|
|
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 = 1;
|
|
|
|
ctx->facs = facs;
|
|
acpi_inc(ctx, sizeof(struct acpi_facs));
|
|
|
|
return 0;
|
|
}
|
|
ACPI_WRITER(1facs, "FACS", acpi_write_facs, 0);
|