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

+71
View File
@@ -0,0 +1,71 @@
// Native userspace process-loader declarations.
#pragma once
#include <stdint.h>
#include <ntlite/handle.h>
#include <ntlite/status.h>
#include <ntlite/string_view.h>
#include <ntlite/pe_loader.h>
#include <ntlite/module_loader.h>
#define NTL_PROCESS_LOAD_FLAG_NONE 0x00000000u
// Describes one source capability to duplicate into a constructing child.
typedef struct NTL_PROCESS_STARTUP_CAPABILITY {
uint32_t Tag;
SYS_HANDLE SourceHandle;
SYS_RIGHTS DesiredRights;
uint32_t DuplicateFlags;
} NTL_PROCESS_STARTUP_CAPABILITY;
// Creates and starts one PE32+ process entirely through the userspace image loader.
typedef struct NTL_CREATE_PROCESS_AT_REQUEST {
uint32_t Size;
uint32_t Flags;
SYS_HANDLE RootHandle;
SYS_STRING_VIEW Path;
SYS_STRING_VIEW CommandLine;
// Empty inherits the caller's userspace CWD; non-empty is normalized as a native resource path.
SYS_STRING_VIEW CurrentDirectory;
SYS_HANDLE SecurityContext;
SYS_HANDLE ModuleRootHandle;
SYS_STRING_VIEW ModuleDirectory;
NTL_MODULE_NAME_RESOLVER ResolveModuleName;
void* ResolveContext;
const NTL_PROCESS_STARTUP_CAPABILITY* StartupCapabilities;
uint32_t StartupCapabilityCount;
SYS_HANDLE* ProcessHandleOut;
} NTL_CREATE_PROCESS_AT_REQUEST;
// Creates one process beneath the globally published /SystemRoot volume. Path remains a
// canonical volume-relative native path; RSSRV is used only to obtain the volume capability.
typedef struct NTL_CREATE_SYSTEM_PROCESS_REQUEST {
uint32_t Size;
uint32_t Flags;
// Optional pre-opened executable file. When supplied, Path is diagnostic/PEB identity only.
SYS_HANDLE ImageFile;
SYS_STRING_VIEW Path;
SYS_STRING_VIEW CommandLine;
// Empty inherits the caller's userspace CWD; non-empty is normalized as a native resource path.
SYS_STRING_VIEW CurrentDirectory;
SYS_HANDLE SecurityContext;
NTL_MODULE_NAME_RESOLVER ResolveModuleName;
void* ResolveContext;
const NTL_PROCESS_STARTUP_CAPABILITY* StartupCapabilities;
uint32_t StartupCapabilityCount;
SYS_HANDLE* ProcessHandleOut;
} NTL_CREATE_SYSTEM_PROCESS_REQUEST;
#if defined(NTL_SYSCALL_STATIC)
#define NTL_PROCESS_LOADER_API
#elif defined(NTL_SYSCALL_BUILD)
#define NTL_PROCESS_LOADER_API __declspec(dllexport)
#else
#define NTL_PROCESS_LOADER_API
#endif
NTL_PROCESS_LOADER_API KSTATUS NtlCreateProcessAt(const NTL_CREATE_PROCESS_AT_REQUEST* request);
NTL_PROCESS_LOADER_API KSTATUS NtlCreateSystemProcess(const NTL_CREATE_SYSTEM_PROCESS_REQUEST* request);
#undef NTL_PROCESS_LOADER_API