From 24b6cc22505bb380e360199d05faf086936a3855 Mon Sep 17 00:00:00 2001 From: Aiken Harris Date: Sun, 20 Jul 2025 12:33:10 +0200 Subject: [PATCH] Use portable affinity mask for the idle process The hardcoded value 0xFFFFFFFF restricted the idle process to the first 32 processors on 64-bit system. --- xtoskrnl/ke/amd64/krnlinit.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/xtoskrnl/ke/amd64/krnlinit.c b/xtoskrnl/ke/amd64/krnlinit.c index d1b3977..de4bce0 100644 --- a/xtoskrnl/ke/amd64/krnlinit.c +++ b/xtoskrnl/ke/amd64/krnlinit.c @@ -93,7 +93,7 @@ KepStartKernel(VOID) RtlInitializeListHead(&KepProcessListHead); PageDirectory[0] = 0; PageDirectory[1] = 0; - KeInitializeProcess(CurrentProcess, 0, 0xFFFFFFFF, PageDirectory, FALSE); + KeInitializeProcess(CurrentProcess, 0, MAXULONG_PTR, PageDirectory, FALSE); CurrentProcess->Quantum = MAXCHAR; /* Initialize Idle thread */