https://git.reactos.org/?p=reactos.git;a=commitdiff;h=2f0a5e546f690fdfdc5b1e172856b3b0418221d8

commit 2f0a5e546f690fdfdc5b1e172856b3b0418221d8
Author:     Hermès Bélusca-Maïto <hermes.belusca-ma...@reactos.org>
AuthorDate: Mon Nov 20 21:35:57 2023 +0100
Commit:     Hermès Bélusca-Maïto <hermes.belusca-ma...@reactos.org>
CommitDate: Sun Dec 3 17:33:10 2023 +0100

    [NTOS:KE] Don't hardcode pool tag and TSS flag values (#6051)
    
    Co-authored-by: Serge Gautherie 
<32623169+sergegauthe...@users.noreply.github.com>
---
 ntoskrnl/ke/i386/mproc.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/ntoskrnl/ke/i386/mproc.c b/ntoskrnl/ke/i386/mproc.c
index f469f71df81..6e526d28636 100644
--- a/ntoskrnl/ke/i386/mproc.c
+++ b/ntoskrnl/ke/i386/mproc.c
@@ -48,7 +48,7 @@ KeStartAllProcessors(VOID)
         DPCStack = NULL;
 
         // Allocate structures for a new CPU.
-        APInfo = ExAllocatePoolZero(NonPagedPool, sizeof(APINFO), '  eK');
+        APInfo = ExAllocatePoolZero(NonPagedPool, sizeof(*APInfo), TAG_KERNEL);
         if (!APInfo)
             break;
         ASSERT(ALIGN_DOWN_POINTER_BY(APInfo, PAGE_SIZE) == APInfo);
@@ -83,7 +83,7 @@ KeStartAllProcessors(VOID)
 
         KiSetGdtDescriptorBase(KiGetGdtEntry(&APInfo->Gdt, KGDT_TSS), 
(ULONG_PTR)&APInfo->Tss);
         // Clear TSS Busy flag (aka set the type to "TSS (Available)")
-        KiGetGdtEntry(&APInfo->Gdt, KGDT_TSS)->HighWord.Bits.Type = 0b1001;
+        KiGetGdtEntry(&APInfo->Gdt, KGDT_TSS)->HighWord.Bits.Type = I386_TSS;
 
         APInfo->TssDoubleFault.Esp0 = (ULONG_PTR)&APInfo->NMIStackData;
         APInfo->TssDoubleFault.Esp = (ULONG_PTR)&APInfo->NMIStackData;
@@ -146,11 +146,11 @@ KeStartAllProcessors(VOID)
     ProcessorCount--;
 
     if (APInfo)
-        ExFreePoolWithTag(APInfo, '  eK');
+        ExFreePoolWithTag(APInfo, TAG_KERNEL);
     if (KernelStack)
         MmDeleteKernelStack(KernelStack, FALSE);
     if (DPCStack)
         MmDeleteKernelStack(DPCStack, FALSE);
 
-    DPRINT1("KeStartAllProcessors: Sucessful AP startup count is %u\n", 
ProcessorCount);
+    DPRINT1("KeStartAllProcessors: Successful AP startup count is %u\n", 
ProcessorCount);
 }

Reply via email to