summaryrefslogtreecommitdiff
path: root/Base
diff options
context:
space:
mode:
authorLiav A <liavalb@gmail.com>2021-12-24 07:04:34 +0200
committerIdan Horowitz <idan.horowitz@gmail.com>2022-01-08 13:21:16 +0200
commitff25958b5110432afabf16d01ee2b61e39de5f37 (patch)
treecd34b0ef1baa983b5d48018aee7a1cffe6f9cb09 /Base
parentf7d1b8cd0cba181b19eb10872ef2e84751af3733 (diff)
downloadserenity-ff25958b5110432afabf16d01ee2b61e39de5f37.zip
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.
Diffstat (limited to 'Base')
-rw-r--r--Base/usr/share/man/man1/pmemdump.md38
1 files changed, 38 insertions, 0 deletions
diff --git a/Base/usr/share/man/man1/pmemdump.md b/Base/usr/share/man/man1/pmemdump.md
new file mode 100644
index 0000000000..a8fbe15824
--- /dev/null
+++ b/Base/usr/share/man/man1/pmemdump.md
@@ -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)