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

@@ -5,6 +5,7 @@
#include <stddef.h>
#include <string.h>
#include <ntlite/syscall.h>
#include <ntlite/path.h>
#define THREAD_COUNT 6u
#define ITERATIONS 16u
@@ -22,7 +23,7 @@ typedef struct THREAD_CTX {
static THREAD_CTX gThreads[THREAD_COUNT];
static void print(const char* s) {
SYS_WRITE_CONSOLE_REQUEST req = { SysSvFromCstr(s) };
SYS_WRITE_CONSOLE_REQUEST req = { sizeof(SYS_WRITE_CONSOLE_REQUEST), SysSvFromCstr(s) };
SysWriteConsole(&req);
}
@@ -66,27 +67,22 @@ static uint32_t query_cache(SYS_FILE_CACHE_STATS* out) {
}
static void delete_path(const char* path) {
SYS_PATH_REQUEST req = { SysSvFromCstr(path) };
(void)SysDeleteFile(&req);
(void)NtlDeleteFile(SysSvFromCstr(path));
}
static uint32_t create_temp(uint32_t* fileOut, const char** pathOut) {
static const char* paths[] = {
"pcache_multithread.tmp",
"/pcache_multithread.tmp",
"1:/pcache_multithread.tmp",
"0:/pcache_multithread.tmp",
};
for (size_t i = 0; i < sizeof(paths) / sizeof(paths[0]); ++i) {
uint32_t h = 0;
delete_path(paths[i]);
SYS_OPEN_FILE_REQUEST req = SysMakeOpenFileRequest(SysSvFromCstr(paths[i]),
SYS_FILE_ACCESS_READ | SYS_FILE_ACCESS_WRITE | SYS_FILE_ACCESS_QUERY,
SYS_FILE_CREATE_NEW,
SYS_FILE_FLAG_NONE,
&h);
uint32_t s = SysOpenFile(&req);
uint32_t s = NtlOpenFile(SysSvFromCstr(paths[i]),
SYS_FILE_ACCESS_READ | SYS_FILE_ACCESS_WRITE | SYS_FILE_ACCESS_QUERY,
SYS_FILE_CREATE_NEW,
SYS_FILE_FLAG_NONE,
&h);
if (s == NTLSTATUS_SUCCESS) {
*fileOut = h;
if (pathOut) *pathOut = paths[i];
@@ -116,8 +112,11 @@ static void thread_main(uintptr_t arg) {
for (uint32_t iter = 0; iter < ITERATIONS; ++iter) {
void* base = 0;
uint32_t s = SysMapFile(ctx->Mapping, 0, TEST_SIZE,
SYS_MAP_ACCESS_READ, SYS_MAP_FLAG_NONE, &base);
SYS_MAP_FILE_REQUEST mapFile = {
sizeof(SYS_MAP_FILE_REQUEST), ctx->Mapping, SYS_MAP_ACCESS_READ,
SYS_MAP_FLAG_NONE, 0, TEST_SIZE, &base
};
uint32_t s = SysMapFile(&mapFile);
if (s != NTLSTATUS_SUCCESS || !base) {
ctx->Status = s ? s : NTLSTATUS_INVALID_PARAMETER;
SysExitThread(1);
@@ -161,7 +160,11 @@ int main(void) {
if (written != sizeof(gPattern)) fail("short write");
uint32_t mapping = 0;
s = SysCreateFileMapping(file, SYS_VM_READ, SYS_MAP_FLAG_NONE, TEST_SIZE, &mapping);
SYS_CREATE_FILE_MAPPING_REQUEST createMapping = {
sizeof(SYS_CREATE_FILE_MAPPING_REQUEST), file, SYS_VM_READ,
SYS_MAP_FLAG_NONE, TEST_SIZE, &mapping
};
s = SysCreateFileMapping(&createMapping);
if (s != NTLSTATUS_SUCCESS) fail_status("create mapping", s);
SYS_FILE_CACHE_STATS before;
@@ -179,7 +182,7 @@ int main(void) {
gThreads[i].Mapping = mapping;
gThreads[i].Status = NTLSTATUS_PENDING;
SYS_CREATE_THREAD_REQUEST req = {
(uintptr_t)thread_main,
sizeof(SYS_CREATE_THREAD_REQUEST), (uintptr_t)thread_main,
(uintptr_t)&gThreads[i],
1,
0,