Commit 6a274cb
committed
host_sp_comms: add low-level "debug" interface
When debugging recent IPCC problems, it would have been very useful to
have a low-level "debug" interface for sending traffic between host and
SP so that we could probe the issues in question on a bench machine.
I hacked something for this by overloading an IPCC transaction that
wasn't used on the machine I wanted to test on, which was enormously
impactful, as it exposed a quartz problem in the FPGA that Nathanael was
able to fix quickly. But it was obviously a hack, and moreoever, since
it was tied to IPCC (and IPCC was considered suspect at the time), using
it felt like a bit of a gamble.
Having a dedicated debugging interface that is below the level of IPCC,
and not complected with COBS encoding, Hubpack, and so on, would be
generally useful. This is the Hubris side of that: I've implemented a
parallel protocol for supporting three simple debug messages:
1. A discard message: this simply throws away what is sent to it, with
the side effect of emitting a message into a ring buffer.
2. An echo message: this echos the data sent to it back to the distant
end, and produces a ring buffer entry.
3. A "chargen" message: this causes $n$ bytes from a repeating pattern
of printable ASCII characters to be back to the host, limited by the
number requested and size of the output buffer.
Since the IPCC header and magic number are fixed, debug messages are
easily distinguishable from normal IPCC messages by looking for a prefix
string in a received "frame" from the host: the two can never collide.1 parent 7ecfd02 commit 6a274cb
4 files changed
+146
-5
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
256 | 256 | | |
257 | 257 | | |
258 | 258 | | |
259 | | - | |
| 259 | + | |
260 | 260 | | |
261 | 261 | | |
262 | 262 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
242 | 242 | | |
243 | 243 | | |
244 | 244 | | |
245 | | - | |
| 245 | + | |
246 | 246 | | |
247 | 247 | | |
248 | 248 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
104 | 104 | | |
105 | 105 | | |
106 | 106 | | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
107 | 117 | | |
108 | 118 | | |
109 | 119 | | |
110 | 120 | | |
111 | 121 | | |
112 | 122 | | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
113 | 126 | | |
114 | 127 | | |
115 | 128 | | |
| |||
786 | 799 | | |
787 | 800 | | |
788 | 801 | | |
| 802 | + | |
| 803 | + | |
| 804 | + | |
| 805 | + | |
| 806 | + | |
| 807 | + | |
| 808 | + | |
| 809 | + | |
| 810 | + | |
| 811 | + | |
| 812 | + | |
| 813 | + | |
| 814 | + | |
| 815 | + | |
| 816 | + | |
| 817 | + | |
| 818 | + | |
| 819 | + | |
| 820 | + | |
| 821 | + | |
| 822 | + | |
| 823 | + | |
| 824 | + | |
| 825 | + | |
| 826 | + | |
| 827 | + | |
| 828 | + | |
| 829 | + | |
| 830 | + | |
| 831 | + | |
| 832 | + | |
| 833 | + | |
| 834 | + | |
| 835 | + | |
| 836 | + | |
| 837 | + | |
| 838 | + | |
| 839 | + | |
| 840 | + | |
| 841 | + | |
| 842 | + | |
| 843 | + | |
| 844 | + | |
| 845 | + | |
| 846 | + | |
| 847 | + | |
| 848 | + | |
| 849 | + | |
| 850 | + | |
| 851 | + | |
789 | 852 | | |
790 | 853 | | |
791 | 854 | | |
| |||
800 | 863 | | |
801 | 864 | | |
802 | 865 | | |
803 | | - | |
| 866 | + | |
804 | 867 | | |
805 | 868 | | |
806 | 869 | | |
| 870 | + | |
807 | 871 | | |
808 | 872 | | |
809 | 873 | | |
| |||
1663 | 1727 | | |
1664 | 1728 | | |
1665 | 1729 | | |
1666 | | - | |
1667 | | - | |
| 1730 | + | |
| 1731 | + | |
| 1732 | + | |
1668 | 1733 | | |
1669 | 1734 | | |
1670 | 1735 | | |
| |||
1690 | 1755 | | |
1691 | 1756 | | |
1692 | 1757 | | |
| 1758 | + | |
| 1759 | + | |
| 1760 | + | |
| 1761 | + | |
| 1762 | + | |
| 1763 | + | |
| 1764 | + | |
| 1765 | + | |
| 1766 | + | |
| 1767 | + | |
| 1768 | + | |
| 1769 | + | |
| 1770 | + | |
| 1771 | + | |
| 1772 | + | |
| 1773 | + | |
| 1774 | + | |
| 1775 | + | |
| 1776 | + | |
| 1777 | + | |
| 1778 | + | |
| 1779 | + | |
| 1780 | + | |
| 1781 | + | |
| 1782 | + | |
| 1783 | + | |
| 1784 | + | |
| 1785 | + | |
| 1786 | + | |
| 1787 | + | |
| 1788 | + | |
| 1789 | + | |
| 1790 | + | |
| 1791 | + | |
| 1792 | + | |
| 1793 | + | |
| 1794 | + | |
| 1795 | + | |
| 1796 | + | |
| 1797 | + | |
| 1798 | + | |
| 1799 | + | |
1693 | 1800 | | |
1694 | 1801 | | |
1695 | 1802 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
293 | 293 | | |
294 | 294 | | |
295 | 295 | | |
| 296 | + | |
| 297 | + | |
| 298 | + | |
| 299 | + | |
| 300 | + | |
| 301 | + | |
| 302 | + | |
| 303 | + | |
| 304 | + | |
| 305 | + | |
| 306 | + | |
| 307 | + | |
| 308 | + | |
| 309 | + | |
| 310 | + | |
| 311 | + | |
| 312 | + | |
| 313 | + | |
| 314 | + | |
| 315 | + | |
| 316 | + | |
| 317 | + | |
| 318 | + | |
| 319 | + | |
| 320 | + | |
| 321 | + | |
| 322 | + | |
| 323 | + | |
| 324 | + | |
| 325 | + | |
| 326 | + | |
| 327 | + | |
| 328 | + | |
| 329 | + | |
296 | 330 | | |
297 | 331 | | |
298 | 332 | | |
| |||
0 commit comments