move keyboard and mouse out of HAL into a standalone ps2.sys driver, implement usb stack with xhci controller discovery, hid keyboard/mouse, and bulk-only mass storage, add pci msi support with capability chain walking and software irq vector allocation (slots 16-23), rewrite user virtual memory as a USER_VA_REGION descriptor arena with per-process ownership tracking and guard page support, replacing the old bump allocator and top-down image region, add MmCreateUserRegion/MmDestroyAllUserRegions so process teardown reclaims all user va in one pass, allocate a pool-backed shadow framebuffer in hal_screen to fix cursor tearing and scroll corruption, reserve ap trampoline page below 1mb in uefi bootloader before boot services exit, rewrite memset/memcpy/memmove/memcmp with __stosq/__movsq intrinsics, promote driver flag literals to macros and add multi-tu STANDALONE_DRIVERS table to build.c, split rtl8139/rtl816x into header+source, rename KbReadScancode to KbReadKey, improve page fault output with MmDebugDescribeAddress and user region dump, fix %p to %016llX throughout.

This commit is contained in:
maksw committed 2026-06-02 00:01:20 +02:00
1 parent b970d7f59c
commit b838f8d83d
130 files changed
+8137 -2932

No files matched your search

+19 -16
View File
@@ -10,7 +10,7 @@ NT-Lite is a 64-bit operating system kernel written from scratch. It has a UEFI
It boots into a shell, launches user processes, survives application crashes, and can run things it probably should not be able to run yet.
The codebase is still small enough to understand, but large enough to hurt your feelings. The kernel is just 10k lines of code and the entire project is about 20k lines.
The codebase is still small enough to understand, but large enough to hurt your feelings. The entire project is about 40k lines.
## features
@@ -39,8 +39,8 @@ The codebase is still small enough to understand, but large enough to hurt your
- `IoCallDriver()` dispatch path
- AHCI driver, interrupt-driven
- IDE driver, PIO/DMA
- FAT32 filesystem driver
- VFAT long filename support for real dotfiles like `.doomrc`
- FAT32 filesystem driver with VFAT
- USB with bus, xHCI, mass storage and HID
- drive-number paths such as `0:/apps/shell.exe`
- lwIP network stack as a runtime driver (`lwip.sys`)
- RTL8139 and RTL816x ethernet drivers
@@ -207,14 +207,14 @@ Port forwarding is enabled by default in `runa.bat` — host port 8080 maps to g
```text
"apps/shell.exe" -> current working directory
"0:/apps/shell.exe" -> volume 0
"2:/data/config.ini" -> volume 2
"C:\apps\doom.exe" -> volume 0, mapping is simple c->0, d->1, etc.
"/apps/video.exe" -> volume 0
"0:/apps/shell.exe" -> volume 0, native path
"2:/data/config.ini" -> volume 2, native path
"C:\apps\doom.exe" -> volume 0, win32.dll translated path, mapping is simple c->0, d->1, etc.
"/apps/video.exe" -> volume 0, posix.dll translated path, mapping is simple: root is volume 0, then directories as volumes, so
"/1/apps/video.exe" -> volume 1
```
Volumes `0`-`7` are available. A volume only works if a filesystem is registered on it (duh).
Volumes `0`-`7` are available. A volume only works if a filesystem is registered on it (duh).
The Win32 personality translates drive letters to volume numbers, while the POSIX personality maps volumes onto a tree.
Path parsing is length-aware internally. Embedded NUL bytes are rejected for text paths and names.
@@ -284,18 +284,15 @@ A: Don't connect to the internet with it.
Q: Who is this for?
A: Me.
Q: How do I contribute?
A: maksw@maksw.pl
Q: Where's the source?
A: Right here.
Q: What's next?
A: todo
Q: Does it run Doom?
A: `doom.exe`
Q: Does USB work?
A: For me, my keyboard, mouse and thumbdrive.
Q: If I write a program now, will it run in the future?
A: Not a chance. WE DO - in fact - BREAK USERSPACE.
@@ -315,8 +312,8 @@ Q: Is the Win32 layer real?
A: Depends how you frame it. Some apps will run, most will not.
Q: Are processes isolated?
A: No. But IPC is free. Is this how a serious modern OS should isolate processes? No.
Is it very convenient while building? Absolutely. Do I care? Nope.
A: No. But IPC is free. Is this how a serious modern OS should isolate processes? No.
Are we a serious OS? No. Is it very convenient while building? Absolutely. Do I care? Nope.
Q: How often does it crash?
A: Like Windows 11.
@@ -339,6 +336,12 @@ A: How else do I debug it?
Q: What should I read first?
A: This document.
Q: How do I contribute?
A: maksw@maksw.pl
Q: Where's the source?
A: Right here.
Q: Can I use this in production?
A: Don't.