1.\" $OpenBSD: memconfig.8,v 1.12 2014/01/20 05:07:48 schwarze Exp $ 2.\" 3.\" Copyright (c) 1999 Chris Costello 4.\" All rights reserved. 5.\" 6.\" Redistribution and use in source and binary forms, with or without 7.\" modification, are permitted provided that the following conditions 8.\" are met: 9.\" 1. Redistributions of source code must retain the above copyright 10.\" notice, this list of conditions and the following disclaimer. 11.\" 2. Redistributions in binary form must reproduce the above copyright 12.\" notice, this list of conditions and the following disclaimer in the 13.\" documentation and/or other materials provided with the distribution. 14.\" 15.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND 16.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 17.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 18.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE 19.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 20.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 21.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 22.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 23.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 24.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 25.\" SUCH DAMAGE. 26.\" 27.\" $FreeBSD: /home/ncvs/src/usr.sbin/memcontrol/memcontrol.8,v 1.9 2002/09/15 15:07:55 dwmalone Exp $ 28.\" 29.Dd $Mdocdate: January 20 2014 $ 30.Dt MEMCONFIG 8 31.Os 32.Sh NAME 33.Nm memconfig 34.Nd control system cache behaviour with respect to memory 35.Sh SYNOPSIS 36.Nm memconfig 37.Ar list 38.Op Fl a 39.Nm memconfig 40.Ar set 41.Fl b Ar base 42.Fl l Ar length 43.Fl o Ar owner 44.Ar attribute 45.Nm memconfig 46.Ar clear 47.Fl o Ar owner 48.Nm memconfig 49.Ar clear 50.Fl b Ar base 51.Fl l Ar length 52.Sh DESCRIPTION 53A number of supported system architectures allow the behaviour of the CPU 54cache to be programmed to behave differently depending on the region being 55written. 56.Pp 57.Nm 58provides an interface to this facility, allowing CPU cache behavior to 59be altered for ranges of system physical memory. 60.Pp 61These ranges are typically power-of-2 aligned and sized, however the specific 62rules governing their layout vary between architectures. 63The 64.Nm 65program does not attempt to enforce these rules, however the system will 66reject any attempt to set an illegal combination. 67.Pp 68The operands and their options are as follows: 69.Bl -tag -width clear 70.It Ar list 71List range slots. 72.Bl -tag -width xxxxxx 73.It Fl a 74List all range slots, even those that are inactive. 75.El 76.It Ar set 77Set memory range attributes. 78.Bl -tag -width xxxxxx 79.It Fl b Ar base 80Memory range base address. 81.It Fl l Ar length 82Length of memory range in bytes, power of 2. 83.It Fl o Ar owner 84Text identifier for this setting (7 char max). 85.It Ar attribute 86Attributes applied to this range; combinations of 87.Ar force , 88.Ar uncacheable , 89.Ar write-combine , 90.Ar write-through , 91.Ar write-back , 92or 93.Ar write-protect . 94.El 95.It Ar clear 96Clear memory range attributes. 97Ranges may be cleared by owner or by base/length combination. 98.Pp 99To clear based on ownership: 100.Bl -tag -width xxxxxx 101.It Fl o Ar owner 102All ranges with this owner will be cleared. 103.El 104.Pp 105To clear based on the base/length combination: 106.Bl -tag -width xxxxxx 107.It Fl b Ar base 108Memory range base address. 109.It Fl l Ar length 110Length of memory range in bytes, power of 2. 111.El 112.Pp 113Base and length must exactly match an existing range. 114.El 115.Sh SEE ALSO 116.Xr mtrr 4 117.Sh HISTORY 118.Nm 119was originally introduced in 120.Fx 3.3 121as 122.Sy memcontrol . 123