148b7ea76SChris Costello.\" Copyright (c) 1999 Chris Costello 248b7ea76SChris Costello.\" All rights reserved. 348b7ea76SChris Costello.\" 448b7ea76SChris Costello.\" Redistribution and use in source and binary forms, with or without 548b7ea76SChris Costello.\" modification, are permitted provided that the following conditions 648b7ea76SChris Costello.\" are met: 748b7ea76SChris Costello.\" 1. Redistributions of source code must retain the above copyright 848b7ea76SChris Costello.\" notice, this list of conditions and the following disclaimer. 948b7ea76SChris Costello.\" 2. Redistributions in binary form must reproduce the above copyright 1048b7ea76SChris Costello.\" notice, this list of conditions and the following disclaimer in the 1148b7ea76SChris Costello.\" documentation and/or other materials provided with the distribution. 1248b7ea76SChris Costello.\" 1348b7ea76SChris Costello.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND 1448b7ea76SChris Costello.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 1548b7ea76SChris Costello.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 1648b7ea76SChris Costello.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE 1748b7ea76SChris Costello.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 1848b7ea76SChris Costello.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 1948b7ea76SChris Costello.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 2048b7ea76SChris Costello.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 2148b7ea76SChris Costello.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 2248b7ea76SChris Costello.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 2348b7ea76SChris Costello.\" SUCH DAMAGE. 2448b7ea76SChris Costello.\" 2548b7ea76SChris Costello.\" $FreeBSD$ 2648b7ea76SChris Costello.\" 2748b7ea76SChris Costello.Dd September 28, 1999 2848b7ea76SChris Costello.Dt MEMCONTROL 8 29a4c37c81SRuslan Ermilov.Os 3048b7ea76SChris Costello.Sh NAME 3148b7ea76SChris Costello.Nm memcontrol 32eb083802SRuslan Ermilov.Nd "control system cache behaviour with respect to memory" 3348b7ea76SChris Costello.Sh SYNOPSIS 3448b7ea76SChris Costello.Nm 3548b7ea76SChris Costello.Ar list 3648b7ea76SChris Costello.Op Fl a 3748b7ea76SChris Costello.Pp 3848b7ea76SChris Costello.Nm 3948b7ea76SChris Costello.Ar set 4048b7ea76SChris Costello.Fl b Ar base 4148b7ea76SChris Costello.Fl l Ar length 4248b7ea76SChris Costello.Fl o Ar owner 4348b7ea76SChris Costello.Ar attribute 4448b7ea76SChris Costello.Pp 4548b7ea76SChris Costello.Nm 4648b7ea76SChris Costello.Ar clear 4748b7ea76SChris Costello.Fl o Ar owner 4848b7ea76SChris Costello.Pp 4948b7ea76SChris Costello.Nm 5048b7ea76SChris Costello.Ar clear 5148b7ea76SChris Costello.Fl b Ar base 5248b7ea76SChris Costello.Fl l Ar length 5348b7ea76SChris Costello.Sh DESCRIPTION 5448b7ea76SChris CostelloA number of supported system architectures allow the behaviour of the CPU 5548b7ea76SChris Costellocache to be programmed to behave differently depending on the region being 5648b7ea76SChris Costellowritten. 5748b7ea76SChris Costello.Pp 5848b7ea76SChris Costello.Nm Memcontrol 5948b7ea76SChris Costelloprovides an interface to this facility, allowing CPU cache behavior to 6048b7ea76SChris Costellobe altered for ranges of system physical memory. 6148b7ea76SChris Costello.Pp 6248b7ea76SChris CostelloThese ranges are typically power-of-2 aligned and sized, however the specific 6348b7ea76SChris Costellorules governing their layout vary between architectures. The 64e97407b4SRuslan Ermilov.Nm 6548b7ea76SChris Costelloprogram does not attempt to enforce these rules, however the system will 6648b7ea76SChris Costelloreject any attempt to set an illegal combination. 6748b7ea76SChris Costello.Bl -tag -width clear 6848b7ea76SChris Costello.It Ar list 6948b7ea76SChris CostelloList range slots. 7048b7ea76SChris Costello.Bl -tag -width xxxxxx 7148b7ea76SChris Costello.It Op Fl a 7248b7ea76SChris CostelloList all range slots, even those that are inactive 7348b7ea76SChris Costello.El 7448b7ea76SChris Costello.It Ar set 7548b7ea76SChris CostelloSet memory range attributes. 7648b7ea76SChris Costello.Bl -tag -width xxxxxx 7748b7ea76SChris Costello.It Fl b Ar base 7848b7ea76SChris CostelloMemory range base address 7948b7ea76SChris Costello.It Fl l Ar length 8048b7ea76SChris CostelloLength of memory range in bytes, power of 2 8148b7ea76SChris Costello.It Fl o Ar owner 8248b7ea76SChris CostelloText identifier for this setting (7 char max) 8348b7ea76SChris Costello.It Ar attribute 8448b7ea76SChris CostelloAttributes applied to this range; one of 8548b7ea76SChris Costello.Ar uncacheable , 8648b7ea76SChris Costello.Ar write-combine , 8748b7ea76SChris Costello.Ar write-through , 8848b7ea76SChris Costello.Ar write-back , 8948b7ea76SChris Costello.Ar write-protect 9048b7ea76SChris Costello.El 9148b7ea76SChris Costello.It Ar clear 92f2e366a1SSheldon HearnClear memory range attributes. 93f2e366a1SSheldon HearnRanges may be cleared by owner or by 9448b7ea76SChris Costellobase/length combination. 9548b7ea76SChris Costello.Pp 9648b7ea76SChris CostelloTo clear based on ownership: 9748b7ea76SChris Costello.Bl -tag -width xxxxxx 9848b7ea76SChris Costello.It Fl o Ar owner 9948b7ea76SChris CostelloAll ranges with this owner will be cleared 10048b7ea76SChris Costello.El 10148b7ea76SChris Costello.Pp 10248b7ea76SChris CostelloTo clear based on the base/length combination: 10348b7ea76SChris Costello.Bl -tag -width xxxxxx 10448b7ea76SChris Costello.It Fl b Ar base 10548b7ea76SChris CostelloMemory range base address 10648b7ea76SChris Costello.It Fl l Ar length 10748b7ea76SChris CostelloLength of memory range in bytes, power of 2 10848b7ea76SChris Costello.El 10948b7ea76SChris Costello.Pp 11048b7ea76SChris CostelloBase and length must exactly match an existing range. 11148b7ea76SChris Costello.El 11248b7ea76SChris Costello.Sh SEE ALSO 11348b7ea76SChris Costello.Xr mem 4 114