redo boot around an explicit system volume and fixed kernel/HAL images, redo volumes and filesystem paths around capabilities instead of drive numbers and kernel CWD state, add a capability/security model with derived and revocable handles and security contexts, add port IPC and rssrv to manage the userspace resource namespace and publish the system volume, move process, dll and path loading to userspace and add process builder syscalls, init now supervises rssrv and the session process, redo the syscall ABI around request structs and four arguments, add a volume manager and proper partition arrival/removal handling so FAT and NTFS mount dynamically, clean up the HAL/DDK boundary so drivers don't depend on HAL internals, save fpu state properly now, the serial driver doesn't hang on a missing port, fix AHCI startup races, fix timeout accounting, fix shared mmap writeback, more smoke tests

This commit is contained in:
maksw committed 2026-08-20 12:33:17 +02:00
1 parent 4add6789ba
commit f882d339fb
232 files changed
+20934 -8898

No files matched your search

+100
View File
@@ -0,0 +1,100 @@
// Public nt-lite capability handle declarations.
#pragma once
#include <stdint.h>
// Handle values are process-local monotonic identities. Zero is invalid, and
// an issued value is never reused during the lifetime of its owning process.
typedef uint32_t SYS_HANDLE;
typedef uint32_t SYS_RIGHTS;
#define SYS_HANDLE_INVALID ((SYS_HANDLE)0u)
// Capability-management rights shared by every handle type. Rights may only attenuate during delegation.
#define SYS_RIGHT_DUPLICATE 0x00000001u
#define SYS_RIGHT_DERIVE 0x00000002u
#define SYS_RIGHT_REVOKE 0x00000004u
#define SYS_RIGHT_TRANSFER 0x00000008u
#define SYS_RIGHT_QUERY 0x00000010u
#define SYS_RIGHT_WAIT 0x00000020u
#define SYS_RIGHT_COMMON_MASK 0x0000003Fu
// Process-specific rights.
#define SYS_PROCESS_RIGHT_TERMINATE 0x00000100u
#define SYS_PROCESS_RIGHT_INSERT_HANDLE 0x00000200u
#define SYS_PROCESS_RIGHT_BUILD 0x00000400u
// Thread-specific rights.
#define SYS_THREAD_RIGHT_RESUME 0x00000100u
// Mutex-specific rights.
#define SYS_MUTEX_RIGHT_RELEASE 0x00000100u
// Semaphore-specific rights.
#define SYS_SEMAPHORE_RIGHT_SIGNAL 0x00000100u
// Event-specific rights.
#define SYS_EVENT_RIGHT_SIGNAL 0x00000100u
// Queue-specific rights.
#define SYS_QUEUE_RIGHT_SEND 0x00000100u
#define SYS_QUEUE_RIGHT_RECEIVE 0x00000200u
#define SYS_QUEUE_RIGHT_PUBLISH 0x00000400u
// File-specific rights.
#define SYS_FILE_RIGHT_READ_DATA 0x00000100u
#define SYS_FILE_RIGHT_WRITE_DATA 0x00000200u
#define SYS_FILE_RIGHT_LOCK 0x00000400u
#define SYS_FILE_RIGHT_MAP_READ 0x00000800u
#define SYS_FILE_RIGHT_MAP_WRITE 0x00001000u
// Mounted-volume rights.
#define SYS_VOLUME_RIGHT_OPEN 0x00000100u
#define SYS_VOLUME_RIGHT_MODIFY 0x00000200u
// Volume-manager rights. The manager capability is delegated only to the userspace storage control plane.
#define SYS_VOLUME_MANAGER_RIGHT_ENUMERATE 0x00000100u
#define SYS_VOLUME_MANAGER_RIGHT_OPEN 0x00000200u
#define SYS_VOLUME_MANAGER_RIGHT_WAIT 0x00000400u
// Directory-specific rights.
#define SYS_DIR_RIGHT_ENUMERATE 0x00000100u
#define SYS_DIR_RIGHT_OPEN 0x00000200u
#define SYS_DIR_RIGHT_MODIFY 0x00000400u
// Asynchronous I/O request rights.
#define SYS_ASYNC_IO_RIGHT_CANCEL 0x00000100u
// Socket-specific rights.
#define SYS_SOCKET_RIGHT_BIND 0x00000100u
#define SYS_SOCKET_RIGHT_CONNECT 0x00000200u
#define SYS_SOCKET_RIGHT_LISTEN 0x00000400u
#define SYS_SOCKET_RIGHT_ACCEPT 0x00000800u
#define SYS_SOCKET_RIGHT_SEND 0x00001000u
#define SYS_SOCKET_RIGHT_RECEIVE 0x00002000u
#define SYS_SOCKET_RIGHT_SHUTDOWN 0x00004000u
#define SYS_SOCKET_RIGHT_POLL 0x00008000u
#define SYS_SOCKET_RIGHT_SET_OPTION 0x00010000u
// File-mapping rights.
#define SYS_FILE_MAPPING_RIGHT_MAP 0x00000100u
// Surface rights.
#define SYS_SURFACE_RIGHT_MAP 0x00000100u
#define SYS_SURFACE_RIGHT_PRESENT 0x00000200u
// Input-queue rights.
#define SYS_INPUT_QUEUE_RIGHT_READ 0x00000100u
// Timer rights.
#define SYS_TIMER_RIGHT_SET 0x00000100u
// Audio-stream rights.
#define SYS_AUDIO_STREAM_RIGHT_WRITE 0x00000100u
#define SYS_AUDIO_STREAM_RIGHT_CONTROL 0x00000200u
// Security-context-specific rights are declared in <ntlite/security.h>.
// Rights normally retained by a newly created root capability.
#define SYS_RIGHT_MANAGE (SYS_RIGHT_DUPLICATE | SYS_RIGHT_DERIVE | SYS_RIGHT_REVOKE | SYS_RIGHT_TRANSFER)