]> git.ipfire.org Git - thirdparty/man-pages.git/blob - man4/mem.4
rename.2: SEE ALSO: add rename(1)
[thirdparty/man-pages.git] / man4 / mem.4
1 .\" Copyright (c) 1993 Michael Haardt (michael@moria.de),
2 .\" Fri Apr 2 11:32:09 MET DST 1993
3 .\"
4 .\" %%%LICENSE_START(GPLv2+_DOC_FULL)
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
21 .\" License along with this manual; if not, see
22 .\" <http://www.gnu.org/licenses/>.
23 .\" %%%LICENSE_END
24 .\"
25 .\" Modified Sat Jul 24 16:59:10 1993 by Rik Faith (faith@cs.unc.edu)
26 .TH MEM 4 2015-01-02 "Linux" "Linux Programmer's Manual"
27 .SH NAME
28 mem, kmem, port \- system memory, kernel memory and system ports
29 .SH DESCRIPTION
30 .IR /dev/mem
31 is a character device file
32 that is an image of the main memory of the computer.
33 It may be used, for example, to examine (and even patch) the system.
34 .PP
35 Byte addresses in
36 .IR /dev/mem
37 are interpreted as physical memory addresses.
38 References to nonexistent locations cause errors to be returned.
39 .PP
40 Examining and patching is likely to lead to unexpected results
41 when read-only or write-only bits are present.
42 .PP
43 Since Linux 2.6.26, and depending on the architecture, the
44 .B CONFIG_STRICT_DEVMEM
45 kernel configuration option limits the areas
46 which can be accessed through this file.
47 For example: on x86, RAM access is not allowed but accessing
48 memory-mapped PCI regions is.
49 .PP
50 It is typically created by:
51 .PP
52 .in +4n
53 .EX
54 mknod \-m 660 /dev/mem c 1 1
55 chown root:kmem /dev/mem
56 .EE
57 .in
58 .PP
59 The file
60 .IR /dev/kmem
61 is the same as
62 .IR /dev/mem ,
63 except that the kernel virtual memory
64 rather than physical memory is accessed.
65 Since Linux 2.6.26, this file is available only if the
66 .B CONFIG_DEVKMEM
67 kernel configuration option is enabled.
68 .PP
69 It is typically created by:
70 .PP
71 .in +4n
72 .EX
73 mknod \-m 640 /dev/kmem c 1 2
74 chown root:kmem /dev/kmem
75 .EE
76 .in
77 .PP
78 .IR /dev/port
79 is similar to
80 .IR /dev/mem ,
81 but the I/O ports are accessed.
82 .PP
83 It is typically created by:
84 .PP
85 .in +4n
86 .EX
87 mknod \-m 660 /dev/port c 1 4
88 chown root:kmem /dev/port
89 .EE
90 .in
91 .SH FILES
92 .I /dev/mem
93 .br
94 .I /dev/kmem
95 .br
96 .I /dev/port
97 .SH SEE ALSO
98 .BR chown (1),
99 .BR mknod (1),
100 .BR ioperm (2)