]> git.ipfire.org Git - thirdparty/man-pages.git/blame - man4/mem.4
dl_iterate_phdr.3: 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.
fea681da 34.LP
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.
fea681da
MK
39.LP
40Examining and patching is likely to lead to unexpected results
41when read-only or write-only bits are present.
42.LP
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.
49.LP
fea681da
MK
50It is typically created by:
51.RS
52.sp
4d9b6984 53mknod \-m 660 /dev/mem c 1 1
fea681da 54.br
9df0bd1d 55chown root:kmem /dev/mem
fea681da
MK
56.RE
57.LP
c13182ef 58The file
2174e8e3 59.IR /dev/kmem
c13182ef 60is the same as
2174e8e3 61.IR /dev/mem ,
e8046fd0 62except that the kernel virtual memory
fea681da 63rather than physical memory is accessed.
2174e8e3 64Since Linux 2.6.26, this file is available only if the
0d9096a7
EDB
65.B CONFIG_DEVKMEM
66kernel configuration option is enabled.
fea681da
MK
67.LP
68It is typically created by:
69.RS
70.sp
4d9b6984 71mknod \-m 640 /dev/kmem c 1 2
fea681da 72.br
9df0bd1d 73chown root:kmem /dev/kmem
fea681da
MK
74.RE
75.LP
2174e8e3 76.IR /dev/port
35cfd378 77is similar to
2174e8e3 78.IR /dev/mem ,
a28e26a1 79but the I/O ports are accessed.
fea681da
MK
80.LP
81It is typically created by:
82.RS
83.sp
4d9b6984 84mknod \-m 660 /dev/port c 1 4
fea681da 85.br
463f35e1 86chown root:kmem /dev/port
fea681da
MK
87.RE
88.SH FILES
89.I /dev/mem
90.br
91.I /dev/kmem
92.br
93.I /dev/port
47297adb 94.SH SEE ALSO
fea681da
MK
95.BR chown (1),
96.BR mknod (1),
97.BR ioperm (2)