summaryrefslogtreecommitdiff
path: root/cmd/sbc_harness/static/Documentation/harness_flash_bin.txt
diff options
context:
space:
mode:
Diffstat (limited to 'cmd/sbc_harness/static/Documentation/harness_flash_bin.txt')
-rw-r--r--cmd/sbc_harness/static/Documentation/harness_flash_bin.txt33
1 files changed, 33 insertions, 0 deletions
diff --git a/cmd/sbc_harness/static/Documentation/harness_flash_bin.txt b/cmd/sbc_harness/static/Documentation/harness_flash_bin.txt
new file mode 100644
index 0000000..115f2ee
--- /dev/null
+++ b/cmd/sbc_harness/static/Documentation/harness_flash_bin.txt
@@ -0,0 +1,33 @@
+NAME
+ /harness/flash.bin
+
+DESCRIPTION
+ Access to the flash storage chip (where the harness firmware
+ is stored).
+
+ Any number of readers may read the flash contents.
+
+ Only one writer can have the file open at a time; once the
+ file is closed, the harness reboots into the new firmware.
+ Writes to the top half of the chip will fail.
+
+BUGS
+ - The size of the chip is configured at compile-time. If the
+ firmware is loaded onto hardware with a larger flash chip
+ than it was compiled for, then the upper part of the chip
+ will not be accessible with this file. If the firmware is
+ loaded onto hardware with a smaller flash chip than it was
+ compiled for, then accessing the missing upper part of the
+ chip will crash.
+
+ - When writing to the flash using this file, only half of the
+ chip capacity is usable; the top half and bottom half are
+ mirrors of each-other. This is to avoid the firmware
+ crashing as its program text is overwritten; the firmware is
+ executing out of the bottom half, and writing to the top
+ half; once the file is closed, a minimal in-RAM function
+ copies the top half to the bottom half and reboots.
+
+AUTHOR
+ Copyright (C) 2025 Luke T. Shumaker <lukeshu@lukeshu.com>
+ SPDX-License-Identifier: AGPL-3.0-or-later