From 240baa31e8a804029069e21f523556d8628f6001 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ky=C3=B6sti=20M=C3=A4lkki?= Date: Mon, 17 Apr 2023 15:20:40 +0300 Subject: ACPI: Make FADT entries for RTC/CMOS architectural MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit For AMD, replace name RTC_ALT_CENTURY with RTC_CLK_ALTCENTURY that points to same offset. Since the century field inside RTC falls within the NVRAM space, and could interfere with OPTION_TABLE, it is now guarded with config USE_PC_CMOS_ALTCENTURY. There were no reference for the use of offset 0x48 for century. Change-Id: I965a83dc8daaa02ad0935bdde5ca50110adb014a Signed-off-by: Kyösti Mälkki Reviewed-on: https://review.coreboot.org/c/coreboot/+/74601 Reviewed-by: Elyes Haouas Tested-by: build bot (Jenkins) Reviewed-by: Felix Held --- src/arch/x86/acpi.c | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'src/arch') diff --git a/src/arch/x86/acpi.c b/src/arch/x86/acpi.c index e1ef97884c..ffa3463259 100644 --- a/src/arch/x86/acpi.c +++ b/src/arch/x86/acpi.c @@ -3,6 +3,7 @@ #include #include #include +#include void arch_fill_fadt(acpi_fadt_t *fadt) { @@ -24,4 +25,14 @@ void arch_fill_fadt(acpi_fadt_t *fadt) fadt->acpi_enable = APM_CNT_ACPI_ENABLE; fadt->acpi_disable = APM_CNT_ACPI_DISABLE; } + + if (CONFIG(PC80_SYSTEM)) { + /* Currently these are defined to support date alarm only. */ + fadt->day_alrm = RTC_DATE_ALARM; + fadt->mon_alrm = RTC_MONTH_ALARM; + } + + /* Careful with USE_OPTION_TABLE. */ + if (CONFIG(USE_PC_CMOS_ALTCENTURY)) + fadt->century = RTC_CLK_ALTCENTURY; } -- cgit v1.2.3