opnsense-src/sys/arm/include
Alan Cox 3153e878dd 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
..
_bus.h Remove errant % in license comment. 2008-02-26 11:45:32 +00:00
_inttypes.h Import FreeBSD/arm kernel bits. 2004-05-14 11:46:45 +00:00
_limits.h Move MINSIGSTKSZ from <machine/signal.h> to <machine/_limits.h> and rename 2005-08-20 16:44:41 +00:00
_stdint.h <stdint.h> should define WINT_M{AX,IN} independent from whether WCHAR_MIN is 2004-05-18 16:04:57 +00:00
_types.h Switch to a 64bit time_t, while it's not a big problem to do so. 2006-05-15 00:17:27 +00:00
armreg.h add IXP465 and generic IXP425 definition 2008-12-23 04:46:13 +00:00
asm.h Define _ARM_ARCH_5E too, so that we know if pld/strd/ldrd are available. 2007-10-13 12:04:10 +00:00
asmacros.h Improve ARM_TP_ADDRESS and RAS area. 2008-02-05 10:22:33 +00:00
atomic.h Fix the userland, RAS, version of atomic_fetchadd_32 : 2009-03-31 23:47:18 +00:00
blockio.h Import FreeBSD/arm kernel bits. 2004-05-14 11:46:45 +00:00
bootconfig.h Remove __P 2007-03-21 03:28:16 +00:00
bootinfo.h Initial support of loader(8) for ARM machines running U-Boot. 2008-10-14 10:11:14 +00:00
bus.h correct bus space unmap prototype 2006-11-19 23:46:50 +00:00
bus_dma.h - Add bounce pages for arm, largely based on the i386 implementation. 2007-01-17 00:53:05 +00:00
clock.h First part of a little cleanup in the calendar/timezone/RTC handling. 2006-10-02 12:59:59 +00:00
cpu.h Clean out sysctl machdep.* related defines. 2006-05-11 17:29:25 +00:00
cpuconf.h __CPU_XSCALE_PXA2XX -> CPU_XSCALE_PXA2X0 2007-11-01 10:01:15 +00:00
cpufunc.h Fix confusing naming of Marvell ARM CPU specific routines. 2009-01-09 10:45:04 +00:00
db_machdep.h Add "add pc, whatever" as a branch instruction, we use it in memcpy(). 2008-08-03 15:35:32 +00:00
disassem.h Start all license statements with /*- 2005-01-05 21:58:49 +00:00
elf.h Add AT_EXECPATH ELF auxinfo entry type. The value's a_ptr is a pointer 2009-03-17 12:50:16 +00:00
endian.h Whitespace nit. 2008-08-23 23:35:08 +00:00
exec.h Use a common multi-inclusion protection, and add such a 2005-02-19 21:16:48 +00:00
fiq.h Start all license statements with /*- 2005-01-05 21:58:49 +00:00
float.h Bring in a version of float.h more correct for softfloat. 2005-03-20 00:34:24 +00:00
floatingpoint.h Import FreeBSD/arm kernel bits. 2004-05-14 11:46:45 +00:00
fp.h Start all license statements with /*- 2005-01-05 21:58:49 +00:00
frame.h Tweak how the MD code calls the fooclock() methods some. Instead of 2005-12-22 22:16:09 +00:00
gdb_machdep.h Add remote GDB bits for arm. 2006-07-14 00:50:51 +00:00
ieee.h Add support for the FPA floating-point format on ARM. The 2008-12-23 22:20:59 +00:00
ieeefp.h Start all license statements with /*- 2005-01-05 21:58:49 +00:00
in_cksum.h MFp4: Forget the asm inlined version of in_cksum_hdr(). It doesn't work if 2006-03-09 23:33:59 +00:00
intr.h Pass the previously returned IRQ back to arm_get_next_irq() so that 2009-06-09 18:18:41 +00:00
katelib.h Start all license statements with /*- 2005-01-05 21:58:49 +00:00
kdb.h Add kdb_cpu_sync_icache(), intended to synchronize instruction 2007-06-09 21:55:17 +00:00
limits.h netchild's mega-patch to isolate compiler dependencies into a central 2005-03-02 21:33:29 +00:00
machdep.h Take the first baby step towards unifying and cleaning up arminit(): 2008-04-03 16:44:50 +00:00
md_var.h Support kernel crash mini dumps on ARM architecture. 2008-11-06 16:20:27 +00:00
memdev.h Remove the unused major/minor numbers from iodev and memdev. 2008-06-25 07:45:31 +00:00
metadata.h Initial support of loader(8) for ARM machines running U-Boot. 2008-10-14 10:11:14 +00:00
minidump.h Support kernel crash mini dumps on ARM architecture. 2008-11-06 16:20:27 +00:00
mutex.h Import FreeBSD/arm kernel bits. 2004-05-14 11:46:45 +00:00
param.h Cleanup ALIGNED_POINTER: 2009-07-05 17:45:48 +00:00
pcb.h Start all license statements with /*- 2005-01-05 21:58:49 +00:00
pcpu.h Remove the unused field "pc_prvspace" from the MD fields for the struct 2008-09-11 20:39:46 +00:00
pmap.h Add support to the virtual memory system for configuring machine- 2009-07-12 23:31:20 +00:00
pmc_mdep.h Add stubs to unbreak LINT. 2007-12-07 13:45:47 +00:00
proc.h To prevent various race conditions in the RAS code, store and restore the 2009-02-12 23:23:30 +00:00
profile.h Use __mcount() instead of _mcount() to reduce diffs with NetBSD. 2007-05-19 16:20:37 +00:00
psl.h Start all license statements with /*- 2005-01-05 21:58:49 +00:00
pte.h Fix the cache mode description. 2007-07-27 14:45:33 +00:00
ptrace.h Import FreeBSD/arm kernel bits. 2004-05-14 11:46:45 +00:00
reg.h Protect the function declarations with #ifdef _KERNEL. 2004-11-04 19:20:54 +00:00
reloc.h Import FreeBSD/arm kernel bits. 2004-05-14 11:46:45 +00:00
resource.h Introduce basic support for Marvell families of system-on-chip ARM devices: 2008-10-13 20:07:13 +00:00
runq.h Start all license statements with /*- 2005-01-05 21:58:49 +00:00
setjmp.h Protect setjmp.h with #ifndef _MACHINE_SETJMP_H_. 2004-07-12 21:23:58 +00:00
sf_buf.h Rewrite ARM_USE_SMALL_ALLOC so that instead of the current behavior, it maps 2006-08-08 20:59:38 +00:00
sigframe.h Import FreeBSD/arm kernel bits. 2004-05-14 11:46:45 +00:00
signal.h Move MINSIGSTKSZ from <machine/signal.h> to <machine/_limits.h> and rename 2005-08-20 16:44:41 +00:00
smp.h Import FreeBSD/arm kernel bits. 2004-05-14 11:46:45 +00:00
stack.h Break out stack(9) from ddb(4): 2007-12-02 20:40:35 +00:00
stdarg.h Use __builtin_va_start instead of __builtin_stdarg_start. GCC4 obsoletes 2006-09-21 01:37:02 +00:00
swi.h Start all license statements with /*- 2005-01-05 21:58:49 +00:00
sysarch.h To prevent various race conditions in the RAS code, store and restore the 2009-02-12 23:23:30 +00:00
trap.h Add support for ptrace() and gdb breakpoints. 2005-01-10 22:43:16 +00:00
ucontext.h Import FreeBSD/arm kernel bits. 2004-05-14 11:46:45 +00:00
undefined.h Remove __P 2007-03-21 03:28:16 +00:00
utrap.h Import FreeBSD/arm kernel bits. 2004-05-14 11:46:45 +00:00
vm.h Add support to the virtual memory system for configuring machine- 2009-07-12 23:31:20 +00:00
vmparam.h Retire VM_PROT_READ_IS_EXEC. It was intended to be a micro-optimization, 2009-04-04 23:12:14 +00:00