Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/arch Detect PAT on the boot processor before cpu0 attach...



details:   https://anonhg.NetBSD.org/src/rev/eaedd5d0056e
branches:  trunk
changeset: 931688:eaedd5d0056e
user:      jmcneill <jmcneill%NetBSD.org@localhost>
date:      Tue Apr 28 21:35:35 2020 +0000

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

diffstat:

 sys/arch/amd64/amd64/machdep.c |  6 ++++--
 sys/arch/x86/x86/pmap.c        |  5 ++---
 2 files changed, 6 insertions(+), 5 deletions(-)

diffs (53 lines):

diff -r 61043555a22c -r eaedd5d0056e sys/arch/amd64/amd64/machdep.c
--- a/sys/arch/amd64/amd64/machdep.c    Tue Apr 28 19:45:58 2020 +0000
+++ b/sys/arch/amd64/amd64/machdep.c    Tue Apr 28 21:35:35 2020 +0000
@@ -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 @@
        x86_bus_space_init();
 #endif
 
+       pat_init(&cpu_info_primary);
+
        consinit();     /* XXX SHOULD NOT BE DONE HERE */
 
        /*
diff -r 61043555a22c -r eaedd5d0056e sys/arch/x86/x86/pmap.c
--- a/sys/arch/x86/x86/pmap.c   Tue Apr 28 19:45:58 2020 +0000
+++ b/sys/arch/x86/x86/pmap.c   Tue Apr 28 21:35:35 2020 +0000
@@ -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 @@
 
        wrmsr(MSR_CR_PAT, pat);
        cpu_pat_enabled = true;
-       aprint_debug_dev(ci->ci_dev, "PAT enabled\n");
 }
 
 static pt_entry_t



Home | Main Index | Thread Index | Old Index