40{
41 PVOID KernelStack, DPCStack;
44 ULONG MaximumProcessors;
45
46
47
48
49 MaximumProcessors = KeMaximumProcessors;
50
51
52 if (KeNumprocSpecified)
53 MaximumProcessors =
min(MaximumProcessors, KeNumprocSpecified);
54
55
56 if (KeBootprocSpecified)
57 MaximumProcessors =
min(MaximumProcessors, KeBootprocSpecified);
58
59
60
61
63 {
66
67
69 if (!APInfo)
70 break;
72
74 if (!KernelStack)
75 break;
76
78 if (!DPCStack)
79 break;
80
81
83 &APInfo->Pcr,
84 &APInfo->Idt[0],
85 &APInfo->Gdt[0],
86 &APInfo->Tss,
88 DPCStack);
89
90
92 __sgdt(&bspGdt.
Limit);
96
100
102
104
105 APInfo->TssDoubleFault.Esp0 = (
ULONG_PTR)&APInfo->NMIStackData;
106 APInfo->TssDoubleFault.Esp = (
ULONG_PTR)&APInfo->NMIStackData;
107
108 APInfo->TssNMI.Esp0 = (
ULONG_PTR)&APInfo->NMIStackData;
109 APInfo->TssNMI.Esp = (
ULONG_PTR)&APInfo->NMIStackData;
110
111
114
118
124
129
131
135
140
141
145
146
149 {
150 break;
151 }
152
153
155 {
156
159 }
160 }
161
162
164
165 if (APInfo)
167 if (KernelStack)
169 if (DPCStack)
171
173}
FORCEINLINE PKGDTENTRY64 KiGetGdtEntry(PVOID pGdt, USHORT Selector)
FORCEINLINE VOID KiSetGdtDescriptorBase(PKGDTENTRY Entry, ULONG64 Base)
BOOLEAN NTAPI HalStartNextProcessor(IN PLOADER_PARAMETER_BLOCK LoaderBlock, IN PKPROCESSOR_STATE ProcessorState)
struct _AP_SETUP_STACK AP_SETUP_STACK
struct _AP_SETUP_STACK * PAP_SETUP_STACK
__INTRIN_INLINE unsigned long __readcr3(void)
__INTRIN_INLINE unsigned long __readcr4(void)
__INTRIN_INLINE unsigned long __readcr0(void)
__INTRIN_INLINE uintptr_t __readeflags(void)
__INTRIN_INLINE void __sidt(void *Destination)
PLOADER_PARAMETER_BLOCK KeLoaderBlock
#define ExFreePoolWithTag(_P, _T)
FORCEINLINE PVOID ExAllocatePoolZero(ULONG PoolType, SIZE_T NumberOfBytes, ULONG Tag)
VOID NTAPI KiInitializePcr(IN ULONG ProcessorNumber, IN PKIPCR Pcr, IN PKIDTENTRY Idt, IN PKGDTENTRY Gdt, IN PKTSS Tss, IN PKTHREAD IdleThread, IN PVOID DpcStack)
DECLSPEC_NORETURN VOID NTAPI KiSystemStartup(IN PLOADER_PARAMETER_BLOCK LoaderBlock)
VOID NTAPI MmDeleteKernelStack(PVOID Stack, BOOLEAN GuiStack)
PVOID NTAPI MmCreateKernelStack(BOOLEAN GuiStack, UCHAR Node)
FORCEINLINE VOID KeMemoryBarrier(VOID)
KSPECIAL_REGISTERS SpecialRegisters
#define RtlCopyMemory(Destination, Source, Length)
#define RtlZeroMemory(Destination, Length)
#define ALIGN_DOWN_POINTER_BY(ptr, align)
struct _KGDTENTRY64::@2402::@2404::@2407 Bits