-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
added command line arg for max map size
- Loading branch information
1 parent
2850506
commit 5dc21c0
Showing
6 changed files
with
46 additions
and
29 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,8 @@ | ||
![memory map diagram](report.png) | ||
|name|origin|size|remaining|collisions | ||
|:-|:-|:-|:-|:-| | ||
|<span style='color:darkolivegreen'>kernel</span>|0x10|0x50|-0x10|{'rootfs': '0x50'}| | ||
|<span style='color:darkviolet'>uboot</span>|0xD0|0x50|-0x10|{'uboot-scr': '0x110'}| | ||
|<span style='color:slategrey'>rootfs</span>|0x50|0x30|0x10|{'kernel': '0x50'}| | ||
|<span style='color:mediumaquamarine'>dtb</span>|0x90|0x30|0x10|{}| | ||
|<span style='color:mediumslateblue'>uboot-scr</span>|0x110|0x30|0x2a8|{'uboot': '0x110'}| | ||
|<span style='color:dimgrey'>kernel</span>|0x10|0x50|-0x10|{'rootfs': '0x50'}| | ||
|<span style='color:aquamarine'>uboot</span>|0xD0|0x50|-0x10|{'uboot-scr': '0x110'}| | ||
|<span style='color:darkolivegreen'>rootfs</span>|0x50|0x30|0x10|{'kernel': '0x50'}| | ||
|<span style='color:slategray'>dtb</span>|0x90|0x30|0x10|{}| | ||
|<span style='color:darkturquoise'>uboot-scr</span>|0x110|0x30|0x50|{'uboot': '0x110'}| |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,35 +1,37 @@ | ||
[![Build](https://github.com/cracked-machine/mmdiagram/actions/workflows/python-app.yml/badge.svg)](https://github.com/cracked-machine/mmdiagram/actions/workflows/python-app.yml) | ||
[![Codecov](https://img.shields.io/codecov/c/github/cracked-machine/mmdiagram)](https://app.codecov.io/gh/cracked-machine/mmdiagram) | ||
|
||
### Setup | ||
Tool for mapping of regions in memory, specifcally for visualising and troubleshooting region overlap/collision. | ||
|
||
Run `sudo make init` to install python deps and linux packages. | ||
![](doc/example/report.png) | ||
|
||
As well as the `png` format diagram image, a `markdown` report is also created: | ||
- inline image of the diagram | ||
- collision data table | ||
|
||
An example can be found in [doc/example/report.md](doc/example/report.md) | ||
|
||
### Usage: | ||
|
||
``` | ||
usage: generator.py [-h] [-o OUT] [regions ...] | ||
usage: mm.diagram [-h] [-o OUT] [-l LIMIT] [regions ...] | ||
positional arguments: | ||
regions command line input for regions should be tuples of name, origin and size. | ||
regions command line input for regions should be tuples of name, origin and size. | ||
options: | ||
-h, --help show this help message and exit | ||
-o OUT, --out OUT path to the markdown output report file. Defaults to "out/report.md" | ||
-h, --help show this help message and exit | ||
-o OUT, --out OUT path to the markdown output report file. Default: "out/report.md" | ||
-l LIMIT, --limit LIMIT | ||
The maximum memory address for the diagram. Default: 400 | ||
``` | ||
|
||
- Generate five regions called `kernel`, `rootfs`, `dtb`, `uboot` and `uboot-scr` where four of the five regions intersect/collide. The default report output path is used. | ||
- Generate five regions called `kernel`, `rootfs`, `dtb`, `uboot` and `uboot-scr` where four of the five regions intersect/collide. The default report output path is used. Diagram output is shown at the top of the page. | ||
|
||
``` | ||
python3 -m mm.diagram kernel 0x10 0x50 rootfs 0x50 0x30 dtb 0x90 0x30 uboot 0xD0 0x50 uboot-scr 0x110 0x30 | ||
``` | ||
|
||
![](doc/example/report.png) | ||
|
||
### Output | ||
|
||
As well as the `png` format diagram image, a markdown report is also created: | ||
- inline image of the diagram | ||
- collision data table | ||
|
||
An example can be found in [doc/example/report.md](doc/example/report.md) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters