1*86d7f5d3SJohn Marino.\" Copyright (c) 1999 Chris Costello 2*86d7f5d3SJohn Marino.\" All rights reserved. 3*86d7f5d3SJohn Marino.\" 4*86d7f5d3SJohn Marino.\" Redistribution and use in source and binary forms, with or without 5*86d7f5d3SJohn Marino.\" modification, are permitted provided that the following conditions 6*86d7f5d3SJohn Marino.\" are met: 7*86d7f5d3SJohn Marino.\" 1. Redistributions of source code must retain the above copyright 8*86d7f5d3SJohn Marino.\" notice, this list of conditions and the following disclaimer. 9*86d7f5d3SJohn Marino.\" 2. Redistributions in binary form must reproduce the above copyright 10*86d7f5d3SJohn Marino.\" notice, this list of conditions and the following disclaimer in the 11*86d7f5d3SJohn Marino.\" documentation and/or other materials provided with the distribution. 12*86d7f5d3SJohn Marino.\" 13*86d7f5d3SJohn Marino.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND 14*86d7f5d3SJohn Marino.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 15*86d7f5d3SJohn Marino.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 16*86d7f5d3SJohn Marino.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE 17*86d7f5d3SJohn Marino.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 18*86d7f5d3SJohn Marino.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 19*86d7f5d3SJohn Marino.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 20*86d7f5d3SJohn Marino.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 21*86d7f5d3SJohn Marino.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 22*86d7f5d3SJohn Marino.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 23*86d7f5d3SJohn Marino.\" SUCH DAMAGE. 24*86d7f5d3SJohn Marino.\" 25*86d7f5d3SJohn Marino.\" $FreeBSD: src/usr.sbin/memcontrol/memcontrol.8,v 1.3.2.5 2003/03/12 22:08:15 trhodes Exp $ 26*86d7f5d3SJohn Marino.\" $DragonFly: src/usr.sbin/memcontrol/memcontrol.8,v 1.2 2003/06/17 04:29:57 dillon Exp $ 27*86d7f5d3SJohn Marino.\" 28*86d7f5d3SJohn Marino.Dd September 28, 1999 29*86d7f5d3SJohn Marino.Dt MEMCONTROL 8 30*86d7f5d3SJohn Marino.Os 31*86d7f5d3SJohn Marino.Sh NAME 32*86d7f5d3SJohn Marino.Nm memcontrol 33*86d7f5d3SJohn Marino.Nd "control system cache behaviour with respect to memory" 34*86d7f5d3SJohn Marino.Sh SYNOPSIS 35*86d7f5d3SJohn Marino.Nm 36*86d7f5d3SJohn Marino.Cm list 37*86d7f5d3SJohn Marino.Op Fl a 38*86d7f5d3SJohn Marino.Nm 39*86d7f5d3SJohn Marino.Cm set 40*86d7f5d3SJohn Marino.Fl b Ar base 41*86d7f5d3SJohn Marino.Fl l Ar length 42*86d7f5d3SJohn Marino.Fl o Ar owner 43*86d7f5d3SJohn Marino.Ar attribute 44*86d7f5d3SJohn Marino.Nm 45*86d7f5d3SJohn Marino.Cm clear 46*86d7f5d3SJohn Marino.Fl o Ar owner 47*86d7f5d3SJohn Marino.Nm 48*86d7f5d3SJohn Marino.Cm clear 49*86d7f5d3SJohn Marino.Fl b Ar base 50*86d7f5d3SJohn Marino.Fl l Ar length 51*86d7f5d3SJohn Marino.Sh DESCRIPTION 52*86d7f5d3SJohn MarinoA number of supported system architectures allow the behaviour of the CPU 53*86d7f5d3SJohn Marinocache to be programmed to behave differently depending on the region being 54*86d7f5d3SJohn Marinowritten. 55*86d7f5d3SJohn Marino.Pp 56*86d7f5d3SJohn MarinoThe 57*86d7f5d3SJohn Marino.Nm 58*86d7f5d3SJohn Marinoutility 59*86d7f5d3SJohn Marinoprovides an interface to this facility, allowing CPU cache behavior to 60*86d7f5d3SJohn Marinobe altered for ranges of system physical memory. 61*86d7f5d3SJohn Marino.Pp 62*86d7f5d3SJohn MarinoThese ranges are typically power-of-2 aligned and sized, however the specific 63*86d7f5d3SJohn Marinorules governing their layout vary between architectures. 64*86d7f5d3SJohn MarinoThe 65*86d7f5d3SJohn Marino.Nm 66*86d7f5d3SJohn Marinoutility does not attempt to enforce these rules, however the system will 67*86d7f5d3SJohn Marinoreject any attempt to set an illegal combination. 68*86d7f5d3SJohn Marino.Bl -tag -width ".Cm clear" 69*86d7f5d3SJohn Marino.It Cm list 70*86d7f5d3SJohn MarinoList range slots. 71*86d7f5d3SJohn Marino.Bl -tag -width indent 72*86d7f5d3SJohn Marino.It Fl a 73*86d7f5d3SJohn MarinoList all range slots, even those that are inactive. 74*86d7f5d3SJohn Marino.El 75*86d7f5d3SJohn Marino.It Cm set 76*86d7f5d3SJohn MarinoSet memory range attributes. 77*86d7f5d3SJohn Marino.Bl -tag -width indent 78*86d7f5d3SJohn Marino.It Fl b Ar base 79*86d7f5d3SJohn MarinoMemory range base address. 80*86d7f5d3SJohn Marino.It Fl l Ar length 81*86d7f5d3SJohn MarinoLength of memory range in bytes, power of 2. 82*86d7f5d3SJohn Marino.It Fl o Ar owner 83*86d7f5d3SJohn MarinoText identifier for this setting (7 char max). 84*86d7f5d3SJohn Marino.It Ar attribute 85*86d7f5d3SJohn MarinoAttributes applied to this range; combinations of 86*86d7f5d3SJohn Marino.Cm force , uncacheable , write-combine , write-through , write-back , 87*86d7f5d3SJohn Marinoand 88*86d7f5d3SJohn Marino.Cm write-protect . 89*86d7f5d3SJohn Marino.El 90*86d7f5d3SJohn Marino.It Cm clear 91*86d7f5d3SJohn MarinoClear memory range attributes. 92*86d7f5d3SJohn MarinoRanges may be cleared by owner or by 93*86d7f5d3SJohn Marinobase/length combination. 94*86d7f5d3SJohn Marino.Pp 95*86d7f5d3SJohn MarinoTo clear based on ownership: 96*86d7f5d3SJohn Marino.Bl -tag -width indent 97*86d7f5d3SJohn Marino.It Fl o Ar owner 98*86d7f5d3SJohn MarinoAll ranges with this owner will be cleared. 99*86d7f5d3SJohn Marino.El 100*86d7f5d3SJohn Marino.Pp 101*86d7f5d3SJohn MarinoTo clear based on the base/length combination: 102*86d7f5d3SJohn Marino.Bl -tag -width indent 103*86d7f5d3SJohn Marino.It Fl b Ar base 104*86d7f5d3SJohn MarinoMemory range base address. 105*86d7f5d3SJohn Marino.It Fl l Ar length 106*86d7f5d3SJohn MarinoLength of memory range in bytes, power of 2. 107*86d7f5d3SJohn Marino.El 108*86d7f5d3SJohn Marino.Pp 109*86d7f5d3SJohn MarinoBase and length must exactly match an existing range. 110*86d7f5d3SJohn Marino.El 111*86d7f5d3SJohn Marino.Sh SEE ALSO 112*86d7f5d3SJohn Marino.Xr mem 4 113