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:
1 parent
4add6789ba
commit
f882d339fb
232 files changed
+20934
-8898
No files matched your search
@@ -0,0 +1,76 @@
|
||||
// Native userspace module-loader declarations.
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <stddef.h>
|
||||
#include <stdint.h>
|
||||
#include <ntlite/handle.h>
|
||||
#include <ntlite/status.h>
|
||||
#include <ntlite/string_view.h>
|
||||
|
||||
#define NTL_MODULE_NAME_MAX 64u
|
||||
#define NTL_MODULE_LOAD_FLAG_NONE 0x00000000u
|
||||
|
||||
// Opaque process-local userspace module identity. It is never a kernel capability.
|
||||
typedef uintptr_t NTL_MODULE_HANDLE;
|
||||
#define NTL_MODULE_HANDLE_INVALID ((NTL_MODULE_HANDLE)0u)
|
||||
|
||||
// Maps one PE import name to the canonical module filename used by policy.
|
||||
// canonicalNameOut may refer to requestedName storage or to caller-owned static storage.
|
||||
typedef KSTATUS (*NTL_MODULE_NAME_RESOLVER)(void* context,
|
||||
SYS_STRING_VIEW requestedName,
|
||||
SYS_STRING_VIEW* canonicalNameOut);
|
||||
|
||||
typedef struct NTL_MODULE_INFO {
|
||||
uintptr_t Base;
|
||||
size_t Size;
|
||||
uintptr_t EntryPoint;
|
||||
uint32_t PublicRefCount;
|
||||
uint32_t ImportPinned;
|
||||
char Name[NTL_MODULE_NAME_MAX];
|
||||
} NTL_MODULE_INFO;
|
||||
|
||||
typedef struct NTL_LOAD_MODULE_AT_REQUEST {
|
||||
uint32_t Size;
|
||||
uint32_t Flags;
|
||||
SYS_HANDLE RootHandle;
|
||||
SYS_STRING_VIEW Path;
|
||||
SYS_HANDLE ModuleRootHandle;
|
||||
SYS_STRING_VIEW ModuleDirectory;
|
||||
NTL_MODULE_NAME_RESOLVER ResolveModuleName;
|
||||
void* ResolveContext;
|
||||
NTL_MODULE_HANDLE* ModuleHandleOut;
|
||||
NTL_MODULE_INFO* InfoOut;
|
||||
} NTL_LOAD_MODULE_AT_REQUEST;
|
||||
|
||||
#if defined(NTL_SYSCALL_STATIC)
|
||||
#define NTL_MODULE_LOADER_API
|
||||
#elif defined(NTL_SYSCALL_BUILD)
|
||||
#define NTL_MODULE_LOADER_API __declspec(dllexport)
|
||||
#else
|
||||
#define NTL_MODULE_LOADER_API
|
||||
#endif
|
||||
|
||||
// Identity module-name policy for native images whose import names are already canonical.
|
||||
NTL_MODULE_LOADER_API KSTATUS NtlResolveModuleNameIdentity(void* context,
|
||||
SYS_STRING_VIEW requestedName,
|
||||
SYS_STRING_VIEW* canonicalNameOut);
|
||||
|
||||
// Resolves the installed Win32/POSIX compatibility import aliases for generic userspace launchers.
|
||||
NTL_MODULE_LOADER_API KSTATUS NtlResolveSystemModuleName(void* context,
|
||||
SYS_STRING_VIEW requestedName,
|
||||
SYS_STRING_VIEW* canonicalNameOut);
|
||||
|
||||
// Loads one DLL-like image into the current process. Dependency images are resolved
|
||||
// beneath ModuleRootHandle/ModuleDirectory and remain import-pinned for process lifetime.
|
||||
NTL_MODULE_LOADER_API KSTATUS NtlLoadModuleAt(const NTL_LOAD_MODULE_AT_REQUEST* request);
|
||||
NTL_MODULE_LOADER_API KSTATUS NtlUnloadModule(NTL_MODULE_HANDLE module);
|
||||
NTL_MODULE_LOADER_API KSTATUS NtlGetModuleInfo(NTL_MODULE_HANDLE module, NTL_MODULE_INFO* infoOut);
|
||||
NTL_MODULE_LOADER_API KSTATUS NtlGetModuleExport(NTL_MODULE_HANDLE module,
|
||||
SYS_STRING_VIEW name,
|
||||
uintptr_t* addressOut);
|
||||
NTL_MODULE_LOADER_API KSTATUS NtlGetModuleList(NTL_MODULE_INFO* modulesOut,
|
||||
size_t maxCount,
|
||||
size_t* countOut);
|
||||
|
||||
#undef NTL_MODULE_LOADER_API
|
||||
Reference in new issue
Block a user