mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-12-04 05:20:30 +00:00
Documentation: Add a manual page about the new MemoryDevice file
This commit is contained in:
parent
6e8f86b44b
commit
878d353c3d
Notes:
sideshowbarker
2024-07-18 22:38:55 +09:00
Author: https://github.com/supercomputer7 Commit: https://github.com/SerenityOS/serenity/commit/878d353c3df Pull-request: https://github.com/SerenityOS/serenity/pull/5163 Reviewed-by: https://github.com/awesomekling Reviewed-by: https://github.com/bcoles Reviewed-by: https://github.com/linusg
1 changed files with 31 additions and 0 deletions
31
Base/usr/share/man/man4/mem.md
Normal file
31
Base/usr/share/man/man4/mem.md
Normal file
|
@ -0,0 +1,31 @@
|
|||
## Name
|
||||
|
||||
mem - physical system memory
|
||||
|
||||
## Description
|
||||
|
||||
`/dev/mem` is a character device file that is used by other programs to examine
|
||||
the physical memory.
|
||||
|
||||
Trying to [`mmap`(2)](../mmap.md) a physical range results either with success,
|
||||
or with an error. When invoking [`mmap`(2)](../mmap.md) on bad memory range,
|
||||
the kernel will write a message about it to the kernel log.
|
||||
|
||||
By default, the kernel limits the areas which can be accessed. The allowed areas
|
||||
are the reserved ranges in physical memory, essentially limiting the access to
|
||||
ROMs and memory-mapped PCI regions on x86.
|
||||
|
||||
To create it manually:
|
||||
```sh
|
||||
mknod /dev/mem c 1 1
|
||||
chmod 660 /dev/mem
|
||||
```
|
||||
|
||||
## Returned error values after [`mmap`(2)](../mmap.md)
|
||||
|
||||
* `EINVAL`: An access violation was detected.
|
||||
* `ENOMEM`: The requested range would wrap around, creating an access violation.
|
||||
|
||||
## See also
|
||||
|
||||
* [`mmap`(2)](../mmap.md)
|
Loading…
Reference in a new issue