1999-09-29 21:43:31 +00:00
|
|
|
.\" Copyright (c) 1999 Chris Costello
|
|
|
|
.\" All rights reserved.
|
2001-07-15 08:06:20 +00:00
|
|
|
.\"
|
1999-09-29 21:43:31 +00:00
|
|
|
.\" Redistribution and use in source and binary forms, with or without
|
|
|
|
.\" modification, are permitted provided that the following conditions
|
|
|
|
.\" are met:
|
|
|
|
.\" 1. Redistributions of source code must retain the above copyright
|
|
|
|
.\" notice, this list of conditions and the following disclaimer.
|
|
|
|
.\" 2. Redistributions in binary form must reproduce the above copyright
|
|
|
|
.\" notice, this list of conditions and the following disclaimer in the
|
|
|
|
.\" documentation and/or other materials provided with the distribution.
|
2001-07-15 08:06:20 +00:00
|
|
|
.\"
|
1999-09-29 21:43:31 +00:00
|
|
|
.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
|
|
|
|
.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
|
|
|
.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
|
|
|
.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
|
|
|
|
.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
|
|
|
.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
|
|
|
|
.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
|
|
|
.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
|
|
|
.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
|
|
|
|
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
|
|
|
.\" SUCH DAMAGE.
|
2001-07-15 08:06:20 +00:00
|
|
|
.\"
|
1999-09-29 21:43:31 +00:00
|
|
|
.\" $FreeBSD$
|
2001-07-15 08:06:20 +00:00
|
|
|
.\"
|
2002-11-27 15:31:08 +00:00
|
|
|
.Dd September 15, 2002
|
1999-09-29 21:43:31 +00:00
|
|
|
.Dt MEMCONTROL 8
|
2001-07-10 15:12:08 +00:00
|
|
|
.Os
|
1999-09-29 21:43:31 +00:00
|
|
|
.Sh NAME
|
|
|
|
.Nm memcontrol
|
2001-04-18 15:54:10 +00:00
|
|
|
.Nd "control system cache behaviour with respect to memory"
|
1999-09-29 21:43:31 +00:00
|
|
|
.Sh SYNOPSIS
|
|
|
|
.Nm
|
2002-11-27 15:31:08 +00:00
|
|
|
.Cm list
|
1999-09-29 21:43:31 +00:00
|
|
|
.Op Fl a
|
|
|
|
.Nm
|
2002-11-27 15:31:08 +00:00
|
|
|
.Cm set
|
1999-09-29 21:43:31 +00:00
|
|
|
.Fl b Ar base
|
|
|
|
.Fl l Ar length
|
|
|
|
.Fl o Ar owner
|
|
|
|
.Ar attribute
|
|
|
|
.Nm
|
2002-11-27 15:31:08 +00:00
|
|
|
.Cm clear
|
1999-09-29 21:43:31 +00:00
|
|
|
.Fl o Ar owner
|
|
|
|
.Nm
|
2002-11-27 15:31:08 +00:00
|
|
|
.Cm clear
|
1999-09-29 21:43:31 +00:00
|
|
|
.Fl b Ar base
|
|
|
|
.Fl l Ar length
|
|
|
|
.Sh DESCRIPTION
|
|
|
|
A number of supported system architectures allow the behaviour of the CPU
|
|
|
|
cache to be programmed to behave differently depending on the region being
|
|
|
|
written.
|
|
|
|
.Pp
|
2002-07-14 14:47:15 +00:00
|
|
|
The
|
|
|
|
.Nm
|
|
|
|
utility
|
1999-09-29 21:43:31 +00:00
|
|
|
provides an interface to this facility, allowing CPU cache behavior to
|
|
|
|
be altered for ranges of system physical memory.
|
|
|
|
.Pp
|
|
|
|
These ranges are typically power-of-2 aligned and sized, however the specific
|
2002-11-27 15:31:08 +00:00
|
|
|
rules governing their layout vary between architectures.
|
|
|
|
The
|
2000-11-20 20:10:44 +00:00
|
|
|
.Nm
|
2002-07-14 14:47:15 +00:00
|
|
|
utility does not attempt to enforce these rules, however the system will
|
1999-09-29 21:43:31 +00:00
|
|
|
reject any attempt to set an illegal combination.
|
2002-11-27 15:31:08 +00:00
|
|
|
.Bl -tag -width ".Cm clear"
|
|
|
|
.It Cm list
|
1999-09-29 21:43:31 +00:00
|
|
|
List range slots.
|
2002-11-27 15:31:08 +00:00
|
|
|
.Bl -tag -width indent
|
|
|
|
.It Fl a
|
|
|
|
List all range slots, even those that are inactive.
|
1999-09-29 21:43:31 +00:00
|
|
|
.El
|
2002-11-27 15:31:08 +00:00
|
|
|
.It Cm set
|
1999-09-29 21:43:31 +00:00
|
|
|
Set memory range attributes.
|
2002-11-27 15:31:08 +00:00
|
|
|
.Bl -tag -width indent
|
1999-09-29 21:43:31 +00:00
|
|
|
.It Fl b Ar base
|
2002-11-27 15:31:08 +00:00
|
|
|
Memory range base address.
|
1999-09-29 21:43:31 +00:00
|
|
|
.It Fl l Ar length
|
2002-11-27 15:31:08 +00:00
|
|
|
Length of memory range in bytes, power of 2.
|
1999-09-29 21:43:31 +00:00
|
|
|
.It Fl o Ar owner
|
2002-11-27 15:31:08 +00:00
|
|
|
Text identifier for this setting (7 char max).
|
1999-09-29 21:43:31 +00:00
|
|
|
.It Ar attribute
|
2002-09-15 15:07:55 +00:00
|
|
|
Attributes applied to this range; combinations of
|
2002-11-27 15:31:08 +00:00
|
|
|
.Cm force , uncacheable , write-combine , write-through , write-back ,
|
|
|
|
and
|
|
|
|
.Cm write-protect .
|
1999-09-29 21:43:31 +00:00
|
|
|
.El
|
2002-11-27 15:31:08 +00:00
|
|
|
.It Cm clear
|
2000-03-01 14:09:25 +00:00
|
|
|
Clear memory range attributes.
|
|
|
|
Ranges may be cleared by owner or by
|
1999-09-29 21:43:31 +00:00
|
|
|
base/length combination.
|
|
|
|
.Pp
|
|
|
|
To clear based on ownership:
|
2002-11-27 15:31:08 +00:00
|
|
|
.Bl -tag -width indent
|
1999-09-29 21:43:31 +00:00
|
|
|
.It Fl o Ar owner
|
2002-11-27 15:31:08 +00:00
|
|
|
All ranges with this owner will be cleared.
|
1999-09-29 21:43:31 +00:00
|
|
|
.El
|
|
|
|
.Pp
|
|
|
|
To clear based on the base/length combination:
|
2002-11-27 15:31:08 +00:00
|
|
|
.Bl -tag -width indent
|
1999-09-29 21:43:31 +00:00
|
|
|
.It Fl b Ar base
|
2002-11-27 15:31:08 +00:00
|
|
|
Memory range base address.
|
1999-09-29 21:43:31 +00:00
|
|
|
.It Fl l Ar length
|
2002-11-27 15:31:08 +00:00
|
|
|
Length of memory range in bytes, power of 2.
|
1999-09-29 21:43:31 +00:00
|
|
|
.El
|
|
|
|
.Pp
|
|
|
|
Base and length must exactly match an existing range.
|
|
|
|
.El
|
|
|
|
.Sh SEE ALSO
|
|
|
|
.Xr mem 4
|