summaryrefslogtreecommitdiff
path: root/src/pardes.zig
diff options
context:
space:
mode:
Diffstat (limited to 'src/pardes.zig')
-rw-r--r--src/pardes.zig72
1 files changed, 32 insertions, 40 deletions
diff --git a/src/pardes.zig b/src/pardes.zig
index 8d68cf22..691ee345 100644
--- a/src/pardes.zig
+++ b/src/pardes.zig
@@ -5747,50 +5747,42 @@ pub const Pardes = struct {
// the honest description of a buffer on a board with no filesystem.
// AND IT BOOTS WITH SOMETHING IN IT. An empty buffer is honest and useless: the three
// words that make this board interesting take an address, and a board's address space is
- // precisely the thing you cannot guess. So the boot buffer is a tour of it - every
- // address below comes from this repository rather than from memory, which is why they are
- // worth trusting: the two flash figures and the two RAM ones are the linker script's own
- // ORIGINs (`05-zig-p4/build.zig`'s MEMORY block), and the peripheral bases are
- // `DR_REG_*` from ESP-IDF's headers as `05-zig-p4/src/hal` uses them.
+ // precisely the thing you cannot guess.
//
- // Each command sits alone on its line because an argument list ends at the last argument:
- // a trailing comment would be `ExtraArgument`, so the notes go above the lines they
- // describe. Run one by putting the cursor on it, `x` to select the line, Tab to execute -
- // the same two keystrokes as any other selection, because an output buffer is a file pane
- // and these are ordinary words.
+ // SHORT, because the window is fourteen rows. The first draft opened with four lines of
+ // prose about there being no operating system, which is true, unhelpful, and cost a
+ // third of the screen before the first command. One header line earns its place; the
+ // rest of the screen is addresses.
+ //
+ // Each command sits alone on its line because an argument list ends at the last argument
+ // - a trailing comment would be `ExtraArgument` - so the labels go above. Every address
+ // is from this repository or from a session that read it on this die: the flash and RAM
+ // figures are the linker script's own ORIGINs (`05-zig-p4/build.zig`), the peripheral
+ // bases are the `DR_REG_*` values `05-zig-p4/src/hal` uses, and the two LP addresses at
+ // the end are named in ESP-IDF's own headers: 0x5011002c is LP_SYSTEM_REG_LP_STORE0, a
+ // general-purpose retention register that holds what you put in it, and 0x501101a4 is
+ // LP_SYSTEM_REG_RNG_DATA, the hardware random generator. Between them they demonstrate
+ // the whole point of a volatile read: one address gives back what was written and the
+ // other never gives the same answer twice. Both verified on this die.
const content = try p.gpa.dupe(u8,
- \\pardes on an ESP32-P4. No OS, no filesystem:
- \\this buffer is text with nothing behind it.
- \\Peek, Poke and Hexdump read the bus itself.
- \\Numbers are hex, with or without 0x.
- \\
- \\Select a line with x, then Tab to run it.
- \\
- \\-- this image in flash: rodata, then code
- \\Hexdump 40000020 60
- \\Hexdump 40050000 60
- \\
- \\-- L2MEM: firmware data, then editor heap
- \\Hexdump 4ff00000 60
- \\Hexdump 4ff40000 60
+ \\x selects a line, Tab runs it. Hex, 0x optional.
\\
- \\-- the mask ROM, where ets_printf lives
- \\Hexdump 4fc00000 40
- \\
- \\-- UART0: the console you are reading on
+ \\-- flash: this image's rodata, then its code
+ \\Hexdump 40000020 40
+ \\Hexdump 40050000 40
+ \\-- L2MEM: firmware data, then the editor's heap
+ \\Hexdump 4ff00000 40
+ \\Hexdump 4ff40000 40
+ \\-- the mask ROM
+ \\Hexdump 4fc00000 20
+ \\-- UART0, the console you are reading this on
\\Peek 500ca000 4
- \\
- \\-- systimer. Run twice: a register is not
- \\-- memory, and the two reads differ.
- \\Peek 500e2000 4
- \\
- \\-- GPIO_OUT, and pad 0's IO_MUX entry
- \\Peek 500e0004
- \\Peek 500e1004
- \\
- \\-- Poke needs a value. Harmless: a W1TC
- \\-- register clears nothing given no bits.
- \\Poke 500e000c 0
+ \\-- LP_STORE0: write a word, then read it back
+ \\Poke 5011002c deadbeef
+ \\Peek 5011002c
+ \\-- RNG_DATA: a register is not memory. Run twice.
+ \\Peek 501101a4
+ \\Peek 501101a4
);
errdefer p.gpa.free(content);
_ = try output_pane.open(p, 0, "", .{ .cmd = .New }, "", content);