Changeset View
Changeset View
Standalone View
Standalone View
head/sys/i386/i386/pmap.c
Show First 20 Lines • Show All 95 Lines • ▼ Show 20 Lines | |||||
* and to when physical maps must be made correct. | * and to when physical maps must be made correct. | ||||
*/ | */ | ||||
#include "opt_apic.h" | #include "opt_apic.h" | ||||
#include "opt_cpu.h" | #include "opt_cpu.h" | ||||
#include "opt_pmap.h" | #include "opt_pmap.h" | ||||
#include "opt_smp.h" | #include "opt_smp.h" | ||||
#include "opt_vm.h" | #include "opt_vm.h" | ||||
#include "opt_xbox.h" | |||||
#include <sys/param.h> | #include <sys/param.h> | ||||
#include <sys/systm.h> | #include <sys/systm.h> | ||||
#include <sys/kernel.h> | #include <sys/kernel.h> | ||||
#include <sys/ktr.h> | #include <sys/ktr.h> | ||||
#include <sys/lock.h> | #include <sys/lock.h> | ||||
#include <sys/malloc.h> | #include <sys/malloc.h> | ||||
#include <sys/mman.h> | #include <sys/mman.h> | ||||
Show All 31 Lines | |||||
#include <machine/cputypes.h> | #include <machine/cputypes.h> | ||||
#include <machine/md_var.h> | #include <machine/md_var.h> | ||||
#include <machine/pcb.h> | #include <machine/pcb.h> | ||||
#include <machine/specialreg.h> | #include <machine/specialreg.h> | ||||
#ifdef SMP | #ifdef SMP | ||||
#include <machine/smp.h> | #include <machine/smp.h> | ||||
#endif | #endif | ||||
#ifdef XBOX | |||||
#include <machine/xbox.h> | |||||
#endif | |||||
#ifndef PMAP_SHPGPERPROC | #ifndef PMAP_SHPGPERPROC | ||||
#define PMAP_SHPGPERPROC 200 | #define PMAP_SHPGPERPROC 200 | ||||
#endif | #endif | ||||
#if !defined(DIAGNOSTIC) | #if !defined(DIAGNOSTIC) | ||||
#ifdef __GNUC_GNU_INLINE__ | #ifdef __GNUC_GNU_INLINE__ | ||||
#define PMAP_INLINE __attribute__((__gnu_inline__)) inline | #define PMAP_INLINE __attribute__((__gnu_inline__)) inline | ||||
#else | #else | ||||
▲ Show 20 Lines • Show All 332 Lines • ▼ Show 20 Lines | #define SYSMAP(c, p, v, n) \ | ||||
virtual_avail = va; | virtual_avail = va; | ||||
/* | /* | ||||
* Leave in place an identity mapping (virt == phys) for the low 1 MB | * Leave in place an identity mapping (virt == phys) for the low 1 MB | ||||
* physical memory region that is used by the ACPI wakeup code. This | * physical memory region that is used by the ACPI wakeup code. This | ||||
* mapping must not have PG_G set. | * mapping must not have PG_G set. | ||||
*/ | */ | ||||
#ifdef XBOX | |||||
/* FIXME: This is gross, but needed for the XBOX. Since we are in such | |||||
* an early stadium, we cannot yet neatly map video memory ... :-( | |||||
* Better fixes are very welcome! */ | |||||
if (!arch_i386_is_xbox) | |||||
#endif | |||||
for (i = 1; i < NKPT; i++) | for (i = 1; i < NKPT; i++) | ||||
PTD[i] = 0; | PTD[i] = 0; | ||||
/* | /* | ||||
* Initialize the PAT MSR if present. | * Initialize the PAT MSR if present. | ||||
* pmap_init_pat() clears and sets CR4_PGE, which, as a | * pmap_init_pat() clears and sets CR4_PGE, which, as a | ||||
* side-effect, invalidates stale PG_G TLB entries that might | * side-effect, invalidates stale PG_G TLB entries that might | ||||
* have been created in our pre-boot environment. We assume | * have been created in our pre-boot environment. We assume | ||||
▲ Show 20 Lines • Show All 5,172 Lines • Show Last 20 Lines |