freebsd-skq/sys/i386/i386
alc ea60573817 Add support to the virtual memory system for configuring machine-
dependent memory attributes:

Rename vm_cache_mode_t to vm_memattr_t.  The new name reflects the
fact that there are machine-dependent memory attributes that have
nothing to do with controlling the cache's behavior.

Introduce vm_object_set_memattr() for setting the default memory
attributes that will be given to an object's pages.

Introduce and use pmap_page_{get,set}_memattr() for getting and
setting a page's machine-dependent memory attributes.  Add full
support for these functions on amd64 and i386 and stubs for them on
the other architectures.  The function pmap_page_set_memattr() is also
responsible for any other machine-dependent aspects of changing a
page's memory attributes, such as flushing the cache or updating the
direct map.  The uses include kmem_alloc_contig(), vm_page_alloc(),
and the device pager:

  kmem_alloc_contig() can now be used to allocate kernel memory with
  non-default memory attributes on amd64 and i386.

  vm_page_alloc() and the device pager will set the memory attributes
  for the real or fictitious page according to the object's default
  memory attributes.

Update the various pmap functions on amd64 and i386 that map pages to
incorporate each page's memory attributes in the mapping.

Notes: (1) Inherent to this design are safety features that prevent
the specification of inconsistent memory attributes by different
mappings on amd64 and i386.  In addition, the device pager provides a
warning when a device driver creates a fictitious page with memory
attributes that are inconsistent with the real page that the
fictitious page is an alias for. (2) Storing the machine-dependent
memory attributes for amd64 and i386 as a dedicated "int" in "struct
md_page" represents a compromise between space efficiency and the ease
of MFCing these changes to RELENG_7.

In collaboration with: jhb

Approved by:	re (kib)
2009-07-12 23:31:20 +00:00
..
apic_vector.s don't globally define ipi_bitmap_handler on xen 2008-10-21 08:01:19 +00:00
atomic.c
autoconf.c
bios.c MFp4: 2008-11-02 18:48:54 +00:00
bioscall.s
bpf_jit_machdep.c Move empty filter handling to MI source. 2008-08-26 21:06:31 +00:00
bpf_jit_machdep.h Fix a typo in copyrights. 2008-08-25 20:43:13 +00:00
busdma_machdep.c Reduce the number of bounce zones (and thus the number of bounce pages 2009-04-23 20:24:19 +00:00
db_disasm.c Decode some more "exotic" instructions including: fxsave, fxrstor, ldmxcsr, 2008-08-11 20:19:42 +00:00
db_interface.c
db_trace.c Frames created by the Xcpustop, Xrendezvous, Xipi_intr_bitmap_handler 2008-09-27 15:54:04 +00:00
dump_machdep.c Place hostnames and similar information fully under the prison system. 2009-05-29 21:27:12 +00:00
elan-mmcr.c Despite several examples in the kernel, the third argument of 2007-06-04 18:25:08 +00:00
elf_machdep.c Implement a facility for dynamic per-cpu variables. 2009-06-23 22:42:39 +00:00
exception.s - Bug fix: prevent a thread from migrating between CPUs between the 2008-12-13 13:07:12 +00:00
gdb_machdep.c
genassym.c Remove the old kernel RPC implementation and the NFS_LEGACYRPC option. 2009-06-30 19:03:27 +00:00
geode.c Add support for PC Engines ALIX boards. 2008-02-10 19:14:42 +00:00
i686_mem.c Initial suspend/resume support for amd64. 2009-03-17 00:48:11 +00:00
identcpu.c Unlock the largest standard CPUID on Intel CPUs for both amd64 and i386 and 2009-05-04 18:05:27 +00:00
in_cksum.c Trim comments about the MP-safety of various bits of the amd64/i386 2009-03-09 13:11:16 +00:00
initcpu.c Add basic i386 support for VIA Nano processors. 2009-01-12 22:01:49 +00:00
intr_machdep.c Improve the handling of cpuset with interrupts. 2009-07-01 17:20:07 +00:00
io_apic.c After the per-CPU IDT changes, the IDT vector of an interrupt could change 2009-07-06 18:23:00 +00:00
io.c Sweep kernel replacing suser(9) calls with priv(9) calls, assigning 2006-11-06 13:42:10 +00:00
k6_mem.c Initial suspend/resume support for amd64. 2009-03-17 00:48:11 +00:00
legacy.c Rework how the nexus(4) device works on x86 to better handle the idea of 2008-03-13 20:39:04 +00:00
local_apic.c Improve the handling of cpuset with interrupts. 2009-07-01 17:20:07 +00:00
locore.s Change some movl's to mov's. Newer GAS no longer accept 'movl' instructions 2009-01-31 11:37:21 +00:00
longrun.c Introduce cpu_vendor_id and replace a lot of strcmp(cpu_vendor, "..."). 2008-11-26 19:25:13 +00:00
machdep.c Implement a facility for dynamic per-cpu variables. 2009-06-23 22:42:39 +00:00
mca.c Don't bother reading the initial value of the machine check banks during 2009-05-20 16:11:22 +00:00
mem.c Replace all calls to minor() with dev2unit(). 2008-09-27 08:51:18 +00:00
minidump_machdep.c Place hostnames and similar information fully under the prison system. 2009-05-29 21:27:12 +00:00
mp_clock.c Despite several examples in the kernel, the third argument of 2007-06-04 18:25:08 +00:00
mp_machdep.c Implement a facility for dynamic per-cpu variables. 2009-06-23 22:42:39 +00:00
mp_watchdog.c Add a new 'why' argument to kdb_enter(), and a set of constants to use 2007-12-25 17:52:02 +00:00
mpboot.s
mptable_pci.c Revamp the MSI/MSI-X code a bit to achieve two main goals: 2007-05-02 17:50:36 +00:00
mptable.c In keeping with style(9)'s recommendations on macros, use a ';' 2008-03-16 10:58:09 +00:00
msi.c After the per-CPU IDT changes, the IDT vector of an interrupt could change 2009-07-06 18:23:00 +00:00
nexus.c Implement a BUS_BIND_INTR() method in the bus interface to bind an IRQ 2008-03-20 21:24:32 +00:00
perfmon.c
pmap.c Add support to the virtual memory system for configuring machine- 2009-07-12 23:31:20 +00:00
ptrace_machdep.c
stack_machdep.c Remove duplicate $FreeBSD$ tag. 2007-12-02 21:07:49 +00:00
support.s Integrate support for xen in to i386 common code. 2008-08-15 20:51:31 +00:00
swtch.s Change some movl's to mov's. Newer GAS no longer accept 'movl' instructions 2009-01-31 11:37:21 +00:00
symbols.raw
sys_machdep.c Replace AUDIT_ARG() with variable argument macros with a set more more 2009-06-27 13:58:44 +00:00
trap.c Implement simple machine check support for amd64 and i386. 2009-05-13 17:53:04 +00:00
tsc.c Fix 'kern.timeconter.invariant_tsc' tunable and back out a redundant hack. 2008-10-21 04:31:07 +00:00
uio_machdep.c
vm86.c Change the functions to ANSI in those cases where it breaks promotion 2009-02-24 18:09:31 +00:00
vm86bios.s Evidently FreeBSD has long relied on the compiler to treat structures 2006-12-17 05:07:01 +00:00
vm_machdep.c Eliminate the recomputation of pcb_cr3 from cpu_set_upcall(). The 2009-03-22 02:33:48 +00:00