]>
Commit | Line | Data |
---|---|---|
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 |
28 | mem, kmem, port \- system memory, kernel memory and system ports | |
29 | .SH DESCRIPTION | |
2174e8e3 | 30 | .IR /dev/mem |
35cfd378 | 31 | is a character device file |
c13182ef MK |
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. | |
dd3568a1 | 34 | .PP |
c13182ef | 35 | Byte addresses in |
2174e8e3 | 36 | .IR /dev/mem |
e8046fd0 | 37 | are interpreted as physical memory addresses. |
c382a365 | 38 | References to nonexistent locations cause errors to be returned. |
dd3568a1 | 39 | .PP |
fea681da MK |
40 | Examining and patching is likely to lead to unexpected results |
41 | when read-only or write-only bits are present. | |
dd3568a1 | 42 | .PP |
2174e8e3 | 43 | Since Linux 2.6.26, and depending on the architecture, the |
639dfde8 EDB |
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. | |
dd3568a1 | 49 | .PP |
fea681da | 50 | It is typically created by: |
bdd915e2 MK |
51 | .PP |
52 | .in +4n | |
53 | .EX | |
4d9b6984 | 54 | mknod \-m 660 /dev/mem c 1 1 |
9df0bd1d | 55 | chown root:kmem /dev/mem |
bdd915e2 MK |
56 | .EE |
57 | .in | |
58 | .PP | |
c13182ef | 59 | The file |
2174e8e3 | 60 | .IR /dev/kmem |
c13182ef | 61 | is the same as |
2174e8e3 | 62 | .IR /dev/mem , |
e8046fd0 | 63 | except that the kernel virtual memory |
fea681da | 64 | rather than physical memory is accessed. |
2174e8e3 | 65 | Since Linux 2.6.26, this file is available only if the |
0d9096a7 EDB |
66 | .B CONFIG_DEVKMEM |
67 | kernel configuration option is enabled. | |
dd3568a1 | 68 | .PP |
fea681da | 69 | It is typically created by: |
bdd915e2 MK |
70 | .PP |
71 | .in +4n | |
72 | .EX | |
4d9b6984 | 73 | mknod \-m 640 /dev/kmem c 1 2 |
9df0bd1d | 74 | chown root:kmem /dev/kmem |
bdd915e2 MK |
75 | .EE |
76 | .in | |
77 | .PP | |
2174e8e3 | 78 | .IR /dev/port |
35cfd378 | 79 | is similar to |
2174e8e3 | 80 | .IR /dev/mem , |
a28e26a1 | 81 | but the I/O ports are accessed. |
dd3568a1 | 82 | .PP |
fea681da | 83 | It is typically created by: |
bdd915e2 MK |
84 | .PP |
85 | .in +4n | |
86 | .EX | |
4d9b6984 | 87 | mknod \-m 660 /dev/port c 1 4 |
463f35e1 | 88 | chown 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) |