Module Name: src
Committed By: martin
Date: Fri Jan 13 19:05:26 UTC 2023
Modified Files:
src/sys/arch/x86/isa [netbsd-10]: rtc.c
Log Message:
Pull up following revision(s) (requested by jakllsch in ticket #46):
sys/arch/x86/isa/rtc.c: revision 1.2
Honor ACPI FADT Century byte; should fix many "unknown CMOS layout" messages.
To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.1.102.1 src/sys/arch/x86/isa/rtc.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/sys/arch/x86/isa/rtc.c
diff -u src/sys/arch/x86/isa/rtc.c:1.1 src/sys/arch/x86/isa/rtc.c:1.1.102.1
--- src/sys/arch/x86/isa/rtc.c:1.1 Tue Jun 16 21:05:34 2009
+++ src/sys/arch/x86/isa/rtc.c Fri Jan 13 19:05:25 2023
@@ -1,4 +1,4 @@
-/* $NetBSD: rtc.c,v 1.1 2009/06/16 21:05:34 bouyer Exp $ */
+/* $NetBSD: rtc.c,v 1.1.102.1 2023/01/13 19:05:25 martin Exp $ */
/*-
* Copyright (c) 1990 The Regents of the University of California.
@@ -121,7 +121,7 @@ WITH THE USE OR PERFORMANCE OF THIS SOFT
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: rtc.c,v 1.1 2009/06/16 21:05:34 bouyer Exp $");
+__KERNEL_RCSID(0, "$NetBSD: rtc.c,v 1.1.102.1 2023/01/13 19:05:25 martin Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -145,6 +145,11 @@ __KERNEL_RCSID(0, "$NetBSD: rtc.c,v 1.1
#include <machine/mca_machdep.h> /* for MCA_system */
#endif
+#include "acpica.h"
+#if NACPICA > 0
+#include <dev/acpi/acpivar.h>
+#endif
+
static void rtcinit(void);
static int rtcget(mc_todregs *);
static void rtcput(mc_todregs *);
@@ -269,6 +274,12 @@ clock_expandyear(int clockyear)
return (clockyear);
s = splclock();
+#if NACPICA > 0
+ if (acpi_active)
+ cmoscentury = mc146818_read(NULL,
+ (centb = AcpiGbl_FADT.Century));
+ else
+#endif
if (cmoscheck())
cmoscentury = mc146818_read(NULL, NVRAM_CENTURY);
#if NMCA > 0