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