00084 :
00085
00086 This function
is called during phase 1 initialization on
the master boot
00087 processor to start all of
the other registered processors.
00088
00089 Arguments:
00090
00091 None.
00092
00093 Return Value:
00094
00095 None.
00096
00097 --*/
00098
00099 {
00100
00101 ULONG_PTR MemoryBlock1;
00102 ULONG_PTR MemoryBlock2;
00103 ULONG Number;
00104 ULONG PcrPage;
00105 PKPRCB Prcb;
00106 KPROCESSOR_STATE ProcessorState;
00107
struct _RESTART_BLOCK *RestartBlock;
00108 BOOLEAN Started;
00109 LOGICAL SpecialPoolState;
00110
00111
#if !defined(NT_UP)
00112
00113
00114
00115
00116
00117
00118
00119
if (
KeRegisteredProcessors >
MAXIMUM_PROCESSORS) {
00120
KeRegisteredProcessors =
MAXIMUM_PROCESSORS;
00121 }
00122
00123
00124
00125
00126
00127
00128
00129 RtlZeroMemory(&ProcessorState,
sizeof(KPROCESSOR_STATE));
00130 ProcessorState.ContextFrame.IntA0 = (ULONGLONG)(LONG_PTR)
KeLoaderBlock;
00131 ProcessorState.ContextFrame.Fir = (ULONGLONG)(LONG_PTR)
KiStartProcessor;
00132 Number = 1;
00133
while (Number <
KeRegisteredProcessors) {
00134
00135
00136
00137
00138
00139
00140
00141
00142
00143
00144
00145 SpecialPoolState =
MmSetSpecialPool(FALSE);
00146 MemoryBlock1 = (ULONG_PTR)
ExAllocatePool(NonPagedPool, BLOCK1_SIZE);
00147
if (
IS_KSEG_ADDRESS(MemoryBlock1) ==
FALSE) {
00148
MmSetSpecialPool(SpecialPoolState);
00149
if ((PVOID)MemoryBlock1 !=
NULL) {
00150
ExFreePool((PVOID)MemoryBlock1);
00151 }
00152
00153
break;
00154 }
00155
00156 MemoryBlock2 = (ULONG_PTR)
ExAllocatePool(NonPagedPool, BLOCK2_SIZE);
00157
if (
IS_KSEG_ADDRESS(MemoryBlock2) ==
FALSE) {
00158
MmSetSpecialPool(SpecialPoolState);
00159
ExFreePool((PVOID)MemoryBlock1);
00160
if ((PVOID)MemoryBlock2 !=
NULL) {
00161
ExFreePool((PVOID)MemoryBlock2);
00162 }
00163
00164
break;
00165 }
00166
00167
MmSetSpecialPool(SpecialPoolState);
00168
00169
00170
00171
00172
00173 RtlZeroMemory((PVOID)MemoryBlock1, BLOCK1_SIZE);
00174 RtlZeroMemory((PVOID)MemoryBlock2, BLOCK2_SIZE);
00175
00176
00177
00178
00179
00180
KeLoaderBlock->
u.Alpha.PanicStack =
00181
KSEG0_ADDRESS(MemoryBlock1 + (1 * KERNEL_STACK_SIZE));
00182
00183
00184
00185
00186
00187
KeLoaderBlock->
KernelStack =
00188
KSEG0_ADDRESS(MemoryBlock1 + (2 * KERNEL_STACK_SIZE));
00189
00190 ProcessorState.ContextFrame.IntSp =
00191 (ULONGLONG)(LONG_PTR)
KeLoaderBlock->
KernelStack;
00192
00193
00194
00195
00196
00197
KeLoaderBlock->
u.Alpha.DpcStack =
00198
KSEG0_ADDRESS(MemoryBlock1 + (3 * KERNEL_STACK_SIZE));
00199
00200
00201
00202
00203
00204 PcrPage =
KSEG_PFN(MemoryBlock1 + (3 * KERNEL_STACK_SIZE));
00205
KeLoaderBlock->
u.Alpha.PcrPage = PcrPage;
00206
00207
00208
00209
00210
00211
00212
KeLoaderBlock->
Prcb =
KSEG0_ADDRESS((MemoryBlock2 + 63) & ~63);
00213
KeLoaderBlock->
Thread =
KeLoaderBlock->
Prcb +
ROUND_UP(KPRCB);
00214
00215
00216
00217
00218
00219
00220
00221 Started =
HalStartNextProcessor(KeLoaderBlock, &ProcessorState);
00222
if (Started ==
FALSE) {
00223
ExFreePool((PVOID)MemoryBlock1);
00224
ExFreePool((PVOID)MemoryBlock2);
00225
break;
00226
00227 }
else {
00228
00229
00230
00231
00232
00233
00234
00235
00236 Prcb = (PKPRCB)(
KeLoaderBlock->
Prcb);
00237 RestartBlock = Prcb->RestartBlock;
00238
while (RestartBlock->BootStatus.BootFinished == 0) {
00239 KiMb();
00240 }
00241 }
00242
00243 Number += 1;
00244 }
00245
00246
#endif
00247
00248
00249
00250
00251
00252
00253
KiAdjustInterruptTime(0);
00254
return;
00255 }
}