mirror of
https://github.com/RGBCube/serenity
synced 2025-05-28 22:45:07 +00:00
Userland: Introduce the pmemdump utility
This utility helps to dump the physical memory space from /dev/mem. It supports both read(2) and mmap(2) on it so we could use mmap(2) for fast dumping of the memory, or read(2) when we need to read unaligned physical regions.
This commit is contained in:
parent
f7d1b8cd0c
commit
ff25958b51
3 changed files with 159 additions and 0 deletions
38
Base/usr/share/man/man1/pmemdump.md
Normal file
38
Base/usr/share/man/man1/pmemdump.md
Normal file
|
@ -0,0 +1,38 @@
|
|||
## Name
|
||||
|
||||
pmemdump - dump physical memory
|
||||
|
||||
## Synopsis
|
||||
|
||||
```**sh
|
||||
$ pmemdump [-r] <offset> <length>
|
||||
```
|
||||
|
||||
## Description
|
||||
|
||||
Dump a portion of the physical memory space.
|
||||
|
||||
|
||||
## Options
|
||||
|
||||
* `-r`: Dump from /dev/mem with `read(2)` instead of doing `mmap(2)` on it.
|
||||
|
||||
## Examples
|
||||
|
||||
```sh
|
||||
$ pmemdump -r 983040 65536
|
||||
$ pmemdump 983040 65536
|
||||
```
|
||||
|
||||
## Notes
|
||||
|
||||
The pmemdump utility opens the `/dev/mem` file, and gets a mapping by doing `mmap(2)`
|
||||
on it.
|
||||
|
||||
Using the `-r` flag might be useful sometimes, especially when reading from an unaligned
|
||||
reserved physical memory region when trying to `mmap(2)` `/dev/mem` on the specified
|
||||
offset fails.
|
||||
|
||||
## See also
|
||||
|
||||
* [`mem`(4)](../man4/mem.md)
|
Loading…
Add table
Add a link
Reference in a new issue