diff options
Diffstat (limited to '')
| -rw-r--r-- | CONTEXT.md | 38 |
1 files changed, 36 insertions, 2 deletions
| @@ -101,10 +101,20 @@ Single Rust crate (`x86_64-unknown-uefi` target). Module breakdown: | |||
| 101 | - `fs.rs` — VFS: dirs, ramfs files, char devices (`/dev/mem`, `rtc`, `pci`, | 101 | - `fs.rs` — VFS: dirs, ramfs files, char devices (`/dev/mem`, `rtc`, `pci`, |
| 102 | `version`, `meminfo`, `null`, `zero`, `console`, `serial`; `/tmp` ramfs; | 102 | `version`, `meminfo`, `null`, `zero`, `console`, `serial`; `/tmp` ramfs; |
| 103 | `/etc/motd`) | 103 | `/etc/motd`) |
| 104 | - `gop.rs` — framebuffer access and text rendering | 104 | - `gop.rs` — framebuffer rasteriser (glyph blits, pixel shifts); the text |
| 105 | surface itself lives in `vt` | ||
| 106 | - `vt.rs` — terminal emulator: cell grid, cursor, ANSI CSI parser (H/J/K, | ||
| 107 | cursor moves, SGR 16-colour, `?25l/h`), dirty-cell blitting | ||
| 108 | - `tty.rs` — line discipline: canonical `read_line` (echo, line buffer, | ||
| 109 | ^C/^D) and raw `read_byte` (terminal byte protocol: arrows → `ESC [ A–D`, | ||
| 110 | ^X → `0x18`, …) | ||
| 111 | - `strbuf.rs` — stack fixed-capacity ASCII string (moved from shell) | ||
| 105 | - `font.rs` — 8×16 bitmap font data | 112 | - `font.rs` — 8×16 bitmap font data |
| 106 | - `ps2.rs` — PS/2 keyboard driver (polling) | 113 | - `ps2.rs` — PS/2 keyboard driver (polling); generic `Ctrl(char)` and |
| 114 | `CtrlArrow` events | ||
| 107 | - `shell.rs` — command loop and built-in commands | 115 | - `shell.rs` — command loop and built-in commands |
| 116 | - `rsdosedit/` — kernel-native port of the RNG `rsedit` terminal editor | ||
| 117 | (no_std; talks to `tty` raw mode + `vt` ANSI; saves via the VFS) | ||
| 108 | 118 | ||
| 109 | ## Milestone status (v0.1) | 119 | ## Milestone status (v0.1) |
| 110 | 120 | ||
| @@ -133,6 +143,30 @@ Single Rust crate (`x86_64-unknown-uefi` target). Module breakdown: | |||
| 133 | ✅ **^C / ^D** — Ctrl+C cancels the line or aborts a running stream | 143 | ✅ **^C / ^D** — Ctrl+C cancels the line or aborts a running stream |
| 134 | (`cat`/`hexdump` check between chunks), Ctrl+D on an empty line | 144 | (`cat`/`hexdump` check between chunks), Ctrl+D on an empty line |
| 135 | powers off (EOF) | 145 | powers off (EOF) |
| 146 | ✅ **tty + vt (terminal) — the 1:1 UNIX console split**: `tty` owns the | ||
| 147 | line discipline (canonical echo/buffer/^C/^D for the shell; raw mode | ||
| 148 | translates keys to the classic terminal byte protocol), `vt` owns the | ||
| 149 | screen (cell grid + ANSI CSI parser + 16-colour SGR + dirty-cell blits | ||
| 150 | into the GOP framebuffer). `gop_println!` etc. now render through `vt`. | ||
| 151 | ✅ **rsdosedit** — the RNG `rsedit` editor ported to the kernel (no_std, | ||
| 152 | no libc): `edit <path>` opens a full-screen editor with undo, syntax | ||
| 153 | highlighting, search (^W), save (^S), exit (^X, twice to discard), word | ||
| 154 | nav (Ctrl+arrows), smart indent. Files live in the ramfs. Termios → | ||
| 155 | `tty` raw mode, stdout → `vt`, `std::fs` → VFS, SIGWINCH → fixed | ||
| 156 | geometry. Verified in QEMU: edit/type/navigate/insert/save/exit, exact | ||
| 157 | bytes via `cat`/`hexdump`, syntax colours via framebuffer dump. | ||
| 158 | |||
| 159 | ## Known issues / perf notes | ||
| 160 | |||
| 161 | - **Scroll is slow under QEMU without KVM**: each scroll shifts the whole | ||
| 162 | framebuffer up (~3 MB copy at 1280×800) with TCG-emulated stores. | ||
| 163 | Deferred optimisation: ring-buffer rows / deferred pan so scrolling | ||
| 164 | never touches the whole framebuffer. The vt's cell grid already avoids | ||
| 165 | re-rasterising on scroll (only the exposed bottom row is blitted). | ||
| 166 | - **Editor redraw** re-blits changed cells per keystroke (fine at 1280×800); | ||
| 167 | the "optimize drawing someday" item. | ||
| 168 | - **ramfs only**: edited files live in memory, lost on reboot until disk | ||
| 169 | support (AHCI/FAT32) lands. | ||
| 136 | 170 | ||
| 137 | ## Target audience | 171 | ## Target audience |
| 138 | 172 | ||
