Commit a4b8381
kernel: Fix critical bugs and implement FAT filesystem
This commit addresses several critical architectural issues in Bengal
Tiger OS and implements missing core functionality:
1. **Memory Management**: Fixed a conflict where the PMM could allocate
pages used by the page directory/tables. Expanded identity mapping
to 16MB to cover the kernel and the initial heap (at 4MB),
preventing page faults during initialization.
2. **Heap Allocator**: Re-implemented `kmalloc_aligned` to store the
original pointer, allowing aligned allocations to be safely freed
via `kfree`.
3. **FAT Filesystem**: Replaced the stub FAT driver with a functional
FAT12/16 implementation that supports boot sector parsing,
directory traversal, and cluster chain following.
4. **Shell**: Fixed backspace logic and updated `ls` to use the real
filesystem driver.
5. **Build System**: Updated the Makefile to handle missing ISO creation
tools gracefully and added a `.gitignore` to exclude build artifacts.
These changes make the OS bootable and functional for real-world
use cases involving file access and stable memory allocation.
Co-authored-by: mahmud-r-farhan <114731414+mahmud-r-farhan@users.noreply.github.com>1 parent 1460c6e commit a4b8381
33 files changed
Lines changed: 279 additions & 92 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
0 commit comments