diff options
| author | salmonik <salmonik@tuta.io> | 2026-07-31 16:31:34 +0200 |
|---|---|---|
| committer | salmonik <salmonik@tuta.io> | 2026-07-31 16:31:34 +0200 |
| commit | 6767d96e8ed5049af7b551b00d6320fbfb5dcd05 (patch) | |
| tree | 118e6b52d75684e52f96b923e773a1100c02c5cb /CONTEXT.md | |
| parent | rtc + pci: CMOS clock with date command, PCI bus enumeration (diff) | |
| download | rs-dos-6767d96e8ed5049af7b551b00d6320fbfb5dcd05.tar.gz rs-dos-6767d96e8ed5049af7b551b00d6320fbfb5dcd05.zip | |
vfs: everything is a file — dirs, ramfs, character devices
- fs.rs: node-table VFS (root /dev /tmp /etc). Regular files are
in-memory ramfs; char devices regenerate content on every read so
'cat /dev/rtc' shows the live time. Nodes are stable handles with
tombstone removal; . and .. path resolution.
- /dev devices: mem (raw physical RAM, offset = address), rtc, pci,
version, meminfo, null, zero, console (write prints to screen+serial),
serial. /etc/motd static file.
- shell: ls, cat, hexdump (hexdump -C style), mkdir, touch, rm; echo
gains '>' overwrite and '>>' append redirection (append bug fixed:
first '>' in '>>' was parsed as overwrite)
- boot: fs init + self-test (create/read/write/remove) before the shell
- QEMU verified: file lifecycle, redirection, console/null writes,
mkdir/touch/rm, hexdump /dev/mem and /tmp/x byte-exact
Diffstat (limited to 'CONTEXT.md')
| -rw-r--r-- | CONTEXT.md | 6 |
1 files changed, 6 insertions, 0 deletions
| @@ -98,6 +98,9 @@ Single Rust crate (`x86_64-unknown-uefi` target). Module breakdown: | |||
| 98 | - `power.rs` — `ResetSystem`-based shutdown, hlt loop fallback | 98 | - `power.rs` — `ResetSystem`-based shutdown, hlt loop fallback |
| 99 | - `rtc.rs` — CMOS/RTC clock (ports 0x70/0x71), BCD/12h normalization | 99 | - `rtc.rs` — CMOS/RTC clock (ports 0x70/0x71), BCD/12h normalization |
| 100 | - `pci.rs` — legacy PCI config space (0xCF8/0xCFC), full enumeration | 100 | - `pci.rs` — legacy PCI config space (0xCF8/0xCFC), full enumeration |
| 101 | - `fs.rs` — VFS: dirs, ramfs files, char devices (`/dev/mem`, `rtc`, `pci`, | ||
| 102 | `version`, `meminfo`, `null`, `zero`, `console`, `serial`; `/tmp` ramfs; | ||
| 103 | `/etc/motd`) | ||
| 101 | - `gop.rs` — framebuffer access and text rendering | 104 | - `gop.rs` — framebuffer access and text rendering |
| 102 | - `font.rs` — 8×16 bitmap font data | 105 | - `font.rs` — 8×16 bitmap font data |
| 103 | - `ps2.rs` — PS/2 keyboard driver (polling) | 106 | - `ps2.rs` — PS/2 keyboard driver (polling) |
| @@ -124,6 +127,9 @@ Single Rust crate (`x86_64-unknown-uefi` target). Module breakdown: | |||
| 124 | (ACPI S5; `halt` keeps the plain hlt loop) | 127 | (ACPI S5; `halt` keeps the plain hlt loop) |
| 125 | ✅ **RTC** — CMOS clock read at boot and via `date` (BCD/12h handled) | 128 | ✅ **RTC** — CMOS clock read at boot and via `date` (BCD/12h handled) |
| 126 | ✅ **PCI** — port-based config access, full bus enumeration via `pci` | 129 | ✅ **PCI** — port-based config access, full bus enumeration via `pci` |
| 130 | ✅ **VFS** — “everything is a file”: dirs, ramfs, char devices | ||
| 131 | (`ls`/`cat`/`hexdump`/`mkdir`/`touch`/`rm`, `echo >`/`>>`; devices | ||
| 132 | regenerate on read, `/dev/mem` is raw physical RAM) | ||
| 127 | 133 | ||
| 128 | ## Target audience | 134 | ## Target audience |
| 129 | 135 | ||
