mirror of
https://github.com/reactos/reactos.git
synced 2024-12-28 01:55:19 +00:00
[NTOS:KE] Don't hardcode pool tag and TSS flag values (#6051)
Co-authored-by: Serge Gautherie <32623169+SergeGautherie@users.noreply.github.com>
This commit is contained in:
parent
6e449d47e8
commit
2f0a5e546f
1 changed files with 4 additions and 4 deletions
|
@ -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);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue