Turn the 'i386_use_pae' variable into simply 'use_pae'. Technically
speaking we are also running with PAE enabled in long mode under amd64, so this variable will be used in various places across x86 machdep to branch at runtime to functions that require extra handling for PAE mode.
This commit is contained in:
parent
8e6899dea3
commit
56027687e2
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: machdep.c,v 1.169 2011/11/06 15:51:09 cherry Exp $ */
|
||||
/* $NetBSD: machdep.c,v 1.170 2011/11/10 00:12:04 jym Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1996, 1997, 1998, 2000, 2006, 2007, 2008, 2011
|
||||
|
@ -111,7 +111,7 @@
|
|||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.169 2011/11/06 15:51:09 cherry Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.170 2011/11/10 00:12:04 jym Exp $");
|
||||
|
||||
/* #define XENDEBUG_LOW */
|
||||
|
||||
|
@ -242,7 +242,7 @@ int physmem;
|
|||
uint64_t dumpmem_low;
|
||||
uint64_t dumpmem_high;
|
||||
int cpu_class;
|
||||
|
||||
int use_pae;
|
||||
|
||||
#ifndef NO_SPARSE_DUMP
|
||||
int sparse_dump = 0;
|
||||
|
@ -568,10 +568,10 @@ SYSCTL_SETUP(sysctl_machdep_setup, "sysctl machdep subtree setup")
|
|||
NULL, 0, &tsc_freq, 0,
|
||||
CTL_MACHDEP, CTL_CREATE, CTL_EOL);
|
||||
sysctl_createv(clog, 0, NULL, NULL,
|
||||
CTLFLAG_PERMANENT | CTLFLAG_IMMEDIATE,
|
||||
CTLFLAG_PERMANENT,
|
||||
CTLTYPE_INT, "pae",
|
||||
SYSCTL_DESCR("Whether the kernel uses PAE"),
|
||||
NULL, 1, NULL, 0,
|
||||
NULL, 0, &use_pae, 0,
|
||||
CTL_MACHDEP, CTL_CREATE, CTL_EOL);
|
||||
#ifndef NO_SPARSE_DUMP
|
||||
/* XXXjld Does this really belong under machdep, and not e.g. kern? */
|
||||
|
@ -1646,6 +1646,8 @@ init_x86_64(paddr_t first_avail)
|
|||
|
||||
pcb = lwp_getpcb(&lwp0);
|
||||
|
||||
use_pae = 1; /* PAE always enabled in long mode */
|
||||
|
||||
#ifdef XEN
|
||||
pcb->pcb_cr3 = xen_start_info.pt_base - KERNBASE;
|
||||
__PRINTK(("pcb_cr3 0x%lx\n", xen_start_info.pt_base - KERNBASE));
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: machdep.c,v 1.711 2011/11/06 15:35:29 cherry Exp $ */
|
||||
/* $NetBSD: machdep.c,v 1.712 2011/11/10 00:12:04 jym Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1996, 1997, 1998, 2000, 2004, 2006, 2008, 2009
|
||||
|
@ -67,7 +67,7 @@
|
|||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.711 2011/11/06 15:35:29 cherry Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.712 2011/11/10 00:12:04 jym Exp $");
|
||||
|
||||
#include "opt_beep.h"
|
||||
#include "opt_compat_ibcs2.h"
|
||||
|
@ -246,12 +246,12 @@ struct mtrr_funcs *mtrr_funcs;
|
|||
int physmem;
|
||||
|
||||
int cpu_class;
|
||||
int use_pae;
|
||||
int i386_fpu_present;
|
||||
int i386_fpu_exception;
|
||||
int i386_fpu_fdivbug;
|
||||
|
||||
int i386_use_fxsave;
|
||||
int i386_use_pae = 0;
|
||||
int i386_has_sse;
|
||||
int i386_has_sse2;
|
||||
|
||||
|
@ -713,7 +713,7 @@ SYSCTL_SETUP(sysctl_machdep_setup, "sysctl machdep subtree setup")
|
|||
CTLFLAG_PERMANENT,
|
||||
CTLTYPE_INT, "pae",
|
||||
SYSCTL_DESCR("Whether the kernel uses PAE"),
|
||||
NULL, 0, &i386_use_pae, 0,
|
||||
NULL, 0, &use_pae, 0,
|
||||
CTL_MACHDEP, CTL_CREATE, CTL_EOL);
|
||||
}
|
||||
|
||||
|
@ -1348,7 +1348,9 @@ init386(paddr_t first_avail)
|
|||
cpu_init_msrs(&cpu_info_primary, true);
|
||||
|
||||
#ifdef PAE
|
||||
i386_use_pae = 1;
|
||||
use_pae = 1;
|
||||
#else
|
||||
use_pae = 0;
|
||||
#endif
|
||||
|
||||
#ifdef XEN
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: cpu.h,v 1.41 2011/11/06 15:18:18 cherry Exp $ */
|
||||
/* $NetBSD: cpu.h,v 1.42 2011/11/10 00:12:05 jym Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1990 The Regents of the University of California.
|
||||
|
@ -362,9 +362,9 @@ extern int cpu;
|
|||
extern int cpuid_level;
|
||||
extern int cpu_class;
|
||||
extern char cpu_brand_string[];
|
||||
extern int use_pae;
|
||||
|
||||
extern int i386_use_fxsave;
|
||||
extern int i386_use_pae;
|
||||
extern int i386_has_sse;
|
||||
extern int i386_has_sse2;
|
||||
|
||||
|
|
Loading…
Reference in New Issue