]> git.ipfire.org Git - thirdparty/man-pages.git/blame - man4/mem.4
dsp56k.4: ffix
[thirdparty/man-pages.git] / man4 / mem.4
CommitLineData
3d54a910
MK
1.\" Copyright (c) 1993 Michael Haardt (michael@moria.de),
2.\" Fri Apr 2 11:32:09 MET DST 1993
fea681da 3.\"
1dd72f9c 4.\" %%%LICENSE_START(GPLv2+_DOC_FULL)
fea681da
MK
5.\" This is free documentation; you can redistribute it and/or
6.\" modify it under the terms of the GNU General Public License as
7.\" published by the Free Software Foundation; either version 2 of
8.\" the License, or (at your option) any later version.
9.\"
10.\" The GNU General Public License's references to "object code"
11.\" and "executables" are to be interpreted as the output of any
12.\" document formatting or typesetting system, including
13.\" intermediate and printed output.
14.\"
15.\" This manual is distributed in the hope that it will be useful,
16.\" but WITHOUT ANY WARRANTY; without even the implied warranty of
17.\" MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18.\" GNU General Public License for more details.
19.\"
20.\" You should have received a copy of the GNU General Public
c715f741
MK
21.\" License along with this manual; if not, see
22.\" <http://www.gnu.org/licenses/>.
6a8d8745 23.\" %%%LICENSE_END
fea681da
MK
24.\"
25.\" Modified Sat Jul 24 16:59:10 1993 by Rik Faith (faith@cs.unc.edu)
639dfde8 26.TH MEM 4 2015-01-02 "Linux" "Linux Programmer's Manual"
fea681da
MK
27.SH NAME
28mem, kmem, port \- system memory, kernel memory and system ports
29.SH DESCRIPTION
2174e8e3 30.IR /dev/mem
35cfd378 31is a character device file
c13182ef
MK
32that is an image of the main memory of the computer.
33It may be used, for example, to examine (and even patch) the system.
dd3568a1 34.PP
c13182ef 35Byte addresses in
2174e8e3 36.IR /dev/mem
e8046fd0 37are interpreted as physical memory addresses.
c382a365 38References to nonexistent locations cause errors to be returned.
dd3568a1 39.PP
fea681da
MK
40Examining and patching is likely to lead to unexpected results
41when read-only or write-only bits are present.
dd3568a1 42.PP
2174e8e3 43Since Linux 2.6.26, and depending on the architecture, the
639dfde8
EDB
44.B CONFIG_STRICT_DEVMEM
45kernel configuration option limits the areas
46which can be accessed through this file.
47For example: on x86, RAM access is not allowed but accessing
48memory-mapped PCI regions is.
dd3568a1 49.PP
fea681da 50It is typically created by:
bdd915e2
MK
51.PP
52.in +4n
53.EX
4d9b6984 54mknod \-m 660 /dev/mem c 1 1
9df0bd1d 55chown root:kmem /dev/mem
bdd915e2
MK
56.EE
57.in
58.PP
c13182ef 59The file
2174e8e3 60.IR /dev/kmem
c13182ef 61is the same as
2174e8e3 62.IR /dev/mem ,
e8046fd0 63except that the kernel virtual memory
fea681da 64rather than physical memory is accessed.
2174e8e3 65Since Linux 2.6.26, this file is available only if the
0d9096a7
EDB
66.B CONFIG_DEVKMEM
67kernel configuration option is enabled.
dd3568a1 68.PP
fea681da 69It is typically created by:
bdd915e2
MK
70.PP
71.in +4n
72.EX
4d9b6984 73mknod \-m 640 /dev/kmem c 1 2
9df0bd1d 74chown root:kmem /dev/kmem
bdd915e2
MK
75.EE
76.in
77.PP
2174e8e3 78.IR /dev/port
35cfd378 79is similar to
2174e8e3 80.IR /dev/mem ,
a28e26a1 81but the I/O ports are accessed.
dd3568a1 82.PP
fea681da 83It is typically created by:
bdd915e2
MK
84.PP
85.in +4n
86.EX
4d9b6984 87mknod \-m 660 /dev/port c 1 4
463f35e1 88chown root:kmem /dev/port
bdd915e2
MK
89.EE
90.in
fea681da
MK
91.SH FILES
92.I /dev/mem
93.br
94.I /dev/kmem
95.br
96.I /dev/port
47297adb 97.SH SEE ALSO
fea681da
MK
98.BR chown (1),
99.BR mknod (1),
100.BR ioperm (2)