diff options
Diffstat (limited to 'src/arch')
-rw-r--r-- | src/arch/x86/Makefile.inc | 1 | ||||
-rw-r--r-- | src/arch/x86/acpi.c | 20 |
2 files changed, 21 insertions, 0 deletions
diff --git a/src/arch/x86/Makefile.inc b/src/arch/x86/Makefile.inc index 61e7edcfb9..00690ba02e 100644 --- a/src/arch/x86/Makefile.inc +++ b/src/arch/x86/Makefile.inc @@ -235,6 +235,7 @@ $(CONFIG_CBFS_PREFIX)/postcar-compression := none ifeq ($(CONFIG_ARCH_RAMSTAGE_X86_32)$(CONFIG_ARCH_RAMSTAGE_X86_64),y) +ramstage-y += acpi.c ramstage-$(CONFIG_HAVE_ACPI_RESUME) += acpi_s3.c ramstage-$(CONFIG_ACPI_BERT) += acpi_bert_storage.c ramstage-y += boot.c diff --git a/src/arch/x86/acpi.c b/src/arch/x86/acpi.c new file mode 100644 index 0000000000..0ff0ded9bf --- /dev/null +++ b/src/arch/x86/acpi.c @@ -0,0 +1,20 @@ +/* SPDX-License-Identifier: GPL-2.0-only */ + +#include <acpi/acpi.h> +#include <cf9_reset.h> + +void arch_fill_fadt(acpi_fadt_t *fadt) +{ + if (CONFIG(HAVE_CF9_RESET)) { + fadt->reset_reg.space_id = ACPI_ADDRESS_SPACE_IO; + fadt->reset_reg.bit_width = 8; + fadt->reset_reg.bit_offset = 0; + fadt->reset_reg.access_size = ACPI_ACCESS_SIZE_BYTE_ACCESS; + fadt->reset_reg.addrl = RST_CNT; + fadt->reset_reg.addrh = 0; + + fadt->reset_value = RST_CPU | SYS_RST; + + fadt->flags |= ACPI_FADT_RESET_REGISTER; + } +} |