]> Projects (at) Tadryanom (dot) Me - AdrOS.git/commit
feat: unified FAT12/16/32 RW driver replacing read-only FAT16
authorTulio A M Mendes <[email protected]>
Fri, 13 Feb 2026 04:54:13 +0000 (01:54 -0300)
committerTulio A M Mendes <[email protected]>
Fri, 13 Feb 2026 04:54:13 +0000 (01:54 -0300)
commitd1d3e484f9aeec210747a7f78702ace74b1d253a
tree0fc7243b2c1350db9224acd6f0b4570ba7ef21fd
parentb2f14bba76fbcd1c0a06daa337225e1d8e17d1bc
feat: unified FAT12/16/32 RW driver replacing read-only FAT16

- New fat.c: unified FAT driver with auto-detection (FAT12/16/32) based on
  cluster count per Microsoft FAT spec
- Full RW support: file read/write, create, delete, truncate, mkdir, rmdir,
  rename, readdir, finddir — all wired to VFS callbacks
- FAT table access for all three variants (12-bit, 16-bit, 32-bit entries)
- Cluster chain management: alloc, extend, free
- Subdirectory support (cluster-based dirs + fixed root for FAT12/16)
- 8.3 filename conversion (to/from human-readable lowercase)
- fat16.h retained as backward-compat wrapper redirecting to fat.h
- Old read-only fat16.c removed

Fix: BSS collision with ACPI temp VA window
- BSS grew past 0xC0202000 with lwIP memp pools + FAT statics
- Moved ACPI temp VA: 0xC0202000 -> 0xC0300000
- Moved DMA PRDT VA: 0xC0220000 -> 0xC0320000
- Moved DMA bounce VA: 0xC0221000 -> 0xC0321000

Build: clean, cppcheck: clean, smoke: 19/19 pass
include/fat.h [new file with mode: 0644]
include/fat16.h
src/arch/x86/acpi.c
src/hal/x86/ata_dma.c
src/kernel/fat.c [new file with mode: 0644]
src/kernel/fat16.c [deleted file]