]> git.proxmox.com Git - mirror_edk2.git/blob - MdeModulePkg/Core/Pei/Dispatcher/Dispatcher.c
Merge in bug fix from EDK1's PiPei Dispatcher.c
[mirror_edk2.git] / MdeModulePkg / Core / Pei / Dispatcher / Dispatcher.c
1 /*++
2
3 Copyright (c) 2006, Intel Corporation
4 All rights reserved. This program and the accompanying materials
5 are licensed and made available under the terms and conditions of the BSD License
6 which accompanies this distribution. The full text of the license may be found at
7 http://opensource.org/licenses/bsd-license.php
8
9 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
10 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
11
12 Module Name:
13
14 Dispatcher.c
15
16 Abstract:
17
18 EFI PEI Core dispatch services
19
20 Revision History
21
22 --*/
23
24 #include <PeiMain.h>
25
26 STATIC
27 VOID
28 InvokePeiCore (
29 VOID *Context1,
30 VOID *Context2
31 );
32
33
34 VOID
35 DiscoverPeimsAndOrderWithApriori (
36 IN PEI_CORE_INSTANCE *Private,
37 IN EFI_PEI_FV_HANDLE VolumeHandle
38 )
39 /*++
40
41 Routine Description:
42
43 Discover all Peims and optional Apriori file in one FV. There is at most one
44 Apriori file in one FV.
45
46 Arguments:
47
48 Private - Pointer to the private data passed in from caller
49 VolumeHandle - Fv handle.
50 Returns:
51
52 NONE
53
54 --*/
55 {
56 EFI_STATUS Status;
57 EFI_PEI_FV_HANDLE FileHandle;
58 EFI_PEI_FV_HANDLE AprioriFileHandle;
59 EFI_GUID *Apriori;
60 UINTN Index;
61 UINTN Index2;
62 UINTN PeimIndex;
63 UINTN PeimCount;
64 EFI_GUID *Guid;
65 EFI_PEI_FV_HANDLE TempFileHandles[PEI_CORE_MAX_PEIM_PER_FV];
66 EFI_GUID FileGuid[PEI_CORE_MAX_PEIM_PER_FV];
67
68 //
69 // Walk the FV and find all the PEIMs and the Apriori file.
70 //
71 AprioriFileHandle = NULL;
72 Private->CurrentFvFileHandles[0] = NULL;
73 Guid = NULL;
74 FileHandle = NULL;
75
76 //
77 // If the current Fv has been scanned, directly get its cachable record.
78 //
79 if (Private->Fv[Private->CurrentPeimFvCount].ScanFv) {
80 CopyMem (Private->CurrentFvFileHandles, Private->Fv[Private->CurrentPeimFvCount].FvFileHandles, sizeof (Private->CurrentFvFileHandles));
81 return;
82 }
83
84 //
85 // Go ahead to scan this Fv, and cache FileHandles within it.
86 //
87 for (PeimCount = 0; PeimCount < PEI_CORE_MAX_PEIM_PER_FV; PeimCount++) {
88 Status = PeiFindFileEx (
89 VolumeHandle,
90 NULL,
91 PEI_CORE_INTERNAL_FFS_FILE_DISPATCH_TYPE,
92 &FileHandle,
93 &AprioriFileHandle
94 );
95 if (Status != EFI_SUCCESS) {
96 break;
97 }
98
99 Private->CurrentFvFileHandles[PeimCount] = FileHandle;
100 }
101
102 Private->AprioriCount = 0;
103 if (AprioriFileHandle != NULL) {
104 //
105 // Read the Apriori file
106 //
107 Status = PeiServicesFfsFindSectionData (EFI_SECTION_RAW, &AprioriFileHandle, (VOID **) &Apriori);
108 if (!EFI_ERROR (Status)) {
109 //
110 // Calculate the number of PEIMs in the A Priori list
111 //
112 Private->AprioriCount = *(UINT32 *)(((EFI_FFS_FILE_HEADER *)AprioriFileHandle)->Size) & 0x00FFFFFF;
113 Private->AprioriCount -= sizeof (EFI_FFS_FILE_HEADER) - sizeof (EFI_COMMON_SECTION_HEADER);
114 Private->AprioriCount /= sizeof (EFI_GUID);
115
116 SetMem (FileGuid, sizeof (FileGuid), 0);
117 for (Index = 0; Index < PeimCount; Index++) {
118 //
119 // Make an array of file name guids that matches the FileHandle array so we can convert
120 // quickly from file name to file handle
121 //
122 CopyMem (&FileGuid[Index], &((EFI_FFS_FILE_HEADER *)Private->CurrentFvFileHandles[Index])->Name,sizeof(EFI_GUID));
123 }
124
125 //
126 // Walk through FileGuid array to find out who is invalid PEIM guid in Apriori file.
127 // Add avalible PEIMs in Apriori file into TempFileHandles array at first.
128 //
129 Index2 = 0;
130 for (Index = 0; Index2 < Private->AprioriCount; Index++) {
131 while (Index2 < Private->AprioriCount) {
132 Guid = ScanGuid (FileGuid, PeimCount * sizeof (EFI_GUID), &Apriori[Index2++]);
133 if (Guid != NULL) {
134 break;
135 }
136 }
137 if (Guid == NULL) {
138 break;
139 }
140 PeimIndex = ((UINTN)Guid - (UINTN)&FileGuid[0])/sizeof (EFI_GUID);
141 TempFileHandles[Index] = Private->CurrentFvFileHandles[PeimIndex];
142
143 //
144 // Since we have copied the file handle we can remove it from this list.
145 //
146 Private->CurrentFvFileHandles[PeimIndex] = NULL;
147 }
148
149 //
150 // Update valid Aprioricount
151 //
152 Private->AprioriCount = Index;
153
154 //
155 // Add in any PEIMs not in the Apriori file
156 //
157 for (;Index < PeimCount; Index++) {
158 for (Index2 = 0; Index2 < PeimCount; Index2++) {
159 if (Private->CurrentFvFileHandles[Index2] != NULL) {
160 TempFileHandles[Index] = Private->CurrentFvFileHandles[Index2];
161 Private->CurrentFvFileHandles[Index2] = NULL;
162 break;
163 }
164 }
165 }
166 //
167 //Index the end of array contains re-range Pei moudle.
168 //
169 TempFileHandles[Index] = NULL;
170
171 //
172 // Private->CurrentFvFileHandles is currently in PEIM in the FV order.
173 // We need to update it to start with files in the A Priori list and
174 // then the remaining files in PEIM order.
175 //
176 CopyMem (Private->CurrentFvFileHandles, TempFileHandles, sizeof (Private->CurrentFvFileHandles));
177 }
178 }
179 //
180 // Cache the current Fv File Handle. So that we don't have to scan the Fv again.
181 // Instead, we can retrieve the file handles within this Fv from cachable data.
182 //
183 Private->Fv[Private->CurrentPeimFvCount].ScanFv = TRUE;
184 CopyMem (Private->Fv[Private->CurrentPeimFvCount].FvFileHandles, Private->CurrentFvFileHandles, sizeof (Private->CurrentFvFileHandles));
185
186 }
187
188 VOID
189 PeiDispatcher (
190 IN CONST EFI_SEC_PEI_HAND_OFF *SecCoreData,
191 IN PEI_CORE_INSTANCE *Private
192 )
193
194 /*++
195
196 Routine Description:
197
198 Conduct PEIM dispatch.
199
200 Arguments:
201
202 SecCoreData - Points to a data structure containing information about the PEI core's operating
203 environment, such as the size and location of temporary RAM, the stack location and
204 the BFV location.
205 PrivateData - Pointer to the private data passed in from caller
206 DispatchData - Pointer to PEI_CORE_DISPATCH_DATA data.
207
208 Returns:
209
210 EFI_SUCCESS - Successfully dispatched PEIM.
211 EFI_NOT_FOUND - The dispatch failed.
212
213 --*/
214 {
215 EFI_STATUS Status;
216 UINT32 Index1;
217 UINT32 Index2;
218 EFI_PEI_SERVICES **PeiServices;
219 VOID *PrivateInMem;
220 EFI_PEI_FV_HANDLE VolumeHandle;
221 EFI_PEI_FILE_HANDLE PeiCoreFileHandle;
222 EFI_PEI_FILE_HANDLE PeimFileHandle;
223 UINTN FvCount;
224 UINTN PeimCount;
225 UINT32 AuthenticationState;
226 EFI_PHYSICAL_ADDRESS EntryPoint;
227 EFI_PEIM_ENTRY_POINT PeimEntryPoint;
228 BOOLEAN PeimNeedingDispatch;
229 BOOLEAN PeimDispatchOnThisPass;
230 UINTN SaveCurrentPeimCount;
231 UINTN SaveCurrentFvCount;
232 EFI_PEI_FILE_HANDLE SaveCurrentFileHandle;
233 VOID *TopOfStack;
234 PEI_CORE_PARAMETERS PeiCoreParameters;
235 EFI_DEVICE_HANDLE_EXTENDED_DATA ExtendedData;
236
237
238 PeiServices = &Private->PS;
239 PeimEntryPoint = NULL;
240 PeimFileHandle = NULL;
241
242 if ((Private->PeiMemoryInstalled) && (Private->HobList.HandoffInformationTable->BootMode != BOOT_ON_S3_RESUME)) {
243 //
244 // Once real memory is available, shadow the RegisterForShadow modules. And meanwhile
245 // update the modules' status from PEIM_STATE_REGISITER_FOR_SHADOW to PEIM_STATE_DONE.
246 //
247 SaveCurrentPeimCount = Private->CurrentPeimCount;
248 SaveCurrentFvCount = Private->CurrentPeimFvCount;
249 SaveCurrentFileHandle = Private->CurrentFileHandle;
250
251 for (Index1 = 0; Index1 <= SaveCurrentFvCount; Index1++) {
252 for (Index2 = 0; (Index2 < PEI_CORE_MAX_PEIM_PER_FV) && (Private->Fv[Index1].FvFileHandles[Index2] != NULL); Index2++) {
253 if (Private->Fv[Index1].PeimState[Index2] == PEIM_STATE_REGISITER_FOR_SHADOW) {
254 PeimFileHandle = Private->Fv[Index1].FvFileHandles[Index2];
255 Status = PeiLoadImage (
256 &Private->PS,
257 PeimFileHandle,
258 &EntryPoint,
259 &AuthenticationState
260 );
261 if (Status == EFI_SUCCESS) {
262 //
263 // PEIM_STATE_REGISITER_FOR_SHADOW move to PEIM_STATE_DONE
264 //
265 Private->Fv[Index1].PeimState[Index2]++;
266 Private->CurrentFileHandle = PeimFileHandle;
267 Private->CurrentPeimFvCount = Index1;
268 Private->CurrentPeimCount = Index2;
269 //
270 // Call the PEIM entry point
271 //
272 PeimEntryPoint = (EFI_PEIM_ENTRY_POINT)(UINTN)EntryPoint;
273
274 PERF_START (0, "PEIM", NULL, 0);
275 PeimEntryPoint(PeimFileHandle, &Private->PS);
276 PERF_END (0, "PEIM", NULL, 0);
277 }
278
279 //
280 // Process the Notify list and dispatch any notifies for
281 // newly installed PPIs.
282 //
283 ProcessNotifyList (Private);
284 }
285 }
286 }
287 Private->CurrentFileHandle = SaveCurrentFileHandle;
288 Private->CurrentPeimFvCount = SaveCurrentFvCount;
289 Private->CurrentPeimCount = SaveCurrentPeimCount;
290 }
291
292 //
293 // This is the main dispatch loop. It will search known FVs for PEIMs and
294 // attempt to dispatch them. If any PEIM gets dispatched through a single
295 // pass of the dispatcher, it will start over from the Bfv again to see
296 // if any new PEIMs dependencies got satisfied. With a well ordered
297 // FV where PEIMs are found in the order their dependencies are also
298 // satisfied, this dipatcher should run only once.
299 //
300 do {
301 PeimNeedingDispatch = FALSE;
302 PeimDispatchOnThisPass = FALSE;
303
304 for (FvCount = Private->CurrentPeimFvCount; FvCount < Private->FvCount; FvCount++) {
305 Private->CurrentPeimFvCount = FvCount;
306 VolumeHandle = Private->Fv[FvCount].FvHeader;
307
308 if (Private->CurrentPeimCount == 0) {
309 //
310 // When going through each FV, at first, search Apriori file to
311 // reorder all PEIMs to ensure the PEIMs in Apriori file to get
312 // dispatch at first.
313 //
314 DiscoverPeimsAndOrderWithApriori (Private, VolumeHandle);
315 }
316
317 //
318 // Start to dispatch all modules within the current Fv.
319 //
320 for (PeimCount = Private->CurrentPeimCount;
321 (PeimCount < PEI_CORE_MAX_PEIM_PER_FV) && (Private->CurrentFvFileHandles[PeimCount] != NULL);
322 PeimCount++) {
323 Private->CurrentPeimCount = PeimCount;
324 PeimFileHandle = Private->CurrentFileHandle = Private->CurrentFvFileHandles[PeimCount];
325
326 if (Private->Fv[FvCount].PeimState[PeimCount] == PEIM_STATE_NOT_DISPATCHED) {
327 if (!DepexSatisfied (Private, PeimFileHandle, PeimCount)) {
328 PeimNeedingDispatch = TRUE;
329 } else {
330 Status = PeiLoadImage (
331 PeiServices,
332 PeimFileHandle,
333 &EntryPoint,
334 &AuthenticationState
335 );
336 if ((Status == EFI_SUCCESS)) {
337 //
338 // The PEIM has its dependencies satisfied, and its entry point
339 // has been found, so invoke it.
340 //
341 PERF_START (0, "PEIM", NULL, 0);
342
343 ExtendedData.Handle = (EFI_HANDLE)PeimFileHandle;
344
345 REPORT_STATUS_CODE_WITH_EXTENDED_DATA (
346 EFI_PROGRESS_CODE,
347 EFI_SOFTWARE_PEI_CORE | EFI_SW_PC_INIT_BEGIN,
348 (VOID *)(&ExtendedData),
349 sizeof (ExtendedData)
350 );
351
352 Status = VerifyPeim (Private, VolumeHandle, PeimFileHandle);
353 if (Status != EFI_SECURITY_VIOLATION && (AuthenticationState == 0)) {
354 //
355 // PEIM_STATE_NOT_DISPATCHED move to PEIM_STATE_DISPATCHED
356 //
357 Private->Fv[FvCount].PeimState[PeimCount]++;
358
359 //
360 // Call the PEIM entry point
361 //
362 PeimEntryPoint = (EFI_PEIM_ENTRY_POINT)(UINTN)EntryPoint;
363 PeimEntryPoint (PeimFileHandle, PeiServices);
364 PeimDispatchOnThisPass = TRUE;
365 }
366
367 REPORT_STATUS_CODE_WITH_EXTENDED_DATA (
368 EFI_PROGRESS_CODE,
369 EFI_SOFTWARE_PEI_CORE | EFI_SW_PC_INIT_END,
370 (VOID *)(&ExtendedData),
371 sizeof (ExtendedData)
372 );
373 PERF_END (0, "PEIM", NULL, 0);
374
375 }
376
377 //
378 // Process the Notify list and dispatch any notifies for
379 // newly installed PPIs.
380 //
381 ProcessNotifyList (Private);
382
383 //
384 // If permanent memory was discovered and installed by this
385 // PEIM, shadow PEI Core and switch the stacks to the new memory.
386 //
387 if (Private->SwitchStackSignal) {
388
389 //
390 // Make sure we don't retry the same PEIM that added memory
391 //
392 Private->CurrentPeimCount++;
393
394 //
395 // Migrate IDT from CAR into real memory, so after stack switches to
396 // the new memory, the caller can get memory version PeiServiceTable.
397 //
398 //MigrateIdtTable (PeiServices);
399 //
400 // Since we are at dispatch level, only the Core's private data
401 // is preserved, nobody else should have any data on the stack.
402 // So we need to copy PEI core instance data to memory.
403 //
404 PrivateInMem = AllocateCopyPool (sizeof (PEI_CORE_INSTANCE), Private);
405 ASSERT (PrivateInMem != NULL);
406
407 //
408 // Shadow PEI Core. When permanent memory is avaiable, shadow
409 // PEI Core and PEIMs to get high performance.
410 //
411 PeiCoreFileHandle = NULL;
412 //
413 // Find the PEI Core in the BFV
414 //
415 Status = PeiFindFileEx (
416 (EFI_PEI_FV_HANDLE)Private->Fv[0].FvHeader,
417 NULL,
418 EFI_FV_FILETYPE_PEI_CORE,
419 &PeiCoreFileHandle,
420 NULL
421 );
422 ASSERT_EFI_ERROR (Status);
423
424 //
425 // Shadow PEI Core into memory so it will run faster
426 //
427 Status = PeiLoadImage (PeiServices, PeiCoreFileHandle, &EntryPoint, &AuthenticationState);
428 ASSERT_EFI_ERROR (Status);
429
430 //
431 // Switch to memory based stack and reenter PEI Core that has been
432 // shadowed to memory.
433 //
434 //
435 // Adjust the top of stack to be aligned at CPU_STACK_ALIGNMENT
436 //
437 TopOfStack = (VOID *)((UINTN)Private->StackBase + (UINTN)Private->StackSize - CPU_STACK_ALIGNMENT);
438 TopOfStack = ALIGN_POINTER (TopOfStack, CPU_STACK_ALIGNMENT);
439
440 PeiCoreParameters.SecCoreData = SecCoreData;
441 PeiCoreParameters.PpiList = NULL;
442 PeiCoreParameters.Data = PrivateInMem;
443 ASSERT (PeiCoreParameters.Data != 0);
444
445 PeiSwitchStacks (
446 InvokePeiCore,
447 (VOID*) (UINTN) PeiCore,
448 (VOID*) &PeiCoreParameters,
449 TopOfStack,
450 (VOID*)(UINTN)Private->StackBase
451 );
452 }
453
454 if ((Private->PeiMemoryInstalled) && (Private->Fv[FvCount].PeimState[PeimCount] == PEIM_STATE_REGISITER_FOR_SHADOW) && \
455 (Private->HobList.HandoffInformationTable->BootMode != BOOT_ON_S3_RESUME)) {
456 //
457 // If memory is availble we shadow images by default for performance reasons.
458 // We call the entry point a 2nd time so the module knows it's shadowed.
459 //
460 //PERF_START (PeiServices, L"PEIM", PeimFileHandle, 0);
461 PeimEntryPoint (PeimFileHandle, PeiServices);
462 //PERF_END (PeiServices, L"PEIM", PeimFileHandle, 0);
463
464 //
465 // PEIM_STATE_REGISITER_FOR_SHADOW move to PEIM_STATE_DONE
466 //
467 Private->Fv[FvCount].PeimState[PeimCount]++;
468
469 //
470 // Process the Notify list and dispatch any notifies for
471 // newly installed PPIs.
472 //
473 ProcessNotifyList (Private);
474 }
475 }
476 }
477 }
478
479 //
480 // We set to NULL here to optimize the 2nd entry to this routine after
481 // memory is found. This reprevents rescanning of the FV. We set to
482 // NULL here so we start at the begining of the next FV
483 //
484 Private->CurrentFileHandle = NULL;
485 Private->CurrentPeimCount = 0;
486 //
487 // Before walking through the next FV,Private->CurrentFvFileHandles[]should set to NULL
488 //
489 SetMem (Private->CurrentFvFileHandles, sizeof (Private->CurrentFvFileHandles), 0);
490 }
491
492 //
493 // Before making another pass, we should set Private->CurrentPeimFvCount =0 to go
494 // through all the FV.
495 //
496 Private->CurrentPeimFvCount = 0;
497
498 //
499 // PeimNeedingDispatch being TRUE means we found a PEIM that did not get
500 // dispatched. So we need to make another pass
501 //
502 // PeimDispatchOnThisPass being TRUE means we dispatched a PEIM on this
503 // pass. If we did not dispatch a PEIM there is no point in trying again
504 // as it will fail the next time too (nothing has changed).
505 //
506 } while (PeimNeedingDispatch && PeimDispatchOnThisPass);
507
508 }
509
510 VOID
511 InitializeDispatcherData (
512 IN PEI_CORE_INSTANCE *PrivateData,
513 IN PEI_CORE_INSTANCE *OldCoreData,
514 IN CONST EFI_SEC_PEI_HAND_OFF *SecCoreData
515 )
516 /*++
517
518 Routine Description:
519
520 Initialize the Dispatcher's data members
521
522 Arguments:
523
524 PeiServices - The PEI core services table.
525 OldCoreData - Pointer to old core data (before switching stack).
526 NULL if being run in non-permament memory mode.
527 SecCoreData - Points to a data structure containing information about the PEI core's operating
528 environment, such as the size and location of temporary RAM, the stack location and
529 the BFV location.
530
531 Returns:
532
533 None.
534
535 --*/
536 {
537 if (OldCoreData == NULL) {
538 PeiInitializeFv (PrivateData, SecCoreData);
539 }
540
541 return;
542 }
543
544
545 BOOLEAN
546 DepexSatisfied (
547 IN PEI_CORE_INSTANCE *Private,
548 IN EFI_PEI_FILE_HANDLE FileHandle,
549 IN UINTN PeimCount
550 )
551 /*++
552
553 Routine Description:
554
555 This routine parses the Dependency Expression, if available, and
556 decides if the module can be executed.
557
558 Arguments:
559 PeiServices - The PEI Service Table
560 CurrentPeimAddress - Address of the PEIM Firmware File under investigation
561
562 Returns:
563 TRUE - Can be dispatched
564 FALSE - Cannot be dispatched
565
566 --*/
567 {
568 EFI_STATUS Status;
569 VOID *DepexData;
570
571 if (PeimCount < Private->AprioriCount) {
572 //
573 // If its in the A priori file then we set Depex to TRUE
574 //
575 return TRUE;
576 }
577
578 Status = PeiServicesFfsFindSectionData (EFI_SECTION_PEI_DEPEX, FileHandle, (VOID **) &DepexData);
579 if (EFI_ERROR (Status)) {
580 //
581 // If there is no DEPEX, assume the module can be executed
582 //
583 return TRUE;
584 }
585
586 //
587 // Evaluate a given DEPEX
588 //
589 return PeimDispatchReadiness (&Private->PS, DepexData);
590 }
591
592 /**
593 This routine enable a PEIM to register itself to shadow when PEI Foundation
594 discovery permanent memory.
595
596 @param FileHandle File handle of a PEIM.
597
598 @retval EFI_NOT_FOUND The file handle doesn't point to PEIM itself.
599 @retval EFI_ALREADY_STARTED Indicate that the PEIM has been registered itself.
600 @retval EFI_SUCCESS Successfully to register itself.
601
602 **/
603 EFI_STATUS
604 EFIAPI
605 PeiRegisterForShadow (
606 IN EFI_PEI_FILE_HANDLE FileHandle
607 )
608 {
609 PEI_CORE_INSTANCE *Private;
610 Private = PEI_CORE_INSTANCE_FROM_PS_THIS (GetPeiServicesTablePointer ());
611
612 if (Private->CurrentFileHandle != FileHandle) {
613 //
614 // The FileHandle must be for the current PEIM
615 //
616 return EFI_NOT_FOUND;
617 }
618
619 if (Private->Fv[Private->CurrentPeimFvCount].PeimState[Private->CurrentPeimCount] >= PEIM_STATE_REGISITER_FOR_SHADOW) {
620 //
621 // If the PEIM has already entered the PEIM_STATE_REGISTER_FOR_SHADOW or PEIM_STATE_DONE then it's already been started
622 //
623 return EFI_ALREADY_STARTED;
624 }
625
626 Private->Fv[Private->CurrentPeimFvCount].PeimState[Private->CurrentPeimCount] = PEIM_STATE_REGISITER_FOR_SHADOW;
627
628 return EFI_SUCCESS;
629 }
630
631
632 /**
633 This routine invoke the PeiCore's entry in new stack environment.
634
635 @param Context1 The first context parameter is entry of PeiCore
636 @param Context2 The second context parameter is parameter structure point for PeiCore
637
638 **/
639 STATIC
640 VOID
641 InvokePeiCore (
642 VOID *Context1,
643 VOID *Context2
644 )
645 {
646 PEI_CORE_ENTRY_POINT PeiCoreEntryPoint;
647 PEI_CORE_PARAMETERS *PeiCoreParameters;
648
649 //
650 // Running on new stack in SEC Core
651 //
652
653 PeiCoreEntryPoint = (PEI_CORE_ENTRY_POINT) (UINTN) Context1;
654 PeiCoreParameters = (PEI_CORE_PARAMETERS *)Context2;
655
656 //
657 // Call PEI Core using new stack
658 //
659 PeiCoreEntryPoint (
660 PeiCoreParameters->SecCoreData,
661 PeiCoreParameters->PpiList,
662 PeiCoreParameters->Data
663 );
664
665 //
666 // Never returns
667 //
668 ASSERT_EFI_ERROR (FALSE);
669 }