replace ad hoc driver loading with a proper driver manager, new DDK, new PnP manager with device matching, asynchronous startup, resource ownership and removal, add shared PCI capability helpers, replace typed, rigid services with a proper service manager, implement proper system shutdown and restart, shutting down unloads drivers and shuts down services, add simple power button, remove heavyweight boot self-tests and SMP stress runs, add monotonic timestamps to kernel debug output, fruitless USB and PS/2 fixes, make test builds opt in.

This commit is contained in:
maksw committed 2026-10-26 10:08:03 +01:00
1 parent c0ad63c27f
commit d36f19509c
160 files changed
+6563 -7366

No files matched your search

+4 -39
View File
@@ -1,7 +1,5 @@
# NT-Lite -- an x86-64 kernel
“Not only is UNIX dead, it’s starting to smell really bad.” - Rob Pike
“UNIX has three operations: read, write, and lie through ioctl.”
## what is it?
@@ -10,55 +8,22 @@ NT-Lite is a 64-bit operating system kernel written from scratch.
It boots into a shell, launches programs, runs Doom, talks TCP/IP, and occasionally reminds you that it is still a hobby kernel.
## features
- UEFI bootloader
- real SMP
- VAD-based virtual memory, file-backed and anonymous mmap, CoW, reclaim
- single address-space design with user/supervisor page permissions
- preemptive priority scheduler
- capability-style handles with rights checks, derivation, and revocation
- rich synchronization primitives
- IRQL, DPCs, kernel APCs, and user APCs
- user exception handling with structured and vectored handlers
- async file I/O with events, IOSBs, APC callbacks, and cancellation
- capability-relative VFS with IRPs
- refcounted mounted volumes with partition arrival/removal
- page cache with dirty writeback and invalidation
- USB bus, xHCI, mass storage, hubs, hotplug, and HID
- audio
- VMware SVGA display driver
- dynamic driver loading
- native BSD-ish socket syscalls
- DNS resolver syscall
- four-register syscall ABI with sized request structs for larger calls
- partial Win32 personality
- partial (microsoft-level) POSIX personality
- Doom
- video playback
- fully GDPR-compliant
- everything but the kitchen sink
## paths
You thought it would be easy, would you?
```text
"apps/shell_native.exe" -> current working directory, resolved in userspace
"/SystemRoot/apps/shell_native.exe" -> system volume through the resource namespace
"/Device/HarddiskVolume1/boot.ini" -> system volume through the resource namespace
"apps/shell_native.exe" -> current working directory
"/SystemRoot/apps/shell_native.exe" -> system volume, symlink to /Device/HarddiskVolumeN
"/Device/HarddiskVolume1/boot.ini" -> system volume
"C:\apps\doom.exe" -> /SystemRoot/apps/doom.exe through win32.dll
"\apps\doom.exe" -> /SystemRoot/apps/doom.exe through win32.dll
"/apps/video.exe" -> /SystemRoot/apps/video.exe through posix.dll
```
Kernel filesystem syscalls are capability-relative; userspace owns the current working directory and resolves named resources through `rssrv`.
`/SystemRoot` is the configured boot volume. Other mounted volumes are discovered through the volume manager and opened by capability.
## networking
The socket syscalls are BSD-shaped, not BSD-compatible. Same nouns (AF_INET, SOCK_STREAM, IPPROTO_TCP), none of the baggage:
The socket syscalls are BSD-shaped, but not BSD-compatible. Same nouns (AF_INET, SOCK_STREAM, IPPROTO_TCP), none of the baggage:
one fixed-size tagged address struct instead of the sockaddr_in/sockaddr_storage casting dance,
no htons/ntohl conversions, and DNS resolution is a syscall rather than a userspace library call.
That's right microkernel purists, cry some more. Ergonomics.