From a9f426292c4b0e3bf84f148ba34d574feec21819 Mon Sep 17 00:00:00 2001 From: Jonathan Herrewijnen Date: Tue, 27 Aug 2024 20:16:45 +0200 Subject: [PATCH] Reversing draw order of boot diagram --- documentation/source/_ignore/draw_boot.ipynb | 625 ++++++++++++------ .../source/_ignore/stack_and_functions.csv | 5 +- 2 files changed, 431 insertions(+), 199 deletions(-) diff --git a/documentation/source/_ignore/draw_boot.ipynb b/documentation/source/_ignore/draw_boot.ipynb index 68d8370..0d8cc14 100644 --- a/documentation/source/_ignore/draw_boot.ipynb +++ b/documentation/source/_ignore/draw_boot.ipynb @@ -2,7 +2,7 @@ "cells": [ { "cell_type": "code", - "execution_count": 371, + "execution_count": 416, "metadata": {}, "outputs": [], "source": [ @@ -20,7 +20,7 @@ }, { "cell_type": "code", - "execution_count": 372, + "execution_count": 417, "metadata": {}, "outputs": [ { @@ -101,6 +101,17 @@ " \n", " \n", " 4\n", + " 33660508\n", + " 33689180\n", + " Tried debugger space\n", + " NaN\n", + " NaN\n", + " 28672\n", + " False\n", + " 4.0\n", + " \n", + " \n", + " 5\n", " 33689440\n", " 33689448\n", " _boot_usb_ra\n", @@ -108,10 +119,10 @@ " NaN\n", " 8\n", " False\n", - " 4.0\n", + " 5.0\n", " \n", " \n", - " 5\n", + " 6\n", " 33693696\n", " 33701888\n", " BL1\n", @@ -119,10 +130,10 @@ " NaN\n", " 8192\n", " False\n", - " 5.0\n", + " 6.0\n", " \n", " \n", - " 6\n", + " 7\n", " 33701888\n", " 33849344\n", " BL31\n", @@ -130,10 +141,10 @@ " NaN\n", " 147456\n", " False\n", - " 6.0\n", + " 7.0\n", " \n", " \n", - " 7\n", + " 8\n", " 33849344\n", " 34008336\n", " BL2\n", @@ -141,10 +152,10 @@ " NaN\n", " 158992\n", " True\n", - " 7.0\n", + " 8.0\n", " \n", " \n", - " 8\n", + " 9\n", " 33984512\n", " 34009088\n", " Debugger\n", @@ -152,21 +163,21 @@ " NaN\n", " 24576\n", " True\n", - " 7.0\n", - " \n", - " \n", - " 9\n", - " 34008336\n", - " 34013184\n", - " End of readable memory space in buffer\n", - " NaN\n", - " NaN\n", - " 4848\n", - " True\n", " 8.0\n", " \n", " \n", " 10\n", + " 34008336\n", + " 34013184\n", + " End/Start peripheral space?\n", + " NaN\n", + " NaN\n", + " 4848\n", + " True\n", + " 9.0\n", + " \n", + " \n", + " 11\n", " 34340864\n", " 34369536\n", " Debugger relocated\n", @@ -174,10 +185,10 @@ " NaN\n", " 28672\n", " True\n", - " 10.0\n", + " 11.0\n", " \n", " \n", - " 11\n", + " 12\n", " 34340864\n", " 34340868\n", " _frederic_dest_ptr\n", @@ -185,43 +196,71 @@ " NaN\n", " 4\n", " True\n", - " 10.0\n", + " 11.0\n", + " \n", + " \n", + " 13\n", + " 34371584\n", + " 34373632\n", + " modem_interface\n", + " NaN\n", + " NaN\n", + " 2048\n", + " False\n", + " 13.0\n", + " \n", + " \n", + " 14\n", + " 346816512\n", + " 346836992\n", + " mali@14AC0000\n", + " NaN\n", + " NaN\n", + " 20480\n", + " False\n", + " 14.0\n", " \n", " \n", "\n", "" ], "text/plain": [ - " start end name order \\\n", - "0 0 131072 BootROM NaN \n", - "1 704 708 _jump_bl1 NaN \n", - "2 25824 25996 _boot_usb NaN \n", - "3 75848 76008 auth_bl1 NaN \n", - "4 33689440 33689448 _boot_usb_ra NaN \n", - "5 33693696 33701888 BL1 NaN \n", - "6 33701888 33849344 BL31 NaN \n", - "7 33849344 34008336 BL2 NaN \n", - "8 33984512 34009088 Debugger NaN \n", - "9 34008336 34013184 End of readable memory space in buffer NaN \n", - "10 34340864 34369536 Debugger relocated NaN \n", - "11 34340864 34340868 _frederic_dest_ptr NaN \n", + " start end name order comment size \\\n", + "0 0 131072 BootROM NaN NaN 131072 \n", + "1 704 708 _jump_bl1 NaN NaN 4 \n", + "2 25824 25996 _boot_usb NaN NaN 172 \n", + "3 75848 76008 auth_bl1 NaN NaN 160 \n", + "4 33660508 33689180 Tried debugger space NaN NaN 28672 \n", + "5 33689440 33689448 _boot_usb_ra NaN NaN 8 \n", + "6 33693696 33701888 BL1 NaN NaN 8192 \n", + "7 33701888 33849344 BL31 NaN NaN 147456 \n", + "8 33849344 34008336 BL2 NaN NaN 158992 \n", + "9 33984512 34009088 Debugger NaN NaN 24576 \n", + "10 34008336 34013184 End/Start peripheral space? NaN NaN 4848 \n", + "11 34340864 34369536 Debugger relocated NaN NaN 28672 \n", + "12 34340864 34340868 _frederic_dest_ptr NaN NaN 4 \n", + "13 34371584 34373632 modem_interface NaN NaN 2048 \n", + "14 346816512 346836992 mali@14AC0000 NaN NaN 20480 \n", "\n", - " comment size overlap overlap_with \n", - "0 NaN 131072 True 0.0 \n", - "1 NaN 4 True 0.0 \n", - "2 NaN 172 True 0.0 \n", - "3 NaN 160 True 0.0 \n", - "4 NaN 8 False 4.0 \n", - "5 NaN 8192 False 5.0 \n", - "6 NaN 147456 False 6.0 \n", - "7 NaN 158992 True 7.0 \n", - "8 NaN 24576 True 7.0 \n", - "9 NaN 4848 True 8.0 \n", - "10 NaN 28672 True 10.0 \n", - "11 NaN 4 True 10.0 " + " overlap overlap_with \n", + "0 True 0.0 \n", + "1 True 0.0 \n", + "2 True 0.0 \n", + "3 True 0.0 \n", + "4 False 4.0 \n", + "5 False 5.0 \n", + "6 False 6.0 \n", + "7 False 7.0 \n", + "8 True 8.0 \n", + "9 True 8.0 \n", + "10 True 9.0 \n", + "11 True 11.0 \n", + "12 True 11.0 \n", + "13 False 13.0 \n", + "14 False 14.0 " ] }, - "execution_count": 372, + "execution_count": 417, "metadata": {}, "output_type": "execute_result" } @@ -245,6 +284,8 @@ "\n", "data.sort_values(by=['size'], inplace=True, ascending=False)\n", "data.sort_values(by=['start'], inplace=True)\n", + "\n", + "# Inverse the order of the data\n", "data.reset_index(drop=True, inplace=True)\n", "\n", "data['overlap'] = False\n", @@ -279,7 +320,7 @@ }, { "cell_type": "code", - "execution_count": 373, + "execution_count": 418, "metadata": {}, "outputs": [ { @@ -291,7 +332,7 @@ "data": [ { "marker": { - "color": "#856446" + "color": "#c574e6" }, "mode": "text", "name": "BootROM", @@ -307,7 +348,7 @@ }, { "marker": { - "color": "#856446" + "color": "#c574e6" }, "mode": "text", "showlegend": false, @@ -323,7 +364,7 @@ }, { "marker": { - "color": "#856446" + "color": "#c574e6" }, "mode": "text", "showlegend": false, @@ -339,7 +380,7 @@ }, { "marker": { - "color": "#82f92f" + "color": "#094b47" }, "mode": "text", "name": "_jump_bl1", @@ -355,7 +396,7 @@ }, { "marker": { - "color": "#82f92f" + "color": "#094b47" }, "mode": "text", "showlegend": false, @@ -371,7 +412,7 @@ }, { "marker": { - "color": "#82f92f" + "color": "#094b47" }, "mode": "text", "showlegend": false, @@ -387,7 +428,7 @@ }, { "marker": { - "color": "#bd73ad" + "color": "#f3ff4d" }, "mode": "text", "name": "_boot_usb", @@ -403,7 +444,7 @@ }, { "marker": { - "color": "#bd73ad" + "color": "#f3ff4d" }, "mode": "text", "showlegend": false, @@ -419,7 +460,7 @@ }, { "marker": { - "color": "#bd73ad" + "color": "#f3ff4d" }, "mode": "text", "showlegend": false, @@ -435,7 +476,7 @@ }, { "marker": { - "color": "#7e8007" + "color": "#7e3e97" }, "mode": "text", "name": "auth_bl1", @@ -451,7 +492,7 @@ }, { "marker": { - "color": "#7e8007" + "color": "#7e3e97" }, "mode": "text", "showlegend": false, @@ -467,7 +508,7 @@ }, { "marker": { - "color": "#7e8007" + "color": "#7e3e97" }, "mode": "text", "showlegend": false, @@ -483,11 +524,11 @@ }, { "marker": { - "color": "#7c5233" + "color": "#e36dac" }, "mode": "text", - "name": "_boot_usb_ra", - "text": "_boot_usb_ra", + "name": "Tried debugger space", + "text": "Tried debugger space", "textposition": "middle center", "type": "scatter", "x": [ @@ -499,11 +540,11 @@ }, { "marker": { - "color": "#7c5233" + "color": "#e36dac" }, "mode": "text", "showlegend": false, - "text": "0x2020f68", + "text": "0x2020e5c", "textposition": "middle center", "type": "scatter", "x": [ @@ -515,11 +556,11 @@ }, { "marker": { - "color": "#7c5233" + "color": "#e36dac" }, "mode": "text", "showlegend": false, - "text": "0x2020f60", + "text": "0x2019e5c", "textposition": "middle center", "type": "scatter", "x": [ @@ -531,11 +572,11 @@ }, { "marker": { - "color": "#6f6733" + "color": "#9d6e7f" }, "mode": "text", - "name": "BL1", - "text": "BL1", + "name": "_boot_usb_ra", + "text": "_boot_usb_ra", "textposition": "middle center", "type": "scatter", "x": [ @@ -547,11 +588,11 @@ }, { "marker": { - "color": "#6f6733" + "color": "#9d6e7f" }, "mode": "text", "showlegend": false, - "text": "0x2024000", + "text": "0x2020f68", "textposition": "middle center", "type": "scatter", "x": [ @@ -563,11 +604,11 @@ }, { "marker": { - "color": "#6f6733" + "color": "#9d6e7f" }, "mode": "text", "showlegend": false, - "text": "0x2022000", + "text": "0x2020f60", "textposition": "middle center", "type": "scatter", "x": [ @@ -579,11 +620,11 @@ }, { "marker": { - "color": "#86ce48" + "color": "#48e551" }, "mode": "text", - "name": "BL31", - "text": "BL31", + "name": "BL1", + "text": "BL1", "textposition": "middle center", "type": "scatter", "x": [ @@ -595,11 +636,11 @@ }, { "marker": { - "color": "#86ce48" + "color": "#48e551" }, "mode": "text", "showlegend": false, - "text": "0x2048000", + "text": "0x2024000", "textposition": "middle center", "type": "scatter", "x": [ @@ -611,11 +652,11 @@ }, { "marker": { - "color": "#86ce48" + "color": "#48e551" }, "mode": "text", "showlegend": false, - "text": "0x2024000", + "text": "0x2022000", "textposition": "middle center", "type": "scatter", "x": [ @@ -627,11 +668,11 @@ }, { "marker": { - "color": "#de3ae2" + "color": "#082a5a" }, "mode": "text", - "name": "BL2", - "text": "BL2", + "name": "BL31", + "text": "BL31", "textposition": "middle center", "type": "scatter", "x": [ @@ -643,7 +684,55 @@ }, { "marker": { - "color": "#de3ae2" + "color": "#082a5a" + }, + "mode": "text", + "showlegend": false, + "text": "0x2048000", + "textposition": "middle center", + "type": "scatter", + "x": [ + 1.2400000000000002 + ], + "y": [ + 7.84 + ] + }, + { + "marker": { + "color": "#082a5a" + }, + "mode": "text", + "showlegend": false, + "text": "0x2024000", + "textposition": "middle center", + "type": "scatter", + "x": [ + 1.2400000000000002 + ], + "y": [ + 7.14 + ] + }, + { + "marker": { + "color": "#12adbc" + }, + "mode": "text", + "name": "BL2", + "text": "BL2", + "textposition": "middle center", + "type": "scatter", + "x": [ + 2.5 + ], + "y": [ + 8.5 + ] + }, + { + "marker": { + "color": "#12adbc" }, "mode": "text", "showlegend": false, @@ -654,12 +743,12 @@ 1.1400000000000001 ], "y": [ - 8.34 + 9.34 ] }, { "marker": { - "color": "#de3ae2" + "color": "#12adbc" }, "mode": "text", "showlegend": false, @@ -670,12 +759,12 @@ 1.1400000000000001 ], "y": [ - 7.14 + 8.14 ] }, { "marker": { - "color": "#292d88" + "color": "#afec87" }, "mode": "text", "name": "Debugger", @@ -685,65 +774,17 @@ "x": [ 2.5 ], - "y": [ - 8.52 - ] - }, - { - "marker": { - "color": "#292d88" - }, - "mode": "text", - "showlegend": false, - "text": "0x206f000", - "textposition": "middle center", - "type": "scatter", - "x": [ - 1.2400000000000002 - ], - "y": [ - 8.709999999999999 - ] - }, - { - "marker": { - "color": "#292d88" - }, - "mode": "text", - "showlegend": false, - "text": "0x2069000", - "textposition": "middle center", - "type": "scatter", - "x": [ - 1.2400000000000002 - ], - "y": [ - 8.16 - ] - }, - { - "marker": { - "color": "#5d64be" - }, - "mode": "text", - "name": "End of readable memory space in buffer", - "text": "End of readable memory space in buffer", - "textposition": "middle center", - "type": "scatter", - "x": [ - 2.5 - ], "y": [ 9.52 ] }, { "marker": { - "color": "#5d64be" + "color": "#afec87" }, "mode": "text", "showlegend": false, - "text": "0x2070000", + "text": "0x206f000", "textposition": "middle center", "type": "scatter", "x": [ @@ -755,11 +796,11 @@ }, { "marker": { - "color": "#5d64be" + "color": "#afec87" }, "mode": "text", "showlegend": false, - "text": "0x206ed10", + "text": "0x2069000", "textposition": "middle center", "type": "scatter", "x": [ @@ -771,7 +812,55 @@ }, { "marker": { - "color": "#1db55c" + "color": "#680696" + }, + "mode": "text", + "name": "End/Start peripheral space?", + "text": "End/Start peripheral space?", + "textposition": "middle center", + "type": "scatter", + "x": [ + 2.5 + ], + "y": [ + 10.52 + ] + }, + { + "marker": { + "color": "#680696" + }, + "mode": "text", + "showlegend": false, + "text": "0x2070000", + "textposition": "middle center", + "type": "scatter", + "x": [ + 1.2400000000000002 + ], + "y": [ + 10.709999999999999 + ] + }, + { + "marker": { + "color": "#680696" + }, + "mode": "text", + "showlegend": false, + "text": "0x206ed10", + "textposition": "middle center", + "type": "scatter", + "x": [ + 1.2400000000000002 + ], + "y": [ + 10.16 + ] + }, + { + "marker": { + "color": "#feeb63" }, "mode": "text", "name": "Debugger relocated", @@ -782,12 +871,12 @@ 2.5 ], "y": [ - 10.5 + 11.5 ] }, { "marker": { - "color": "#1db55c" + "color": "#feeb63" }, "mode": "text", "showlegend": false, @@ -798,12 +887,12 @@ 1.1400000000000001 ], "y": [ - 11.84 + 12.84 ] }, { "marker": { - "color": "#1db55c" + "color": "#feeb63" }, "mode": "text", "showlegend": false, @@ -814,12 +903,12 @@ 1.1400000000000001 ], "y": [ - 10.14 + 11.14 ] }, { "marker": { - "color": "#3d7e32" + "color": "#51c421" }, "mode": "text", "name": "_frederic_dest_ptr", @@ -830,12 +919,12 @@ 2.5 ], "y": [ - 11.52 + 12.52 ] }, { "marker": { - "color": "#3d7e32" + "color": "#51c421" }, "mode": "text", "showlegend": false, @@ -846,12 +935,12 @@ 1.2400000000000002 ], "y": [ - 11.709999999999999 + 12.709999999999999 ] }, { "marker": { - "color": "#3d7e32" + "color": "#51c421" }, "mode": "text", "showlegend": false, @@ -862,7 +951,103 @@ 1.2400000000000002 ], "y": [ - 11.16 + 12.16 + ] + }, + { + "marker": { + "color": "#a8b579" + }, + "mode": "text", + "name": "modem_interface", + "text": "modem_interface", + "textposition": "middle center", + "type": "scatter", + "x": [ + 2.5 + ], + "y": [ + 13.5 + ] + }, + { + "marker": { + "color": "#a8b579" + }, + "mode": "text", + "showlegend": false, + "text": "0x20c8000", + "textposition": "middle center", + "type": "scatter", + "x": [ + 1.2400000000000002 + ], + "y": [ + 13.84 + ] + }, + { + "marker": { + "color": "#a8b579" + }, + "mode": "text", + "showlegend": false, + "text": "0x20c7800", + "textposition": "middle center", + "type": "scatter", + "x": [ + 1.2400000000000002 + ], + "y": [ + 13.14 + ] + }, + { + "marker": { + "color": "#521205" + }, + "mode": "text", + "name": "mali@14AC0000", + "text": "mali@14AC0000", + "textposition": "middle center", + "type": "scatter", + "x": [ + 2.5 + ], + "y": [ + 14.5 + ] + }, + { + "marker": { + "color": "#521205" + }, + "mode": "text", + "showlegend": false, + "text": "0x14ac5000", + "textposition": "middle center", + "type": "scatter", + "x": [ + 1.2400000000000002 + ], + "y": [ + 14.84 + ] + }, + { + "marker": { + "color": "#521205" + }, + "mode": "text", + "showlegend": false, + "text": "0x14ac0000", + "textposition": "middle center", + "type": "scatter", + "x": [ + 1.2400000000000002 + ], + "y": [ + 14.14 ] } ], @@ -885,7 +1070,7 @@ }, "shapes": [ { - "fillcolor": "#856446", + "fillcolor": "#c574e6", "layer": "below", "line": { "width": 2 @@ -898,7 +1083,7 @@ "y1": 3.92 }, { - "fillcolor": "#82f92f", + "fillcolor": "#094b47", "layer": "below", "line": { "width": 2 @@ -911,7 +1096,7 @@ "y1": 1.79 }, { - "fillcolor": "#bd73ad", + "fillcolor": "#f3ff4d", "layer": "below", "line": { "width": 2 @@ -924,7 +1109,7 @@ "y1": 2.79 }, { - "fillcolor": "#7e8007", + "fillcolor": "#7e3e97", "layer": "below", "line": { "width": 2 @@ -937,7 +1122,7 @@ "y1": 3.79 }, { - "fillcolor": "#7c5233", + "fillcolor": "#e36dac", "layer": "below", "line": { "width": 2 @@ -950,7 +1135,7 @@ "y1": 4.92 }, { - "fillcolor": "#6f6733", + "fillcolor": "#9d6e7f", "layer": "below", "line": { "width": 2 @@ -963,7 +1148,7 @@ "y1": 5.92 }, { - "fillcolor": "#86ce48", + "fillcolor": "#48e551", "layer": "below", "line": { "width": 2 @@ -976,20 +1161,7 @@ "y1": 6.92 }, { - "fillcolor": "#de3ae2", - "layer": "below", - "line": { - "width": 2 - }, - "opacity": 0.5, - "type": "rect", - "x0": 0.9, - "x1": 4.1, - "y0": 7.08, - "y1": 8.42 - }, - { - "fillcolor": "#292d88", + "fillcolor": "#082a5a", "layer": "below", "line": { "width": 2 @@ -998,11 +1170,24 @@ "type": "rect", "x0": 1, "x1": 4, - "y0": 8.1, - "y1": 8.79 + "y0": 7.08, + "y1": 7.92 }, { - "fillcolor": "#5d64be", + "fillcolor": "#12adbc", + "layer": "below", + "line": { + "width": 2 + }, + "opacity": 0.5, + "type": "rect", + "x0": 0.9, + "x1": 4.1, + "y0": 8.08, + "y1": 9.42 + }, + { + "fillcolor": "#afec87", "layer": "below", "line": { "width": 2 @@ -1015,20 +1200,7 @@ "y1": 9.79 }, { - "fillcolor": "#1db55c", - "layer": "below", - "line": { - "width": 2 - }, - "opacity": 0.5, - "type": "rect", - "x0": 0.9, - "x1": 4.1, - "y0": 10.08, - "y1": 11.92 - }, - { - "fillcolor": "#3d7e32", + "fillcolor": "#680696", "layer": "below", "line": { "width": 2 @@ -1037,8 +1209,60 @@ "type": "rect", "x0": 1, "x1": 4, - "y0": 11.1, - "y1": 11.79 + "y0": 10.1, + "y1": 10.79 + }, + { + "fillcolor": "#feeb63", + "layer": "below", + "line": { + "width": 2 + }, + "opacity": 0.5, + "type": "rect", + "x0": 0.9, + "x1": 4.1, + "y0": 11.08, + "y1": 12.92 + }, + { + "fillcolor": "#51c421", + "layer": "below", + "line": { + "width": 2 + }, + "opacity": 0.5, + "type": "rect", + "x0": 1, + "x1": 4, + "y0": 12.1, + "y1": 12.79 + }, + { + "fillcolor": "#a8b579", + "layer": "below", + "line": { + "width": 2 + }, + "opacity": 0.5, + "type": "rect", + "x0": 1, + "x1": 4, + "y0": 13.08, + "y1": 13.92 + }, + { + "fillcolor": "#521205", + "layer": "below", + "line": { + "width": 2 + }, + "opacity": 0.5, + "type": "rect", + "x0": 1, + "x1": 4, + "y0": 14.08, + "y1": 14.92 } ], "template": { @@ -1875,6 +2099,7 @@ ] }, "yaxis": { + "autorange": "reversed", "gridcolor": "black", "griddash": "longdashdot", "gridwidth": 0, @@ -1892,7 +2117,10 @@ 8, 9, 10, - 11 + 11, + 12, + 13, + 14 ] } } @@ -2031,6 +2259,7 @@ " gridcolor=\"black\",\n", " showgrid=False,\n", " showticklabels=True,\n", + " autorange='reversed',\n", ")\n", "\n", "fig.update_xaxes(\n", diff --git a/documentation/source/_ignore/stack_and_functions.csv b/documentation/source/_ignore/stack_and_functions.csv index eee5c5d..fd87a20 100644 --- a/documentation/source/_ignore/stack_and_functions.csv +++ b/documentation/source/_ignore/stack_and_functions.csv @@ -10,4 +10,7 @@ start,end,name,order,comment 0x02048000,0x0206ed10,BL2,, 0x02069000,0x0206f000,Debugger,, 0x020c0000,0x020c7000,Debugger relocated,, -0x0206ed10,0x02070000,End of readable memory space in buffer,, \ No newline at end of file +0x0206ed10,0x02070000,End/Start peripheral space?,, +0x02019e5c,0x02020e5c,Tried debugger space,, +0x020C7800,0x020C8000,modem_interface,, +0x14AC0000,0x14ac5000,mali@14AC0000 \ No newline at end of file