summaryrefslogtreecommitdiffstats
path: root/rsnix/src/gop.rs
diff options
context:
space:
mode:
authorsalmonik <salmonik@tuta.io>2026-07-31 19:53:53 +0200
committersalmonik <salmonik@tuta.io>2026-07-31 19:53:53 +0200
commitdc23d2f22cafeb6b97ba460789a834a6c586314d (patch)
tree987bec11922073923c4c42bda84c0f670884dbca /rsnix/src/gop.rs
parentvt: defer scrolls and batch framebuffer pushes (diff)
downloadrs-dos-dc23d2f22cafeb6b97ba460789a834a6c586314d.tar.gz
rs-dos-dc23d2f22cafeb6b97ba460789a834a6c586314d.zip
ahci: SATA driver + FAT32 persistent disk mounted at /disk
- ahci.rs: polling AHCI on PCI class 1/6/1, bus mastering + ABAR map, port 0 up, IDENTIFY + READ/WRITE DMA EXT through one 4KiB DMA buffer - fat.rs: BPB parse, whole-FAT RAM cache with write-back to both copies, LFN read/write, dirs, multi-cluster files, FSInfo free-count sync, space-padded dot entries ('..' = cluster 0 under root), fsck-clean - fs.rs: /disk mount node + 24-slot ephemeral node pool; ls/cat/hexdump/ echo/mkdir/touch/rm/edit all work on disk paths unchanged - QEMU: explicit bus assignment (disk=ide.0, ESP=ide.1); the implicit fat:rw:esp drive was stealing AHCI port 0 - Debugged against QEMU source: header DW0 is CFL in bits 4:0 / PRDTL in bits 31:16 (Linux libahci layout), FIS count at bytes 12-13, device at byte 7; QEMU rejects H2D FIS flags bits 6:4, so direction is the header W bit only - Verified: full shell round-trip on /disk, reboot persistence (poweroff then mdir/mtype and a fresh boot), fsck.fat clean
Diffstat (limited to '')
-rw-r--r--rsnix/src/gop.rs6
1 files changed, 5 insertions, 1 deletions
diff --git a/rsnix/src/gop.rs b/rsnix/src/gop.rs
index fa14eae..77cc514 100644
--- a/rsnix/src/gop.rs
+++ b/rsnix/src/gop.rs
@@ -167,7 +167,11 @@ impl Framebuffer {
167 if SHADOW.is_null() { 167 if SHADOW.is_null() {
168 // No shadow (allocation failed): fall back to shifting the 168 // No shadow (allocation failed): fall back to shifting the
169 // display directly. 169 // display directly.
170 ptr::copy(self.base.add(n * row_bytes), self.base, total - n * row_bytes); 170 ptr::copy(
171 self.base.add(n * row_bytes),
172 self.base,
173 total - n * row_bytes,
174 );
171 let last_row = self.base.add(total - n * row_bytes); 175 let last_row = self.base.add(total - n * row_bytes);
172 for i in 0..(n * row_words) { 176 for i in 0..(n * row_words) {
173 ptr::write_volatile(last_row.add(i * 4) as *mut u32, self.bg); 177 ptr::write_volatile(last_row.add(i * 4) as *mut u32, self.bg);