]> git.ipfire.org Git - thirdparty/man-pages.git/blame - man4/mem.4
Many pages: Fix style issues reported by `make lint-groff`
[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.\"
e4a74ca8 4.\" SPDX-License-Identifier: GPL-2.0-or-later
fea681da
MK
5.\"
6.\" Modified Sat Jul 24 16:59:10 1993 by Rik Faith (faith@cs.unc.edu)
639dfde8 7.TH MEM 4 2015-01-02 "Linux" "Linux Programmer's Manual"
fea681da
MK
8.SH NAME
9mem, kmem, port \- system memory, kernel memory and system ports
10.SH DESCRIPTION
1ae6b2c7 11.I /dev/mem
35cfd378 12is a character device file
c13182ef
MK
13that is an image of the main memory of the computer.
14It may be used, for example, to examine (and even patch) the system.
dd3568a1 15.PP
c13182ef 16Byte addresses in
1ae6b2c7 17.I /dev/mem
e8046fd0 18are interpreted as physical memory addresses.
c382a365 19References to nonexistent locations cause errors to be returned.
dd3568a1 20.PP
fea681da
MK
21Examining and patching is likely to lead to unexpected results
22when read-only or write-only bits are present.
dd3568a1 23.PP
2174e8e3 24Since Linux 2.6.26, and depending on the architecture, the
639dfde8
EDB
25.B CONFIG_STRICT_DEVMEM
26kernel configuration option limits the areas
27which can be accessed through this file.
28For example: on x86, RAM access is not allowed but accessing
29memory-mapped PCI regions is.
dd3568a1 30.PP
fea681da 31It is typically created by:
bdd915e2
MK
32.PP
33.in +4n
34.EX
4d9b6984 35mknod \-m 660 /dev/mem c 1 1
9df0bd1d 36chown root:kmem /dev/mem
bdd915e2
MK
37.EE
38.in
39.PP
c13182ef 40The file
1ae6b2c7 41.I /dev/kmem
c13182ef 42is the same as
2174e8e3 43.IR /dev/mem ,
e8046fd0 44except that the kernel virtual memory
fea681da 45rather than physical memory is accessed.
2174e8e3 46Since Linux 2.6.26, this file is available only if the
0d9096a7
EDB
47.B CONFIG_DEVKMEM
48kernel configuration option is enabled.
dd3568a1 49.PP
fea681da 50It is typically created by:
bdd915e2
MK
51.PP
52.in +4n
53.EX
4d9b6984 54mknod \-m 640 /dev/kmem c 1 2
9df0bd1d 55chown root:kmem /dev/kmem
bdd915e2
MK
56.EE
57.in
58.PP
1ae6b2c7 59.I /dev/port
35cfd378 60is similar to
2174e8e3 61.IR /dev/mem ,
a28e26a1 62but the I/O ports are accessed.
dd3568a1 63.PP
fea681da 64It is typically created by:
bdd915e2
MK
65.PP
66.in +4n
67.EX
4d9b6984 68mknod \-m 660 /dev/port c 1 4
463f35e1 69chown root:kmem /dev/port
bdd915e2
MK
70.EE
71.in
fea681da
MK
72.SH FILES
73.I /dev/mem
74.br
75.I /dev/kmem
76.br
77.I /dev/port
47297adb 78.SH SEE ALSO
fea681da
MK
79.BR chown (1),
80.BR mknod (1),
81.BR ioperm (2)