Module Name:    src
Committed By:   jmcneill
Date:           Tue Apr 28 21:35:35 UTC 2020

Modified Files:
        src/sys/arch/amd64/amd64: machdep.c
        src/sys/arch/x86/x86: pmap.c

Log Message:
Detect PAT on the boot processor before cpu0 attaches so the early genfb
attach code can map the framebuffer with write combining.


To generate a diff of this commit:
cvs rdiff -u -r1.348 -r1.349 src/sys/arch/amd64/amd64/machdep.c
cvs rdiff -u -r1.383 -r1.384 src/sys/arch/x86/x86/pmap.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/amd64/amd64/machdep.c
diff -u src/sys/arch/amd64/amd64/machdep.c:1.348 src/sys/arch/amd64/amd64/machdep.c:1.349
--- src/sys/arch/amd64/amd64/machdep.c:1.348	Sat Apr 25 15:26:16 2020
+++ src/sys/arch/amd64/amd64/machdep.c	Tue Apr 28 21:35:35 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: machdep.c,v 1.348 2020/04/25 15:26:16 bouyer Exp $	*/
+/*	$NetBSD: machdep.c,v 1.349 2020/04/28 21:35:35 jmcneill Exp $	*/
 
 /*
  * Copyright (c) 1996, 1997, 1998, 2000, 2006, 2007, 2008, 2011
@@ -110,7 +110,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.348 2020/04/25 15:26:16 bouyer Exp $");
+__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.349 2020/04/28 21:35:35 jmcneill Exp $");
 
 #include "opt_modular.h"
 #include "opt_user_ldt.h"
@@ -1704,6 +1704,8 @@ init_x86_64(paddr_t first_avail)
 	x86_bus_space_init();
 #endif
 
+	pat_init(&cpu_info_primary);
+
 	consinit();	/* XXX SHOULD NOT BE DONE HERE */
 
 	/*

Index: src/sys/arch/x86/x86/pmap.c
diff -u src/sys/arch/x86/x86/pmap.c:1.383 src/sys/arch/x86/x86/pmap.c:1.384
--- src/sys/arch/x86/x86/pmap.c:1.383	Sat Apr 25 15:26:18 2020
+++ src/sys/arch/x86/x86/pmap.c	Tue Apr 28 21:35:35 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: pmap.c,v 1.383 2020/04/25 15:26:18 bouyer Exp $	*/
+/*	$NetBSD: pmap.c,v 1.384 2020/04/28 21:35:35 jmcneill Exp $	*/
 
 /*
  * Copyright (c) 2008, 2010, 2016, 2017, 2019, 2020 The NetBSD Foundation, Inc.
@@ -130,7 +130,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: pmap.c,v 1.383 2020/04/25 15:26:18 bouyer Exp $");
+__KERNEL_RCSID(0, "$NetBSD: pmap.c,v 1.384 2020/04/28 21:35:35 jmcneill Exp $");
 
 #include "opt_user_ldt.h"
 #include "opt_lockdebug.h"
@@ -923,7 +923,6 @@ pat_init(struct cpu_info *ci)
 
 	wrmsr(MSR_CR_PAT, pat);
 	cpu_pat_enabled = true;
-	aprint_debug_dev(ci->ci_dev, "PAT enabled\n");
 }
 
 static pt_entry_t

Reply via email to