diff --git a/doc/example/A3_maxaddress_lower_than_memregions.md b/doc/example/A3_maxaddress_lower_than_memregions.md index 8758afc..b22911e 100644 --- a/doc/example/A3_maxaddress_lower_than_memregions.md +++ b/doc/example/A3_maxaddress_lower_than_memregions.md @@ -1,9 +1,9 @@ ![memory map diagram](A3_maxaddress_lower_than_memregions_diagram.png) |region (parent)|origin|size|free Space|collisions|links|draw scale| |:-|:-|:-|:-|:-|:-|:-| -|Boot Image (Flash)|0xbb8 (3000)|0x7d0 (2000)|-0xbb8 (-3000)| end @ 0x7d0 |('Global System Address Map', 'OCM')|2:1| -|OCM (Global System Address Map)|0x7e0 (2016)|0x7d0 (2000)|0x3b1 (945)|||1:1| -|DDR Memory Controller (Global System Address Map)|0x10 (16)|0x3e8 (1000)|0x3e8 (1000)|||1:1| +|Boot Image (Flash)|0xbb8 (3000)|0x7d0 (2000)|-0xbb8 (-3000)| end @ 0x7d0 |('Global System Address Map', 'OCM')|2:1| +|OCM (Global System Address Map)|0x7e0 (2016)|0x7d0 (2000)|0x3b1 (945)|||1:1| +|DDR Memory Controller (Global System Address Map)|0x10 (16)|0x3e8 (1000)|0x3e8 (1000)|||1:1| --- #### Global System Address Map: diff --git a/doc/example/A3_maxaddress_lower_than_memregions_diagram.png b/doc/example/A3_maxaddress_lower_than_memregions_diagram.png index d4478f7..23a027c 100644 Binary files a/doc/example/A3_maxaddress_lower_than_memregions_diagram.png and b/doc/example/A3_maxaddress_lower_than_memregions_diagram.png differ diff --git a/doc/example/A3_region_exceeds_height-no_maxaddress_set.md b/doc/example/A3_region_exceeds_height-no_maxaddress_set.md index c578705..197f676 100644 --- a/doc/example/A3_region_exceeds_height-no_maxaddress_set.md +++ b/doc/example/A3_region_exceeds_height-no_maxaddress_set.md @@ -1,9 +1,9 @@ ![memory map diagram](A3_region_exceeds_height-no_maxaddress_set_diagram.png) |region (parent)|origin|size|free Space|collisions|links|draw scale| |:-|:-|:-|:-|:-|:-|:-| -|OCM (Global System Address Map)|0x7e0 (2016)|0x7d0 (2000)|0x3b1 (945)|||1:1| -|DDR Memory Controller (Global System Address Map)|0x10 (16)|0x3e8 (1000)|0x3e8 (1000)|||1:1| -|Boot Image (Flash)|0x0 (0)|0xffffff (16777215)|-0xffec9e (-16772254)| end @ 0x1361 ||3382:1| +|OCM (Global System Address Map)|0x7e0 (2016)|0x7d0 (2000)|0x3b1 (945)|||1:1| +|DDR Memory Controller (Global System Address Map)|0x10 (16)|0x3e8 (1000)|0x3e8 (1000)|||1:1| +|Boot Image (Flash)|0x0 (0)|0xffffff (16777215)|-0xffec9e (-16772254)| end @ 0x1361 ||3382:1| --- #### Global System Address Map: diff --git a/doc/example/A3_region_exceeds_height-no_maxaddress_set_diagram.png b/doc/example/A3_region_exceeds_height-no_maxaddress_set_diagram.png index 83ce4ee..65b711f 100644 Binary files a/doc/example/A3_region_exceeds_height-no_maxaddress_set_diagram.png and b/doc/example/A3_region_exceeds_height-no_maxaddress_set_diagram.png differ diff --git a/doc/example/A3_region_freespace_exceeds_height-higher_maxaddress_set.md b/doc/example/A3_region_freespace_exceeds_height-higher_maxaddress_set.md index e74e76f..c0a70c9 100644 --- a/doc/example/A3_region_freespace_exceeds_height-higher_maxaddress_set.md +++ b/doc/example/A3_region_freespace_exceeds_height-higher_maxaddress_set.md @@ -1,9 +1,9 @@ ![memory map diagram](A3_region_freespace_exceeds_height-higher_maxaddress_set_diagram.png) |region (parent)|origin|size|free Space|collisions|links|draw scale| |:-|:-|:-|:-|:-|:-|:-| -|OCM (Global System Address Map)|0x7e0 (2016)|0x7d0 (2000)|0xfffff04f (4294963279)|||1:1| -|DDR Memory Controller (Global System Address Map)|0x10 (16)|0x3e8 (1000)|0x3e8 (1000)|||1:1| -|Boot Image (Flash)|0x0 (0)|0xffffff (16777215)|0xff000000 (4278190080)|||3544:1| +|OCM (Global System Address Map)|0x7e0 (2016)|0x7d0 (2000)|0xfffff04f (4294963279)|||1:1| +|DDR Memory Controller (Global System Address Map)|0x10 (16)|0x3e8 (1000)|0x3e8 (1000)|||1:1| +|Boot Image (Flash)|0x0 (0)|0xffffff (16777215)|0xff000000 (4278190080)|||3544:1| --- #### Global System Address Map: diff --git a/doc/example/A3_region_freespace_exceeds_height-higher_maxaddress_set_diagram.png b/doc/example/A3_region_freespace_exceeds_height-higher_maxaddress_set_diagram.png index 6aa7001..768f370 100644 Binary files a/doc/example/A3_region_freespace_exceeds_height-higher_maxaddress_set_diagram.png and b/doc/example/A3_region_freespace_exceeds_height-higher_maxaddress_set_diagram.png differ diff --git a/doc/example/A4_maxaddress_lower_than_memregions.md b/doc/example/A4_maxaddress_lower_than_memregions.md index 56ae487..e8ed0f3 100644 --- a/doc/example/A4_maxaddress_lower_than_memregions.md +++ b/doc/example/A4_maxaddress_lower_than_memregions.md @@ -1,9 +1,9 @@ ![memory map diagram](A4_maxaddress_lower_than_memregions_diagram.png) |region (parent)|origin|size|free Space|collisions|links|draw scale| |:-|:-|:-|:-|:-|:-|:-| -|Boot Image (Flash)|0xbb8 (3000)|0x7d0 (2000)|-0xbb8 (-3000)| end @ 0x7d0 |('Global System Address Map', 'OCM')|2:1| -|OCM (Global System Address Map)|0x7e0 (2016)|0x7d0 (2000)|-0x1fc (-508)| end @ 0xdb4 ||2:1| -|DDR Memory Controller (Global System Address Map)|0x10 (16)|0x3e8 (1000)|0x3e8 (1000)|||2:1| +|Boot Image (Flash)|0xbb8 (3000)|0x7d0 (2000)|-0xbb8 (-3000)| end @ 0x7d0 |('Global System Address Map', 'OCM')|2:1| +|OCM (Global System Address Map)|0x7e0 (2016)|0x7d0 (2000)|-0x1fc (-508)| end @ 0xdb4 ||2:1| +|DDR Memory Controller (Global System Address Map)|0x10 (16)|0x3e8 (1000)|0x3e8 (1000)|||2:1| --- #### Global System Address Map: diff --git a/doc/example/A4_maxaddress_lower_than_memregions_diagram.png b/doc/example/A4_maxaddress_lower_than_memregions_diagram.png index c93102b..978240e 100644 Binary files a/doc/example/A4_maxaddress_lower_than_memregions_diagram.png and b/doc/example/A4_maxaddress_lower_than_memregions_diagram.png differ diff --git a/doc/example/A4_region_exceeds_height-no_maxaddress_set.md b/doc/example/A4_region_exceeds_height-no_maxaddress_set.md index 2c7779e..51f5c1b 100644 --- a/doc/example/A4_region_exceeds_height-no_maxaddress_set.md +++ b/doc/example/A4_region_exceeds_height-no_maxaddress_set.md @@ -1,9 +1,9 @@ ![memory map diagram](A4_region_exceeds_height-no_maxaddress_set_diagram.png) |region (parent)|origin|size|free Space|collisions|links|draw scale| |:-|:-|:-|:-|:-|:-|:-| -|OCM (Global System Address Map)|0x7e0 (2016)|0x7d0 (2000)|-0x1fc (-508)| end @ 0xdb4 ||2:1| -|DDR Memory Controller (Global System Address Map)|0x10 (16)|0x3e8 (1000)|0x3e8 (1000)|||2:1| -|Boot Image (Flash)|0x0 (0)|0xffffff (16777215)|-0xfff24b (-16773707)| end @ 0xdb4 ||4783:1| +|OCM (Global System Address Map)|0x7e0 (2016)|0x7d0 (2000)|-0x1fc (-508)| end @ 0xdb4 ||2:1| +|DDR Memory Controller (Global System Address Map)|0x10 (16)|0x3e8 (1000)|0x3e8 (1000)|||2:1| +|Boot Image (Flash)|0x0 (0)|0xffffff (16777215)|-0xfff24b (-16773707)| end @ 0xdb4 ||4783:1| --- #### Global System Address Map: diff --git a/doc/example/A4_region_exceeds_height-no_maxaddress_set_diagram.png b/doc/example/A4_region_exceeds_height-no_maxaddress_set_diagram.png index acd408d..fa26f8b 100644 Binary files a/doc/example/A4_region_exceeds_height-no_maxaddress_set_diagram.png and b/doc/example/A4_region_exceeds_height-no_maxaddress_set_diagram.png differ diff --git a/doc/example/A4_region_freespace_exceeds_height-higher_maxaddress_set.md b/doc/example/A4_region_freespace_exceeds_height-higher_maxaddress_set.md index 28ef699..c1d2f41 100644 --- a/doc/example/A4_region_freespace_exceeds_height-higher_maxaddress_set.md +++ b/doc/example/A4_region_freespace_exceeds_height-higher_maxaddress_set.md @@ -1,9 +1,9 @@ ![memory map diagram](A4_region_freespace_exceeds_height-higher_maxaddress_set_diagram.png) |region (parent)|origin|size|free Space|collisions|links|draw scale| |:-|:-|:-|:-|:-|:-|:-| -|OCM (Global System Address Map)|0x7e0 (2016)|0x7d0 (2000)|0xfffff04f (4294963279)|||2:1| -|DDR Memory Controller (Global System Address Map)|0x10 (16)|0x3e8 (1000)|0x3e8 (1000)|||2:1| -|Boot Image (Flash)|0x0 (0)|0xffffff (16777215)|0xff000000 (4278190080)|||5011:1| +|OCM (Global System Address Map)|0x7e0 (2016)|0x7d0 (2000)|0xfffff04f (4294963279)|||2:1| +|DDR Memory Controller (Global System Address Map)|0x10 (16)|0x3e8 (1000)|0x3e8 (1000)|||2:1| +|Boot Image (Flash)|0x0 (0)|0xffffff (16777215)|0xff000000 (4278190080)|||5011:1| --- #### Global System Address Map: diff --git a/doc/example/A4_region_freespace_exceeds_height-higher_maxaddress_set_diagram.png b/doc/example/A4_region_freespace_exceeds_height-higher_maxaddress_set_diagram.png index 1386b98..c9ef6cb 100644 Binary files a/doc/example/A4_region_freespace_exceeds_height-higher_maxaddress_set_diagram.png and b/doc/example/A4_region_freespace_exceeds_height-higher_maxaddress_set_diagram.png differ diff --git a/doc/example/A5_maxaddress_lower_than_memregions.md b/doc/example/A5_maxaddress_lower_than_memregions.md index bf65adb..879096f 100644 --- a/doc/example/A5_maxaddress_lower_than_memregions.md +++ b/doc/example/A5_maxaddress_lower_than_memregions.md @@ -1,9 +1,9 @@ ![memory map diagram](A5_maxaddress_lower_than_memregions_diagram.png) |region (parent)|origin|size|free Space|collisions|links|draw scale| |:-|:-|:-|:-|:-|:-|:-| -|Boot Image (Flash)|0xbb8 (3000)|0x7d0 (2000)|-0xbb8 (-3000)| end @ 0x7d0 |('Global System Address Map', 'OCM')|3:1| -|OCM (Global System Address Map)|0x7e0 (2016)|0x7d0 (2000)|-0x600 (-1536)| end @ 0x9b0 ||2:1| -|DDR Memory Controller (Global System Address Map)|0x10 (16)|0x3e8 (1000)|0x3e8 (1000)|||2:1| +|Boot Image (Flash)|0xbb8 (3000)|0x7d0 (2000)|-0xbb8 (-3000)| end @ 0x7d0 |('Global System Address Map', 'OCM')|3:1| +|OCM (Global System Address Map)|0x7e0 (2016)|0x7d0 (2000)|-0x600 (-1536)| end @ 0x9b0 ||2:1| +|DDR Memory Controller (Global System Address Map)|0x10 (16)|0x3e8 (1000)|0x3e8 (1000)|||2:1| --- #### Global System Address Map: diff --git a/doc/example/A5_maxaddress_lower_than_memregions_diagram.png b/doc/example/A5_maxaddress_lower_than_memregions_diagram.png index 854a11d..92196dc 100644 Binary files a/doc/example/A5_maxaddress_lower_than_memregions_diagram.png and b/doc/example/A5_maxaddress_lower_than_memregions_diagram.png differ diff --git a/doc/example/A5_region_exceeds_height-no_maxaddress_set.md b/doc/example/A5_region_exceeds_height-no_maxaddress_set.md index 1c3b10d..d7e848f 100644 --- a/doc/example/A5_region_exceeds_height-no_maxaddress_set.md +++ b/doc/example/A5_region_exceeds_height-no_maxaddress_set.md @@ -1,9 +1,9 @@ ![memory map diagram](A5_region_exceeds_height-no_maxaddress_set_diagram.png) |region (parent)|origin|size|free Space|collisions|links|draw scale| |:-|:-|:-|:-|:-|:-|:-| -|OCM (Global System Address Map)|0x7e0 (2016)|0x7d0 (2000)|-0x600 (-1536)| end @ 0x9b0 ||2:1| -|DDR Memory Controller (Global System Address Map)|0x10 (16)|0x3e8 (1000)|0x3e8 (1000)|||2:1| -|Boot Image (Flash)|0x0 (0)|0xffffff (16777215)|-0xfff64f (-16774735)| end @ 0x9b0 ||6766:1| +|OCM (Global System Address Map)|0x7e0 (2016)|0x7d0 (2000)|-0x600 (-1536)| end @ 0x9b0 ||2:1| +|DDR Memory Controller (Global System Address Map)|0x10 (16)|0x3e8 (1000)|0x3e8 (1000)|||2:1| +|Boot Image (Flash)|0x0 (0)|0xffffff (16777215)|-0xfff64f (-16774735)| end @ 0x9b0 ||6766:1| --- #### Global System Address Map: diff --git a/doc/example/A5_region_exceeds_height-no_maxaddress_set_diagram.png b/doc/example/A5_region_exceeds_height-no_maxaddress_set_diagram.png index 6aabeba..1bdfd19 100644 Binary files a/doc/example/A5_region_exceeds_height-no_maxaddress_set_diagram.png and b/doc/example/A5_region_exceeds_height-no_maxaddress_set_diagram.png differ diff --git a/doc/example/A5_region_freespace_exceeds_height-higher_maxaddress_set.md b/doc/example/A5_region_freespace_exceeds_height-higher_maxaddress_set.md index 05c07fd..1598ebb 100644 --- a/doc/example/A5_region_freespace_exceeds_height-higher_maxaddress_set.md +++ b/doc/example/A5_region_freespace_exceeds_height-higher_maxaddress_set.md @@ -1,9 +1,9 @@ ![memory map diagram](A5_region_freespace_exceeds_height-higher_maxaddress_set_diagram.png) |region (parent)|origin|size|free Space|collisions|links|draw scale| |:-|:-|:-|:-|:-|:-|:-| -|OCM (Global System Address Map)|0x7e0 (2016)|0x7d0 (2000)|0xfffff04f (4294963279)|||2:1| -|DDR Memory Controller (Global System Address Map)|0x10 (16)|0x3e8 (1000)|0x3e8 (1000)|||2:1| -|Boot Image (Flash)|0x0 (0)|0xffffff (16777215)|0xff000000 (4278190080)|||7088:1| +|OCM (Global System Address Map)|0x7e0 (2016)|0x7d0 (2000)|0xfffff04f (4294963279)|||2:1| +|DDR Memory Controller (Global System Address Map)|0x10 (16)|0x3e8 (1000)|0x3e8 (1000)|||2:1| +|Boot Image (Flash)|0x0 (0)|0xffffff (16777215)|0xff000000 (4278190080)|||7088:1| --- #### Global System Address Map: diff --git a/doc/example/A5_region_freespace_exceeds_height-higher_maxaddress_set_diagram.png b/doc/example/A5_region_freespace_exceeds_height-higher_maxaddress_set_diagram.png index cb39298..e8bbcb9 100644 Binary files a/doc/example/A5_region_freespace_exceeds_height-higher_maxaddress_set_diagram.png and b/doc/example/A5_region_freespace_exceeds_height-higher_maxaddress_set_diagram.png differ diff --git a/doc/example/A6_maxaddress_lower_than_memregions.md b/doc/example/A6_maxaddress_lower_than_memregions.md index 1191bfd..04ecbe5 100644 --- a/doc/example/A6_maxaddress_lower_than_memregions.md +++ b/doc/example/A6_maxaddress_lower_than_memregions.md @@ -1,9 +1,9 @@ ![memory map diagram](A6_maxaddress_lower_than_memregions_diagram.png) |region (parent)|origin|size|free Space|collisions|links|draw scale| |:-|:-|:-|:-|:-|:-|:-| -|Boot Image (Flash)|0xbb8 (3000)|0x7d0 (2000)|-0xbb8 (-3000)| end @ 0x7d0 |('Global System Address Map', 'OCM')|3:1| -|OCM (Global System Address Map)|0x7e0 (2016)|0x7d0 (2000)|-0x8dc (-2268)| end @ 0x6d4 ||3:1| -|DDR Memory Controller (Global System Address Map)|0x10 (16)|0x3e8 (1000)|0x3e8 (1000)|||3:1| +|Boot Image (Flash)|0xbb8 (3000)|0x7d0 (2000)|-0xbb8 (-3000)| end @ 0x7d0 |('Global System Address Map', 'OCM')|3:1| +|OCM (Global System Address Map)|0x7e0 (2016)|0x7d0 (2000)|-0x8dc (-2268)| end @ 0x6d4 ||3:1| +|DDR Memory Controller (Global System Address Map)|0x10 (16)|0x3e8 (1000)|0x3e8 (1000)|||3:1| --- #### Global System Address Map: diff --git a/doc/example/A6_maxaddress_lower_than_memregions_diagram.png b/doc/example/A6_maxaddress_lower_than_memregions_diagram.png index 0a9b18b..97ccd79 100644 Binary files a/doc/example/A6_maxaddress_lower_than_memregions_diagram.png and b/doc/example/A6_maxaddress_lower_than_memregions_diagram.png differ diff --git a/doc/example/A6_region_exceeds_height-no_maxaddress_set.md b/doc/example/A6_region_exceeds_height-no_maxaddress_set.md index 116a695..b1a990d 100644 --- a/doc/example/A6_region_exceeds_height-no_maxaddress_set.md +++ b/doc/example/A6_region_exceeds_height-no_maxaddress_set.md @@ -1,9 +1,9 @@ ![memory map diagram](A6_region_exceeds_height-no_maxaddress_set_diagram.png) |region (parent)|origin|size|free Space|collisions|links|draw scale| |:-|:-|:-|:-|:-|:-|:-| -|OCM (Global System Address Map)|0x7e0 (2016)|0x7d0 (2000)|-0x8dc (-2268)| end @ 0x6d4 ||3:1| -|DDR Memory Controller (Global System Address Map)|0x10 (16)|0x3e8 (1000)|0x3e8 (1000)|||3:1| -|Boot Image (Flash)|0x0 (0)|0xffffff (16777215)|-0xfff92b (-16775467)| end @ 0x6d4 ||9598:1| +|OCM (Global System Address Map)|0x7e0 (2016)|0x7d0 (2000)|-0x8dc (-2268)| end @ 0x6d4 ||3:1| +|DDR Memory Controller (Global System Address Map)|0x10 (16)|0x3e8 (1000)|0x3e8 (1000)|||3:1| +|Boot Image (Flash)|0x0 (0)|0xffffff (16777215)|-0xfff92b (-16775467)| end @ 0x6d4 ||9598:1| --- #### Global System Address Map: diff --git a/doc/example/A6_region_exceeds_height-no_maxaddress_set_diagram.png b/doc/example/A6_region_exceeds_height-no_maxaddress_set_diagram.png index 85a0918..ce51555 100644 Binary files a/doc/example/A6_region_exceeds_height-no_maxaddress_set_diagram.png and b/doc/example/A6_region_exceeds_height-no_maxaddress_set_diagram.png differ diff --git a/doc/example/A6_region_freespace_exceeds_height-higher_maxaddress_set.md b/doc/example/A6_region_freespace_exceeds_height-higher_maxaddress_set.md index a7fbaef..7a9bb94 100644 --- a/doc/example/A6_region_freespace_exceeds_height-higher_maxaddress_set.md +++ b/doc/example/A6_region_freespace_exceeds_height-higher_maxaddress_set.md @@ -1,9 +1,9 @@ ![memory map diagram](A6_region_freespace_exceeds_height-higher_maxaddress_set_diagram.png) |region (parent)|origin|size|free Space|collisions|links|draw scale| |:-|:-|:-|:-|:-|:-|:-| -|OCM (Global System Address Map)|0x7e0 (2016)|0x7d0 (2000)|0xfffff04f (4294963279)|||3:1| -|DDR Memory Controller (Global System Address Map)|0x10 (16)|0x3e8 (1000)|0x3e8 (1000)|||3:1| -|Boot Image (Flash)|0x0 (0)|0xffffff (16777215)|0xff000000 (4278190080)|||10056:1| +|OCM (Global System Address Map)|0x7e0 (2016)|0x7d0 (2000)|0xfffff04f (4294963279)|||3:1| +|DDR Memory Controller (Global System Address Map)|0x10 (16)|0x3e8 (1000)|0x3e8 (1000)|||3:1| +|Boot Image (Flash)|0x0 (0)|0xffffff (16777215)|0xff000000 (4278190080)|||10056:1| --- #### Global System Address Map: diff --git a/doc/example/A6_region_freespace_exceeds_height-higher_maxaddress_set_diagram.png b/doc/example/A6_region_freespace_exceeds_height-higher_maxaddress_set_diagram.png index f149a92..51b9acf 100644 Binary files a/doc/example/A6_region_freespace_exceeds_height-higher_maxaddress_set_diagram.png and b/doc/example/A6_region_freespace_exceeds_height-higher_maxaddress_set_diagram.png differ diff --git a/doc/example/A7_maxaddress_lower_than_memregions.md b/doc/example/A7_maxaddress_lower_than_memregions.md index b52aaab..fcac7f1 100644 --- a/doc/example/A7_maxaddress_lower_than_memregions.md +++ b/doc/example/A7_maxaddress_lower_than_memregions.md @@ -1,9 +1,9 @@ ![memory map diagram](A7_maxaddress_lower_than_memregions_diagram.png) |region (parent)|origin|size|free Space|collisions|links|draw scale| |:-|:-|:-|:-|:-|:-|:-| -|Boot Image (Flash)|0xbb8 (3000)|0x7d0 (2000)|-0xbb8 (-3000)| end @ 0x7d0 |('Global System Address Map', 'OCM')|5:1| -|OCM (Global System Address Map)|0x7e0 (2016)|0x7d0 (2000)|-0xad8 (-2776)| end @ 0x4d8 ||4:1| -|DDR Memory Controller (Global System Address Map)|0x10 (16)|0x3e8 (1000)|0x3e8 (1000)|||4:1| +|Boot Image (Flash)|0xbb8 (3000)|0x7d0 (2000)|-0xbb8 (-3000)| end @ 0x7d0 |('Global System Address Map', 'OCM')|5:1| +|OCM (Global System Address Map)|0x7e0 (2016)|0x7d0 (2000)|-0xad8 (-2776)| end @ 0x4d8 ||4:1| +|DDR Memory Controller (Global System Address Map)|0x10 (16)|0x3e8 (1000)|0x3e8 (1000)|||4:1| --- #### Global System Address Map: diff --git a/doc/example/A7_maxaddress_lower_than_memregions_diagram.png b/doc/example/A7_maxaddress_lower_than_memregions_diagram.png index d1712aa..b6cd71d 100644 Binary files a/doc/example/A7_maxaddress_lower_than_memregions_diagram.png and b/doc/example/A7_maxaddress_lower_than_memregions_diagram.png differ diff --git a/doc/example/A7_region_exceeds_height-no_maxaddress_set.md b/doc/example/A7_region_exceeds_height-no_maxaddress_set.md index 33b5dd7..9ea0c10 100644 --- a/doc/example/A7_region_exceeds_height-no_maxaddress_set.md +++ b/doc/example/A7_region_exceeds_height-no_maxaddress_set.md @@ -1,9 +1,9 @@ ![memory map diagram](A7_region_exceeds_height-no_maxaddress_set_diagram.png) |region (parent)|origin|size|free Space|collisions|links|draw scale| |:-|:-|:-|:-|:-|:-|:-| -|OCM (Global System Address Map)|0x7e0 (2016)|0x7d0 (2000)|-0xad8 (-2776)| end @ 0x4d8 ||4:1| -|DDR Memory Controller (Global System Address Map)|0x10 (16)|0x3e8 (1000)|0x3e8 (1000)|||4:1| -|Boot Image (Flash)|0x0 (0)|0xffffff (16777215)|-0xfffb27 (-16775975)| end @ 0x4d8 ||13531:1| +|OCM (Global System Address Map)|0x7e0 (2016)|0x7d0 (2000)|-0xad8 (-2776)| end @ 0x4d8 ||4:1| +|DDR Memory Controller (Global System Address Map)|0x10 (16)|0x3e8 (1000)|0x3e8 (1000)|||4:1| +|Boot Image (Flash)|0x0 (0)|0xffffff (16777215)|-0xfffb27 (-16775975)| end @ 0x4d8 ||13531:1| --- #### Global System Address Map: diff --git a/doc/example/A7_region_exceeds_height-no_maxaddress_set_diagram.png b/doc/example/A7_region_exceeds_height-no_maxaddress_set_diagram.png index 327cd28..70ee08f 100644 Binary files a/doc/example/A7_region_exceeds_height-no_maxaddress_set_diagram.png and b/doc/example/A7_region_exceeds_height-no_maxaddress_set_diagram.png differ diff --git a/doc/example/A7_region_freespace_exceeds_height-higher_maxaddress_set.md b/doc/example/A7_region_freespace_exceeds_height-higher_maxaddress_set.md index cf86126..063f5ed 100644 --- a/doc/example/A7_region_freespace_exceeds_height-higher_maxaddress_set.md +++ b/doc/example/A7_region_freespace_exceeds_height-higher_maxaddress_set.md @@ -1,9 +1,9 @@ ![memory map diagram](A7_region_freespace_exceeds_height-higher_maxaddress_set_diagram.png) |region (parent)|origin|size|free Space|collisions|links|draw scale| |:-|:-|:-|:-|:-|:-|:-| -|OCM (Global System Address Map)|0x7e0 (2016)|0x7d0 (2000)|0xfffff04f (4294963279)|||4:1| -|DDR Memory Controller (Global System Address Map)|0x10 (16)|0x3e8 (1000)|0x3e8 (1000)|||4:1| -|Boot Image (Flash)|0x0 (0)|0xffffff (16777215)|0xff000000 (4278190080)|||14176:1| +|OCM (Global System Address Map)|0x7e0 (2016)|0x7d0 (2000)|0xfffff04f (4294963279)|||4:1| +|DDR Memory Controller (Global System Address Map)|0x10 (16)|0x3e8 (1000)|0x3e8 (1000)|||4:1| +|Boot Image (Flash)|0x0 (0)|0xffffff (16777215)|0xff000000 (4278190080)|||14176:1| --- #### Global System Address Map: diff --git a/doc/example/A7_region_freespace_exceeds_height-higher_maxaddress_set_diagram.png b/doc/example/A7_region_freespace_exceeds_height-higher_maxaddress_set_diagram.png index 3e3c56f..eb5929f 100644 Binary files a/doc/example/A7_region_freespace_exceeds_height-higher_maxaddress_set_diagram.png and b/doc/example/A7_region_freespace_exceeds_height-higher_maxaddress_set_diagram.png differ diff --git a/doc/example/A8_maxaddress_lower_than_memregions.md b/doc/example/A8_maxaddress_lower_than_memregions.md index 307f3be..736f639 100644 --- a/doc/example/A8_maxaddress_lower_than_memregions.md +++ b/doc/example/A8_maxaddress_lower_than_memregions.md @@ -1,9 +1,9 @@ ![memory map diagram](A8_maxaddress_lower_than_memregions_diagram.png) |region (parent)|origin|size|free Space|collisions|links|draw scale| |:-|:-|:-|:-|:-|:-|:-| -|Boot Image (Flash)|0xbb8 (3000)|0x7d0 (2000)|-0xbb8 (-3000)| end @ 0x7d0 |('Global System Address Map', 'OCM')|6:1| -|OCM (Global System Address Map)|0x7e0 (2016)|0x7d0 (2000)|-0xc46 (-3142)| end @ 0x36a ||5:1| -|DDR Memory Controller (Global System Address Map)|0x10 (16)|0x3e8 (1000)|-0x8e (-142)| end @ 0x36a ||5:1| +|Boot Image (Flash)|0xbb8 (3000)|0x7d0 (2000)|-0xbb8 (-3000)| end @ 0x7d0 |('Global System Address Map', 'OCM')|6:1| +|OCM (Global System Address Map)|0x7e0 (2016)|0x7d0 (2000)|-0xc46 (-3142)| end @ 0x36a ||5:1| +|DDR Memory Controller (Global System Address Map)|0x10 (16)|0x3e8 (1000)|-0x8e (-142)| end @ 0x36a ||5:1| --- #### Global System Address Map: diff --git a/doc/example/A8_maxaddress_lower_than_memregions_diagram.png b/doc/example/A8_maxaddress_lower_than_memregions_diagram.png index aad4b7e..fc38119 100644 Binary files a/doc/example/A8_maxaddress_lower_than_memregions_diagram.png and b/doc/example/A8_maxaddress_lower_than_memregions_diagram.png differ diff --git a/doc/example/A8_region_exceeds_height-no_maxaddress_set.md b/doc/example/A8_region_exceeds_height-no_maxaddress_set.md index f53be07..f815a08 100644 --- a/doc/example/A8_region_exceeds_height-no_maxaddress_set.md +++ b/doc/example/A8_region_exceeds_height-no_maxaddress_set.md @@ -1,9 +1,9 @@ ![memory map diagram](A8_region_exceeds_height-no_maxaddress_set_diagram.png) |region (parent)|origin|size|free Space|collisions|links|draw scale| |:-|:-|:-|:-|:-|:-|:-| -|OCM (Global System Address Map)|0x7e0 (2016)|0x7d0 (2000)|-0xc46 (-3142)| end @ 0x36a ||5:1| -|DDR Memory Controller (Global System Address Map)|0x10 (16)|0x3e8 (1000)|-0x8e (-142)| end @ 0x36a ||5:1| -|Boot Image (Flash)|0x0 (0)|0xffffff (16777215)|-0xfffc95 (-16776341)| end @ 0x36a ||19196:1| +|OCM (Global System Address Map)|0x7e0 (2016)|0x7d0 (2000)|-0xc46 (-3142)| end @ 0x36a ||5:1| +|DDR Memory Controller (Global System Address Map)|0x10 (16)|0x3e8 (1000)|-0x8e (-142)| end @ 0x36a ||5:1| +|Boot Image (Flash)|0x0 (0)|0xffffff (16777215)|-0xfffc95 (-16776341)| end @ 0x36a ||19196:1| --- #### Global System Address Map: diff --git a/doc/example/A8_region_exceeds_height-no_maxaddress_set_diagram.png b/doc/example/A8_region_exceeds_height-no_maxaddress_set_diagram.png index be02458..123230e 100644 Binary files a/doc/example/A8_region_exceeds_height-no_maxaddress_set_diagram.png and b/doc/example/A8_region_exceeds_height-no_maxaddress_set_diagram.png differ diff --git a/doc/example/A8_region_freespace_exceeds_height-higher_maxaddress_set.md b/doc/example/A8_region_freespace_exceeds_height-higher_maxaddress_set.md index 01343d8..83ec2f0 100644 --- a/doc/example/A8_region_freespace_exceeds_height-higher_maxaddress_set.md +++ b/doc/example/A8_region_freespace_exceeds_height-higher_maxaddress_set.md @@ -1,9 +1,9 @@ ![memory map diagram](A8_region_freespace_exceeds_height-higher_maxaddress_set_diagram.png) |region (parent)|origin|size|free Space|collisions|links|draw scale| |:-|:-|:-|:-|:-|:-|:-| -|OCM (Global System Address Map)|0x7e0 (2016)|0x7d0 (2000)|0xfffff04f (4294963279)|||5:1| -|DDR Memory Controller (Global System Address Map)|0x10 (16)|0x3e8 (1000)|0x3e8 (1000)|||5:1| -|Boot Image (Flash)|0x0 (0)|0xffffff (16777215)|0xff000000 (4278190080)|||20112:1| +|OCM (Global System Address Map)|0x7e0 (2016)|0x7d0 (2000)|0xfffff04f (4294963279)|||5:1| +|DDR Memory Controller (Global System Address Map)|0x10 (16)|0x3e8 (1000)|0x3e8 (1000)|||5:1| +|Boot Image (Flash)|0x0 (0)|0xffffff (16777215)|0xff000000 (4278190080)|||20112:1| --- #### Global System Address Map: diff --git a/doc/example/A8_region_freespace_exceeds_height-higher_maxaddress_set_diagram.png b/doc/example/A8_region_freespace_exceeds_height-higher_maxaddress_set_diagram.png index 889bd40..fe164b5 100644 Binary files a/doc/example/A8_region_freespace_exceeds_height-higher_maxaddress_set_diagram.png and b/doc/example/A8_region_freespace_exceeds_height-higher_maxaddress_set_diagram.png differ diff --git a/doc/example/example_collisions.md b/doc/example/example_collisions.md index 9a3a96d..65ff36e 100644 --- a/doc/example/example_collisions.md +++ b/doc/example/example_collisions.md @@ -1,9 +1,9 @@ ![memory map diagram](example_collisions_diagram.png) |region (parent)|origin|size|free Space|collisions|links|draw scale| |:-|:-|:-|:-|:-|:-|:-| -|dtb (Untitled)|0x90 (144)|0x30 (48)|0x2aa (682)| rootfs @ 0x90 ||1:1| -|rootfs (Untitled)|0x50 (80)|0x50 (80)|-0x10 (-16)| kernel @ 0x50
dtb @ 0x90 ||1:1| -|kernel (Untitled)|0x10 (16)|0x60 (96)|-0x20 (-32)| rootfs @ 0x50 ||1:1| +|dtb (Untitled)|0x90 (144)|0x30 (48)|0x2aa (682)| rootfs @ 0x90 ||1:1| +|rootfs (Untitled)|0x50 (80)|0x50 (80)|-0x10 (-16)| kernel @ 0x50
dtb @ 0x90 ||1:1| +|kernel (Untitled)|0x10 (16)|0x60 (96)|-0x20 (-32)| rootfs @ 0x50 ||1:1| --- #### Untitled: diff --git a/doc/example/example_collisions_diagram.png b/doc/example/example_collisions_diagram.png index 160fe5a..5e3ab61 100644 Binary files a/doc/example/example_collisions_diagram.png and b/doc/example/example_collisions_diagram.png differ diff --git a/doc/example/example_normal.md b/doc/example/example_normal.md index 03fe959..c61edb7 100644 --- a/doc/example/example_normal.md +++ b/doc/example/example_normal.md @@ -1,9 +1,9 @@ ![memory map diagram](example_normal_diagram.png) |region (parent)|origin|size|free Space|collisions|links|draw scale| |:-|:-|:-|:-|:-|:-|:-| -|dtb (Untitled)|0x190 (400)|0x30 (48)|0x1aa (426)|||1:1| -|rootfs (Untitled)|0x50 (80)|0x30 (48)|0x110 (272)|||1:1| -|kernel (Untitled)|0x10 (16)|0x30 (48)|0x10 (16)|||1:1| +|dtb (Untitled)|0x190 (400)|0x30 (48)|0x1aa (426)|||1:1| +|rootfs (Untitled)|0x50 (80)|0x30 (48)|0x110 (272)|||1:1| +|kernel (Untitled)|0x10 (16)|0x30 (48)|0x10 (16)|||1:1| --- #### Untitled: diff --git a/doc/example/example_normal_diagram.png b/doc/example/example_normal_diagram.png index 11b7844..21c0f98 100644 Binary files a/doc/example/example_normal_diagram.png and b/doc/example/example_normal_diagram.png differ diff --git a/doc/example/example_three_maps.md b/doc/example/example_three_maps.md index 439946c..61bbb3b 100644 --- a/doc/example/example_three_maps.md +++ b/doc/example/example_three_maps.md @@ -1,13 +1,13 @@ ![memory map diagram](example_three_maps_diagram.png) |region (parent)|origin|size|free Space|collisions|links|draw scale| |:-|:-|:-|:-|:-|:-|:-| -|Blob5 (DRAM)|0x78 (120)|0x20 (32)|0x2d2 (722)|||1:1| -|Blob3 (DRAM)|0x50 (80)|0x20 (32)|0x8 (8)|||1:1| -|Blob7 (flash)|0x50 (80)|0x20 (32)|0x2fa (762)||('DRAM', 'Blob3')
('DRAM', 'Blob5')|1:1| -|Blob4 (DRAM)|0x28 (40)|0x20 (32)|0x8 (8)|||1:1| -|Blob6 (flash)|0xa (10)|0x3c (60)|0xa (10)|||1:1| -|Blob1 (eMMC)|0x0 (0)|0x20 (32)|0x34a (842)||('DRAM', 'Blob2')
('DRAM', 'Blob4')|1:1| -|Blob2 (DRAM)|0x0 (0)|0x20 (32)|0x8 (8)|||1:1| +|Blob5 (DRAM)|0x78 (120)|0x20 (32)|0x2d2 (722)|||1:1| +|Blob3 (DRAM)|0x50 (80)|0x20 (32)|0x8 (8)|||1:1| +|Blob7 (flash)|0x50 (80)|0x20 (32)|0x2fa (762)||('DRAM', 'Blob3')
('DRAM', 'Blob5')|1:1| +|Blob4 (DRAM)|0x28 (40)|0x20 (32)|0x8 (8)|||1:1| +|Blob6 (flash)|0xa (10)|0x3c (60)|0xa (10)|||1:1| +|Blob1 (eMMC)|0x0 (0)|0x20 (32)|0x34a (842)||('DRAM', 'Blob2')
('DRAM', 'Blob4')|1:1| +|Blob2 (DRAM)|0x0 (0)|0x20 (32)|0x8 (8)|||1:1| --- #### eMMC: diff --git a/doc/example/example_three_maps_diagram.png b/doc/example/example_three_maps_diagram.png index 1f2d9a5..994c33c 100644 Binary files a/doc/example/example_three_maps_diagram.png and b/doc/example/example_three_maps_diagram.png differ diff --git a/doc/example/example_two_maps.md b/doc/example/example_two_maps.md index d81c3d3..b8fdf14 100644 --- a/doc/example/example_two_maps.md +++ b/doc/example/example_two_maps.md @@ -1,11 +1,11 @@ ![memory map diagram](example_two_maps_diagram.png) |region (parent)|origin|size|free Space|collisions|links|draw scale| |:-|:-|:-|:-|:-|:-|:-| -|Blob4 (eMMC)|0x100 (256)|0x10 (16)|0x25a (602)|||1:1| -|Blob3 (DRAM)|0x50 (80)|0x10 (16)|0x30a (778)|||1:1| -|Blob5 (DRAM)|0x30 (48)|0x10 (16)|0x10 (16)|||1:1| -|Blob1 (eMMC)|0x10 (16)|0x10 (16)|0xe0 (224)||('DRAM', 'Blob2')
('DRAM', 'Blob3')|1:1| -|Blob2 (DRAM)|0x10 (16)|0x10 (16)|0x10 (16)|||1:1| +|Blob4 (eMMC)|0x100 (256)|0x10 (16)|0x25a (602)|||1:1| +|Blob3 (DRAM)|0x50 (80)|0x10 (16)|0x30a (778)|||1:1| +|Blob5 (DRAM)|0x30 (48)|0x10 (16)|0x10 (16)|||1:1| +|Blob1 (eMMC)|0x10 (16)|0x10 (16)|0xe0 (224)||('DRAM', 'Blob2')
('DRAM', 'Blob3')|1:1| +|Blob2 (DRAM)|0x10 (16)|0x10 (16)|0x10 (16)|||1:1| --- #### eMMC: diff --git a/doc/example/example_two_maps_diagram.png b/doc/example/example_two_maps_diagram.png index f090544..21ca394 100644 Binary files a/doc/example/example_two_maps_diagram.png and b/doc/example/example_two_maps_diagram.png differ diff --git a/mm/diagram.py b/mm/diagram.py index c73a665..11fa40a 100644 --- a/mm/diagram.py +++ b/mm/diagram.py @@ -41,6 +41,22 @@ class APageSize(NamedTuple): handler.setFormatter(formatter) root.addHandler(handler) + +class LockableDictOfLists(collections.defaultdict): + def __init__(self): + self.__lock = False + super(LockableDictOfLists, self).__init__(list,) + + def lock(self): + """No more keys can be created.""" + self.__lock = True + + def __setitem__(self, __key: any, __value: any) -> None: + if self.__lock: + logging.warning("You were prevented from trying to update a locked dict!") + return + return super().__setitem__(__key, __value) + @typeguard.typechecked class MemoryMapDiagram: @@ -192,7 +208,7 @@ def _create_mmap(self, only_memregion_list: List[mm.image.MemoryRegionImage], dr Then draw the regions onto a larger memory map image. """ mixed_region_dict_idx = 0 - self.mixed_region_dict: DefaultDict = collections.defaultdict(list) + self.mixed_region_dict: LockableDictOfLists = LockableDictOfLists() for memregion in only_memregion_list: # start adding memregions to the current subgroup... @@ -205,6 +221,9 @@ def _create_mmap(self, only_memregion_list: List[mm.image.MemoryRegionImage], dr # then increment again, ready for next memregion subgroup mixed_region_dict_idx = mixed_region_dict_idx + 1 + + self.mixed_region_dict.lock() + map_img = PIL.Image.new( "RGBA", (self.width, self.height), diff --git a/test.ipynb b/test.ipynb index 44bf380..9e0c7b4 100644 --- a/test.ipynb +++ b/test.ipynb @@ -89,6 +89,72 @@ "re.sub(r'-(?![0-9])', '', s)" ] }, + { + "cell_type": "code", + "execution_count": 61, + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "[]\n", + "[10]\n", + "[10, 11]\n", + "[]\n", + "[21]\n", + "[]\n", + "[30]\n", + "[30, 31]\n", + "[30, 31, 32]\n", + "[30, 31, 32, 33]\n", + "[]\n", + "[30, 31, 32, 33, 34]\n", + "LockableDictList(, {1: [10, 11, 12], 2: [21, 22], 3: [30, 31, 32, 33, 34, 666]})\n" + ] + } + ], + "source": [ + "import collections \n", + "\n", + "class LockableDictList(collections.defaultdict):\n", + " def __init__(self):\n", + " self._lock = False\n", + " super(LockableDictList, self).__init__(list,)\n", + "\n", + " def lock(self):\n", + " self._lock = True\n", + " \n", + " def __setitem__(self, __key: any, __value: any) -> None:\n", + " if self._lock:\n", + " return\n", + " return super().__setitem__(__key, __value)\n", + " \n", + "d = LockableDictList()\n", + "\n", + "d[1].append(10)\n", + "d[1].append(11)\n", + "d[1].append(12)\n", + "\n", + "d[2].append(21)\n", + "d[2].append(22)\n", + "\n", + "d[3].append(30)\n", + "d[3].append(31)\n", + "d[3].append(32)\n", + "d[3].append(33)\n", + "d[3].append(34)\n", + "\n", + "d.lock()\n", + "\n", + "d[4].append(4)\n", + "d[3].append(666)\n", + "\n", + "\n", + "\n", + "print(d)" + ] + }, { "cell_type": "code", "execution_count": 66, diff --git a/tests/test_lockabledict.py b/tests/test_lockabledict.py new file mode 100644 index 0000000..3c708db --- /dev/null +++ b/tests/test_lockabledict.py @@ -0,0 +1,33 @@ + +import unittest +import mm.diagram +import logging + +def test_void_no_new_keys(caplog): + """ Same as 'test_void_region_cli_A5_no_voids' but with json file input""" + + with unittest.mock.patch( + "sys.argv", + [ + "mm.diagram", + "kernel", "0x10", "0x30", + "rootfs", "0x50", "0x30", + "dtb", "0x190", "0x30", + "--limit", hex(1000), + "--threshold", hex(1000), + + ], + ): + + d = mm.diagram.Diagram() + + assert len(d.mmd_list[0].mixed_region_dict) == 1 + + assert all(isinstance(x, mm.image.MemoryRegionImage) for x in d.mmd_list[0].mixed_region_dict[0]) + + with caplog.at_level(logging.WARNING): + # make sure you can't add more keys once diagram.py has called lock() + all(isinstance(x, mm.image.VoidRegionImage) for x in d.mmd_list[0].mixed_region_dict[1]) + assert "You were prevented from trying to update a locked dict!" in caplog.text + + assert len(d.mmd_list[0].mixed_region_dict) == 1 \ No newline at end of file diff --git a/tests/test_void_regions.py b/tests/test_void_regions.py index bc4e157..d8e773e 100644 --- a/tests/test_void_regions.py +++ b/tests/test_void_regions.py @@ -7,6 +7,7 @@ import json from tests.common_fixtures import file_setup, input from typing import List +import logging @pytest.mark.parametrize("file_setup", [{"file_path": "out/tmp/void_region_cli_defaults"}], indirect=True) def test_void_region_cli_defaults(file_setup): @@ -157,7 +158,7 @@ def test_void_region_cli_A5_no_voids(file_setup): @pytest.mark.parametrize("file_setup", [{"file_path": "out/tmp/void_region_uservalue_file_no_voids"}], indirect=True) -def test_void_region_uservalue_file_no_voids(file_setup, input): +def test_void_region_uservalue_file_no_voids(file_setup, input, caplog): """ Same as 'test_void_region_cli_A5_no_voids' but with json file input""" input_file = pathlib.Path("./out/tmp/void_region_uservalue_file_no_voids.json")