Module Name: src
Committed By: maxv
Date: Sat Sep 23 10:38:59 UTC 2017
Modified Files:
src/sys/arch/x86/acpi: acpi_wakeup.c
Log Message:
Initialize the errata MSRs when waking up, otherwise they are clear and
we're re-enabling certain CPU bugs.
To generate a diff of this commit:
cvs rdiff -u -r1.48 -r1.49 src/sys/arch/x86/acpi/acpi_wakeup.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/acpi/acpi_wakeup.c
diff -u src/sys/arch/x86/acpi/acpi_wakeup.c:1.48 src/sys/arch/x86/acpi/acpi_wakeup.c:1.49
--- src/sys/arch/x86/acpi/acpi_wakeup.c:1.48 Sat Sep 23 10:00:00 2017
+++ src/sys/arch/x86/acpi/acpi_wakeup.c Sat Sep 23 10:38:59 2017
@@ -1,4 +1,4 @@
-/* $NetBSD: acpi_wakeup.c,v 1.48 2017/09/23 10:00:00 maxv Exp $ */
+/* $NetBSD: acpi_wakeup.c,v 1.49 2017/09/23 10:38:59 maxv Exp $ */
/*-
* Copyright (c) 2002, 2011 The NetBSD Foundation, Inc.
@@ -59,7 +59,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: acpi_wakeup.c,v 1.48 2017/09/23 10:00:00 maxv Exp $");
+__KERNEL_RCSID(0, "$NetBSD: acpi_wakeup.c,v 1.49 2017/09/23 10:38:59 maxv Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -274,6 +274,7 @@ acpi_cpu_sleep(struct cpu_info *ci)
if (rcr4() & CR4_OSXSAVE)
wrxcr(0, xcr0);
pat_init(ci);
+ x86_errata();
#if NLAPIC > 0
lapic_enable();
lapic_set_lvt();
@@ -346,6 +347,7 @@ acpi_md_sleep(int state)
if (rcr4() & CR4_OSXSAVE)
wrxcr(0, xcr0);
pat_init(&cpu_info_primary);
+ x86_errata();
i8259_reinit();
#if NLAPIC > 0
lapic_enable();