replace the VHD/diskpart disk image pipeline with a directory-based vvfat root, we'll see when it breaks, fix /O2, add an all_tests, generalize the fat32 driver into a fat 16+32 driver, change policy on volume drivers, collapse KCPU's fields into a single atomic KE_CPU_STATE state machine, move scheduler ticking to per-CPU LAPIC timers, gate verbose SMP topology logging behind selftest diagnostics and add SMP pool-checkpoint validation around AP admission, add checked intrusive list helpers behind a new KE_DEBUG_LIST_CHECKS flag, add ObInitializeObjectHeader/ObTryReferenceObject, add waitable display clock objects and a SYS_OPEN_DISPLAY_CLOCK syscall for vsync-style waits, refactor kernel input into a per-queue KE_INPUT_CONTEXT with its own key/mouse ring buffers and DPC-driven key repeat, add KeInputQueuePeekEvent/ReadEvent/WaitKey and a SYS_QUERY_GLOBAL_INPUT_STATE syscall, split the kernel pool allocator out of mm_virt, new video files!

This commit is contained in:
maksw committed 2026-07-12 00:10:21 +02:00
1 parent 485a6bbfe7
commit 8b254f84f4
74 files changed
+4488 -2503

No files matched your search

+57 -18
View File
@@ -54,6 +54,51 @@ static void fail(const char* what) {
exit_now(1);
}
// Copies a string view into a NUL-terminated buffer.
static int copy_view(char* dst, size_t cap, SYS_STRING_VIEW view) {
if (!dst || cap == 0 || !view.Data || view.Length + 1 > cap)
return 0;
memcpy(dst, view.Data, view.Length);
dst[view.Length] = '\0';
return 1;
}
// Computes the parent of one canonical native current-directory string.
static int parent_of_cwd(const char* cwd, char* out, size_t cap) {
if (!cwd || !out || cap == 0)
return 0;
size_t len = strlen(cwd);
if (len < 3 || cwd[1] != ':' || (cwd[2] != '/' && cwd[2] != '\\'))
return 0;
if (len + 1 > cap)
return 0;
memcpy(out, cwd, len + 1);
while (len > 3 && (out[len - 1] == '/' || out[len - 1] == '\\'))
out[--len] = '\0';
if (len <= 3) {
out[0] = cwd[0];
out[1] = ':';
out[2] = '/';
out[3] = '\0';
return 1;
}
size_t pos = len;
while (pos > 3 && out[pos - 1] != '/' && out[pos - 1] != '\\')
pos--;
if (pos <= 3) {
out[0] = cwd[0];
out[1] = ':';
out[2] = '/';
out[3] = '\0';
} else {
out[pos - 1] = '\0';
}
return 1;
}
// Sets the current directory to one native path.
static void set_cwd_or_fail(const char* path, const char* what) {
SYS_PATH_REQUEST req = { SysSvFromCstr(path) };
@@ -72,8 +117,8 @@ static void expect_cwd(const char* expected) {
// Program entry point.
int main(void) {
static const char rootPath[] = "0:/";
static const char tempDir[] = "0:/cwd_peb_smoke_dir";
char original[SYS_CWD_MAX];
char parent[SYS_CWD_MAX];
print("cwd_peb_smoke: start\n");
@@ -82,25 +127,19 @@ int main(void) {
if (peb->Magic != SYS_PEB_MAGIC) fail("peb magic mismatch");
if (peb->Version != SYS_ENV_VERSION) fail("peb version mismatch");
set_cwd_or_fail(rootPath, "set root cwd");
expect_cwd(rootPath);
if (!copy_view(original, sizeof(original), SysGetCurrentDirectoryView()))
fail("initial cwd missing");
if (!parent_of_cwd(original, parent, sizeof(parent)))
fail("initial cwd malformed");
SYS_PATH_REQUEST dirReq = { SysSvFromCstr(tempDir) };
uint32_t status = SysRemoveDir(&dirReq);
if (status != NTLSTATUS_SUCCESS && status != NTLSTATUS_NOT_FOUND)
fail_status("remove stale temp dir", status);
set_cwd_or_fail(".", "set dot cwd");
expect_cwd(original);
status = SysCreateDir(&dirReq);
if (status != NTLSTATUS_SUCCESS) fail_status("create temp dir", status);
set_cwd_or_fail("..", "set parent cwd");
expect_cwd(parent);
set_cwd_or_fail(tempDir, "set temp cwd");
expect_cwd(tempDir);
set_cwd_or_fail(rootPath, "restore root cwd");
expect_cwd(rootPath);
status = SysRemoveDir(&dirReq);
if (status != NTLSTATUS_SUCCESS) fail_status("remove temp dir", status);
set_cwd_or_fail(original, "restore original cwd");
expect_cwd(original);
print("cwd_peb_smoke: PASS\n");
exit_now(0);