From f66e9aea9e0aa478dc3e68a72f20759ad8f53904 Mon Sep 17 00:00:00 2001 From: Rafal Kupiec Date: Tue, 7 May 2024 16:21:38 +0200 Subject: [PATCH] Store CPU number and mask interrupts in processor block --- xtoskrnl/hl/x86/cpu.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/xtoskrnl/hl/x86/cpu.c b/xtoskrnl/hl/x86/cpu.c index bd00512..ba1219f 100644 --- a/xtoskrnl/hl/x86/cpu.c +++ b/xtoskrnl/hl/x86/cpu.c @@ -29,8 +29,10 @@ HlInitializeProcessor(IN ULONG CpuNumber) /* Get current processor block */ ProcessorBlock = KeGetCurrentProcessorBlock(); - /* Set initial stall factor */ + /* Set initial stall factor, CPU number and mask interrupts */ ProcessorBlock->StallScaleFactor = INITIAL_STALL_FACTOR; + ProcessorBlock->CpuNumber = CpuNumber; + ProcessorBlock->Idr = 0xFFFFFFFF; /* Record processor block in the processors table */ HlpProcessorsIdentity[CpuNumber].ProcessorBlock = ProcessorBlock;