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

+56
View File
@@ -0,0 +1,56 @@
// Native userspace PE32+ image-loader declarations.
#pragma once
#include <stddef.h>
#include <stdint.h>
#include <ntlite/status.h>
#include <ntlite/string_view.h>
#include <ntlite/handle.h>
#define NTL_PE_LOAD_FLAG_NONE 0x00000000u
typedef KSTATUS (*NTL_PE_IMPORT_RESOLVER)(void* context,
SYS_STRING_VIEW moduleName,
SYS_STRING_VIEW symbolName,
uintptr_t* addressOut);
typedef struct NTL_PE_IMAGE {
uintptr_t Base;
size_t Size;
uintptr_t EntryPoint;
uint64_t PreferredBase;
} NTL_PE_IMAGE;
typedef KSTATUS (*NTL_PE_PREPARED_CALLBACK)(void* context, const NTL_PE_IMAGE* image);
typedef struct NTL_PE_LOAD_REQUEST {
uint32_t Size;
SYS_HANDLE ProcessHandle;
SYS_HANDLE FileHandle;
uint32_t Flags;
NTL_PE_IMPORT_RESOLVER ResolveImport;
void* ResolveContext;
NTL_PE_PREPARED_CALLBACK Prepared;
void* PreparedContext;
NTL_PE_IMAGE* ImageOut;
} NTL_PE_LOAD_REQUEST;
#if defined(NTL_SYSCALL_STATIC)
#define NTL_SYSCALL_API
#elif defined(NTL_SYSCALL_BUILD)
#define NTL_SYSCALL_API __declspec(dllexport)
#else
#define NTL_SYSCALL_API
#endif
// Reads, validates, materializes, relocates, binds, and protects one AMD64 PE32+ image.
// ProcessHandle may be SYS_HANDLE_INVALID to target the current process. Dependency policy
// remains entirely in ResolveImport. Prepared runs after relocation and before import binding.
NTL_SYSCALL_API KSTATUS NtlLoadPeImage(const NTL_PE_LOAD_REQUEST* request);
// Resolves one named export directly from an already-materialized PE image. Forwarders and
// ordinal lookups are intentionally unsupported.
NTL_SYSCALL_API KSTATUS NtlGetPeExport(uintptr_t imageBase, SYS_STRING_VIEW name, uintptr_t* addressOut);
#undef NTL_SYSCALL_API