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
@@ -5,13 +5,14 @@
|
||||
#include <stddef.h>
|
||||
#include <string.h>
|
||||
#include <ntlite/syscall.h>
|
||||
#include <ntlite/path.h>
|
||||
|
||||
static char gSelfPath[SYS_PATH_MAX];
|
||||
static char gSelfDir[SYS_PATH_MAX];
|
||||
|
||||
// Prints one NUL-terminated string to the kernel console.
|
||||
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);
|
||||
}
|
||||
|
||||
@@ -29,7 +30,7 @@ static void print_u64(uint64_t v) {
|
||||
}
|
||||
while (i--) {
|
||||
char c = buf[i];
|
||||
SYS_WRITE_CONSOLE_REQUEST req = { SysSvFromParts(&c, 1) };
|
||||
SYS_WRITE_CONSOLE_REQUEST req = { sizeof(SYS_WRITE_CONSOLE_REQUEST), SysSvFromParts(&c, 1) };
|
||||
SysWriteConsole(&req);
|
||||
}
|
||||
}
|
||||
@@ -105,12 +106,11 @@ static uint32_t open_self_image(uint32_t* fileOut, uint64_t* sizeOut) {
|
||||
build_parent_dir(gSelfDir, sizeof(gSelfDir), gSelfPath);
|
||||
|
||||
uint32_t h = 0;
|
||||
SYS_OPEN_FILE_REQUEST req = SysMakeOpenFileRequest(SysSvFromCstr(gSelfPath),
|
||||
SYS_FILE_ACCESS_READ | SYS_FILE_ACCESS_QUERY,
|
||||
SYS_FILE_OPEN_EXISTING,
|
||||
SYS_FILE_FLAG_NONE,
|
||||
&h);
|
||||
uint32_t s = SysOpenFile(&req);
|
||||
uint32_t s = NtlOpenFile(SysSvFromCstr(gSelfPath),
|
||||
SYS_FILE_ACCESS_READ | SYS_FILE_ACCESS_QUERY,
|
||||
SYS_FILE_OPEN_EXISTING,
|
||||
SYS_FILE_FLAG_NONE,
|
||||
&h);
|
||||
if (s != NTLSTATUS_SUCCESS)
|
||||
return s;
|
||||
|
||||
@@ -178,8 +178,7 @@ static void test_file_stat(uint32_t file, uint64_t expectedSize) {
|
||||
|
||||
SYS_FILE_STAT byPath;
|
||||
memset(&byPath, 0x5A, sizeof(byPath));
|
||||
SYS_STAT_FILE_REQUEST statReq = { SysSvFromCstr(gSelfPath), &byPath };
|
||||
s = SysStatFile(&statReq);
|
||||
s = NtlStatPath(SysSvFromCstr(gSelfPath), &byPath);
|
||||
if (s != NTLSTATUS_SUCCESS) fail_status("path stat", s);
|
||||
check_regular_stat(&byPath, expectedSize, "path stat");
|
||||
|
||||
@@ -193,8 +192,7 @@ static void test_file_stat(uint32_t file, uint64_t expectedSize) {
|
||||
static void test_directory_stat(void) {
|
||||
SYS_FILE_STAT stat;
|
||||
memset(&stat, 0xCC, sizeof(stat));
|
||||
SYS_STAT_FILE_REQUEST statReq = { SysSvFromCstr(gSelfDir), &stat };
|
||||
uint32_t s = SysStatFile(&statReq);
|
||||
uint32_t s = NtlStatPath(SysSvFromCstr(gSelfDir), &stat);
|
||||
if (s != NTLSTATUS_SUCCESS) fail_status("directory stat", s);
|
||||
check_directory_stat(&stat);
|
||||
}
|
||||
@@ -202,15 +200,13 @@ static void test_directory_stat(void) {
|
||||
// Checks failure status paths that stat callers depend on.
|
||||
static void test_failure_paths(void) {
|
||||
SYS_FILE_STAT stat;
|
||||
SYS_STAT_FILE_REQUEST missingReq = { SysSvFromCstr("file_stat_smoke_missing.nope"), &stat };
|
||||
uint32_t s = SysStatFile(&missingReq);
|
||||
uint32_t s = NtlStatPath(SYS_SV_LITERAL("file_stat_smoke_missing.nope"), &stat);
|
||||
if (s != NTLSTATUS_NOT_FOUND) fail_status("missing path status", s);
|
||||
|
||||
s = SysGetFileStat(0xFFFFFFFFu, &stat);
|
||||
if (s != NTLSTATUS_INVALID_HANDLE) fail_status("invalid handle status", s);
|
||||
|
||||
SYS_STAT_FILE_REQUEST badReq = { SysSvFromCstr("file_stat_smoke_missing.nope"), 0 };
|
||||
s = SysStatFile(&badReq);
|
||||
s = NtlStatPath(SYS_SV_LITERAL("file_stat_smoke_missing.nope"), (SYS_FILE_STAT*)0);
|
||||
if (s != NTLSTATUS_INVALID_PARAMETER) fail_status("null stat output status", s);
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user