3 Copyright (c) 2006 - 2007, 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
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.
18 Definition of Pei Core Structures and Services
28 #include <FrameworkPei.h>
29 #include <Guid/StatusCodeDataTypeId.h>
30 #include <Ppi/DxeIpl.h>
31 #include <Ppi/MemoryDiscovered.h>
32 #include <Ppi/FindFv.h>
33 #include <Ppi/StatusCode.h>
34 #include <Ppi/Security.h>
35 #include <Ppi/Reset.h>
36 #include <Ppi/FvLoadFile.h>
37 #include <Library/DebugLib.h>
38 #include <Library/PeiCoreEntryPoint.h>
39 #include <Library/BaseLib.h>
40 #include <Library/HobLib.h>
41 #include <Library/PerformanceLib.h>
42 #include <Library/PeiServicesLib.h>
43 #include <Library/ReportStatusCodeLib.h>
44 #include <Library/PeCoffGetEntryPointLib.h>
45 #include <Library/BaseMemoryLib.h>
46 #include <Library/TimerLib.h>
47 #include <IndustryStandard/PeImage.h>
48 #include <Library/PeiServicesTablePointerLib.h>
50 extern EFI_GUID gEfiPeiCorePrivateGuid
;
52 #define PEI_CORE_INTERNAL_FFS_FILE_DISPATCH_TYPE 0xff
55 // Pei Core private data structures
58 EFI_PEI_PPI_DESCRIPTOR
*Ppi
;
59 EFI_PEI_NOTIFY_DESCRIPTOR
*Notify
;
61 } PEI_PPI_LIST_POINTERS
;
63 #define PEI_STACK_SIZE 0x20000
65 #define MAX_PPI_DESCRIPTORS 64
71 INTN LastDispatchedInstall
;
72 INTN LastDispatchedNotify
;
73 PEI_PPI_LIST_POINTERS PpiListPtrs
[MAX_PPI_DESCRIPTORS
];
77 #define PEI_CORE_MAX_FV_SUPPORTED 4
78 #define PEI_CORE_MAX_PEIM_PER_FV 32
81 // PEI_CORE_FV_HANDE.PeimState
82 // Do not change these values as there is code doing math to change states.
83 // Look for Private->Fv[FvCount].PeimState[PeimCount]++;
85 #define PEIM_STATE_NOT_DISPATCHED 0x00
86 #define PEIM_STATE_DISPATCHED 0x01
87 #define PEIM_STATE_REGISITER_FOR_SHADOW 0x02
88 #define PEIM_STATE_DONE 0x03
91 EFI_FIRMWARE_VOLUME_HEADER
*FvHeader
;
92 UINT8 PeimState
[PEI_CORE_MAX_PEIM_PER_FV
];
93 EFI_PEI_FILE_HANDLE FvFileHandles
[PEI_CORE_MAX_PEIM_PER_FV
];
100 UINT32 DispatchedPeimBitMap
;
101 UINT32 PreviousPeimBitMap
;
102 EFI_FFS_FILE_HEADER
*CurrentPeimAddress
;
103 EFI_FIRMWARE_VOLUME_HEADER
*CurrentFvAddress
;
104 EFI_FIRMWARE_VOLUME_HEADER
*BootFvAddress
;
105 EFI_PEI_FIND_FV_PPI
*FindFv
;
106 } PEI_CORE_DISPATCH_DATA
;
110 // Pei Core private data structure instance
113 #define PEI_CORE_HANDLE_SIGNATURE EFI_SIGNATURE_32('P','e','i','C')
117 EFI_PEI_SERVICES
*PS
; // Point to ServiceTableShadow
118 PEI_PPI_DATABASE PpiData
;
119 PEI_CORE_DISPATCH_DATA DispatchData
;
121 PEI_CORE_FV_HANDLE Fv
[PEI_CORE_MAX_FV_SUPPORTED
];
122 EFI_PEI_FILE_HANDLE CurrentFvFileHandles
[PEI_CORE_MAX_PEIM_PER_FV
];
124 UINTN CurrentPeimFvCount
;
125 UINTN CurrentPeimCount
;
126 EFI_PEI_FILE_HANDLE CurrentFileHandle
;
128 EFI_PEI_FV_HANDLE AllFv
[PEI_CORE_MAX_FV_SUPPORTED
];
129 EFI_PEI_HOB_POINTERS HobList
;
130 BOOLEAN SwitchStackSignal
;
131 BOOLEAN PeiMemoryInstalled
;
132 EFI_PHYSICAL_ADDRESS StackBase
;
134 VOID
*BottomOfCarHeap
;
137 EFI_PEI_SECURITY_PPI
*PrivateSecurityPpi
;
138 EFI_PEI_SERVICES ServiceTableShadow
;
139 UINTN SizeOfCacheAsRam
;
140 VOID
*MaxTopOfCarHeap
;
144 // Pei Core Instance Data Macros
147 #define PEI_CORE_INSTANCE_FROM_PS_THIS(a) \
148 CR(a, PEI_CORE_INSTANCE, PS, PEI_CORE_HANDLE_SIGNATURE)
151 // BUGBUG: Where does this go really?
155 (EFIAPI
*PEI_CORE_ENTRY_POINT
)(
156 IN CONST EFI_SEC_PEI_HAND_OFF
*SecCoreData
,
157 IN CONST EFI_PEI_PPI_DESCRIPTOR
*PpiList
,
158 IN PEI_CORE_INSTANCE
*OldCoreData
162 // Union of temporarily used function pointers (to save stack space)
165 PEI_CORE_ENTRY_POINT PeiCore
;
166 EFI_PEIM_ENTRY_POINT2 PeimEntry
;
167 EFI_PEIM_NOTIFY_ENTRY_POINT PeimNotifyEntry
;
168 EFI_DXE_IPL_PPI
*DxeIpl
;
169 EFI_PEI_PPI_DESCRIPTOR
*PpiDescriptor
;
170 EFI_PEI_NOTIFY_DESCRIPTOR
*NotifyDescriptor
;
172 } PEI_CORE_TEMP_POINTERS
;
177 CONST EFI_SEC_PEI_HAND_OFF
*SecCoreData
;
178 EFI_PEI_PPI_DESCRIPTOR
*PpiList
;
180 } PEI_CORE_PARAMETERS
;
188 IN CONST EFI_SEC_PEI_HAND_OFF
*SecCoreData
,
189 IN CONST EFI_PEI_PPI_DESCRIPTOR
*PpList
,
196 The entry routine to Pei Core, invoked by PeiMain during transition
197 from SEC to PEI. After switching stack in the PEI core, it will restart
198 with the old core data.
202 PeiStartupDescriptor - Information and services provided by SEC phase.
203 OldCoreData - Pointer to old core data that is used to initialize the
208 This function never returns
209 EFI_NOT_FOUND - Never reach
215 // Dispatcher support functions
219 PeimDispatchReadiness (
220 IN EFI_PEI_SERVICES
**PeiServices
,
221 IN VOID
*DependencyExpression
,
222 IN OUT BOOLEAN
*Runnable
228 This is the POSTFIX version of the dependency evaluator. When a
229 PUSH [PPI GUID] is encountered, a pointer to the GUID is stored on
230 the evaluation stack. When that entry is poped from the evaluation
231 stack, the PPI is checked if it is installed. This method allows
232 some time savings as not all PPIs must be checked for certain
233 operation types (AND, OR).
237 PeiServices - Calling context.
239 DependencyExpression - Pointer to a dependency expression. The Grammar adheres to
240 the BNF described above and is stored in postfix notation.
241 Runnable - is True if the driver can be scheduled and False if the driver
242 cannot be scheduled. This is the value that the schedulers
243 should use for deciding the state of the driver.
247 Status = EFI_SUCCESS if it is a well-formed Grammar
248 EFI_INVALID_PARAMETER if the dependency expression overflows
250 EFI_INVALID_PARAMETER if the dependency expression underflows
252 EFI_INVALID_PARAMETER if the dependency expression is not a
260 IN CONST EFI_SEC_PEI_HAND_OFF
*SecCoreData
,
261 IN PEI_CORE_INSTANCE
*PrivateData
,
262 IN PEI_CORE_DISPATCH_DATA
*DispatchData
269 Conduct PEIM dispatch.
273 PeiStartupDescriptor - Pointer to IN EFI_PEI_STARTUP_DESCRIPTOR
274 PrivateData - Pointer to the private data passed in from caller
275 DispatchData - Pointer to PEI_CORE_DISPATCH_DATA data.
279 EFI_SUCCESS - Successfully dispatched PEIM.
280 EFI_NOT_FOUND - The dispatch failed.
287 InitializeDispatcherData (
288 IN EFI_PEI_SERVICES
**PeiServices
,
289 IN PEI_CORE_INSTANCE
*OldCoreData
,
290 IN CONST EFI_SEC_PEI_HAND_OFF
*SecCoreData
296 Initialize the Dispatcher's data members
300 PeiServices - The PEI core services table.
301 OldCoreData - Pointer to old core data (before switching stack).
302 NULL if being run in non-permament memory mode.
303 PeiStartupDescriptor - Information and services provided by SEC phase.
316 IN EFI_PEI_SERVICES
**PeiServices
,
317 IN EFI_FIRMWARE_VOLUME_HEADER
*FwVolHeader
,
318 IN OUT EFI_FFS_FILE_HEADER
**PeimFileHeader
323 Given the input file pointer, search for the next matching file in the
324 FFS volume. The search starts from FileHeader inside
325 the Firmware Volume defined by FwVolHeader.
328 PeiServices - Pointer to the PEI Core Services Table.
330 FwVolHeader - Pointer to the FV header of the volume to search.
331 This parameter must point to a valid FFS volume.
333 PeimFileHeader - Pointer to the current file from which to begin searching.
334 This pointer will be updated upon return to reflect the file found.
337 EFI_NOT_FOUND - No files matching the search criteria were found
345 IN UINT8 CurrentPeim
,
346 IN UINT32 DispatchedPeimBitMap
352 This routine checks to see if a particular PEIM has been dispatched during
353 the PEI core dispatch.
356 CurrentPeim - The PEIM/FV in the bit array to check.
357 DispatchedPeimBitMap - Bit array, each bit corresponds to a PEIM/FV.
360 TRUE if PEIM already dispatched
368 IN EFI_PEI_SERVICES
**PeiServices
,
369 IN UINT8 CurrentPeim
,
370 OUT UINT32
*DispatchedPeimBitMap
376 This routine sets a PEIM as having been dispatched once its entry
377 point has been invoked.
381 PeiServices - The PEI core services table.
382 CurrentPeim - The PEIM/FV in the bit array to check.
383 DispatchedPeimBitMap - Bit array, each bit corresponds to a PEIM/FV.
393 IN EFI_PEI_SERVICES
**PeiServices
,
394 IN VOID
*CurrentPeimAddress
400 This routine parses the Dependency Expression, if available, and
401 decides if the module can be executed.
404 PeiServices - The PEI Service Table
405 CurrentPeimAddress - Address of the PEIM Firmware File under investigation
408 TRUE - Can be dispatched
409 FALSE - Cannot be dispatched
414 #if defined (MDE_CPU_IPF)
416 // In Ipf we should make special changes for the PHIT pointers to support
417 // recovery boot in cache mode.
419 #define SWITCH_TO_CACHE_MODE(CoreData) SwitchToCacheMode(CoreData)
420 #define CACHE_MODE_ADDRESS_MASK 0x7FFFFFFFFFFFFFFFULL
423 IN PEI_CORE_INSTANCE
*CoreData
429 Switch the PHIT pointers to cache mode after InstallPeiMemory in CAR.
433 CoreData - The PEI core Private Data
442 #define SWITCH_TO_CACHE_MODE(CoreData)
447 // PPI support functions
450 InitializePpiServices (
451 IN EFI_PEI_SERVICES
**PeiServices
,
452 IN PEI_CORE_INSTANCE
*OldCoreData
458 Initialize PPI services.
462 PeiServices - The PEI core services table.
463 OldCoreData - Pointer to the PEI Core data.
464 NULL if being run in non-permament memory mode.
474 IN CONST EFI_PEI_SERVICES
**PeiServices
,
475 IN EFI_HOB_HANDOFF_INFO_TABLE
*OldHandOffHob
,
476 IN EFI_HOB_HANDOFF_INFO_TABLE
*NewHandOffHob
482 Migrate the Hob list from the CAR stack to PEI installed memory.
486 PeiServices - The PEI core services table.
487 OldHandOffHob - The old handoff HOB list.
488 NewHandOffHob - The new handoff HOB list.
498 IN CONST EFI_PEI_SERVICES
**PeiServices
,
499 IN CONST EFI_PEI_PPI_DESCRIPTOR
*PpiList
505 Install PPI services.
509 PeiServices - Pointer to the PEI Service Table
510 PpiList - Pointer to a list of PEI PPI Descriptors.
514 EFI_SUCCESS - if all PPIs in PpiList are successfully installed.
515 EFI_INVALID_PARAMETER - if PpiList is NULL pointer
516 EFI_INVALID_PARAMETER - if any PPI in PpiList is not valid
517 EFI_OUT_OF_RESOURCES - if there is no more memory resource to install PPI
525 IN CONST EFI_PEI_SERVICES
**PeiServices
,
526 IN CONST EFI_PEI_PPI_DESCRIPTOR
*OldPpi
,
527 IN CONST EFI_PEI_PPI_DESCRIPTOR
*NewPpi
533 Re-Install PPI services.
537 PeiServices - Pointer to the PEI Service Table
538 OldPpi - Pointer to the old PEI PPI Descriptors.
539 NewPpi - Pointer to the new PEI PPI Descriptors.
543 EFI_SUCCESS - if the operation was successful
544 EFI_INVALID_PARAMETER - if OldPpi or NewPpi is NULL
545 EFI_INVALID_PARAMETER - if NewPpi is not valid
546 EFI_NOT_FOUND - if the PPI was not in the database
554 IN CONST EFI_PEI_SERVICES
**PeiServices
,
555 IN CONST EFI_GUID
*Guid
,
557 IN OUT EFI_PEI_PPI_DESCRIPTOR
**PpiDescriptor
,
564 Locate a given named PPI.
568 PeiServices - Pointer to the PEI Service Table
569 Guid - Pointer to GUID of the PPI.
570 Instance - Instance Number to discover.
571 PpiDescriptor - Pointer to reference the found descriptor. If not NULL,
572 returns a pointer to the descriptor (includes flags, etc)
573 Ppi - Pointer to reference the found PPI
577 Status - EFI_SUCCESS if the PPI is in the database
578 EFI_NOT_FOUND if the PPI is not in the database
585 IN CONST EFI_PEI_SERVICES
**PeiServices
,
586 IN CONST EFI_PEI_NOTIFY_DESCRIPTOR
*NotifyList
592 Install a notification for a given PPI.
596 PeiServices - Pointer to the PEI Service Table
597 NotifyList - Pointer to list of Descriptors to notify upon.
601 Status - EFI_SUCCESS if successful
602 EFI_OUT_OF_RESOURCES if no space in the database
603 EFI_INVALID_PARAMETER if not a good decriptor
610 IN EFI_PEI_SERVICES
**PeiServices
616 Process the Notify List at dispatch level.
620 PeiServices - Pointer to the PEI Service Table
629 IN CONST EFI_PEI_SERVICES
**PeiServices
,
631 IN INTN InstallStartIndex
,
632 IN INTN InstallStopIndex
,
633 IN INTN NotifyStartIndex
,
634 IN INTN NotifyStopIndex
640 Dispatch notifications.
644 PeiServices - Pointer to the PEI Service Table
645 NotifyType - Type of notify to fire.
646 InstallStartIndex - Install Beginning index.
647 InstallStopIndex - Install Ending index.
648 NotifyStartIndex - Notify Beginning index.
649 NotifyStopIndex - Notify Ending index.
657 // Boot mode support functions
662 IN CONST EFI_PEI_SERVICES
**PeiServices
,
663 IN OUT EFI_BOOT_MODE
*BootMode
669 This service enables PEIMs to ascertain the present value of the boot mode.
673 PeiServices - The PEI core services table.
674 BootMode - A pointer to contain the value of the boot mode.
678 EFI_SUCCESS - The boot mode was returned successfully.
679 EFI_INVALID_PARAMETER - BootMode is NULL.
687 IN CONST EFI_PEI_SERVICES
**PeiServices
,
688 IN EFI_BOOT_MODE BootMode
694 This service enables PEIMs to update the boot mode variable.
698 PeiServices - The PEI core services table.
699 BootMode - The value of the boot mode to set.
703 EFI_SUCCESS - The value was successfully updated
709 // Security support functions
712 InitializeSecurityServices (
713 IN EFI_PEI_SERVICES
**PeiServices
,
714 IN PEI_CORE_INSTANCE
*OldCoreData
720 Initialize the security services.
724 PeiServices - The PEI core services table.
725 OldCoreData - Pointer to the old core data.
726 NULL if being run in non-permament memory mode.
736 IN EFI_FIRMWARE_VOLUME_HEADER
*CurrentFvAddress
742 Provide a callout to the OEM FV verification service.
746 CurrentFvAddress - Pointer to the FV under investigation.
758 IN EFI_PEI_SERVICES
**PeiServices
,
759 IN EFI_FFS_FILE_HEADER
*CurrentPeimAddress
765 Provide a callout to the security verification service.
769 PeiServices - The PEI core services table.
770 CurrentPeimAddress - Pointer to the Firmware File under investigation.
774 EFI_SUCCESS - Image is OK
775 EFI_SECURITY_VIOLATION - Image is illegal
784 IN CONST EFI_PEI_SERVICES
**PeiServices
,
785 IN OUT VOID
**HobList
791 Gets the pointer to the HOB List.
795 PeiServices - The PEI core services table.
796 HobList - Pointer to the HOB List.
800 EFI_SUCCESS - Get the pointer of HOB List
801 EFI_NOT_AVAILABLE_YET - the HOB List is not yet published
802 EFI_INVALID_PARAMETER - HobList is NULL (in debug mode)
810 IN CONST EFI_PEI_SERVICES
**PeiServices
,
819 Add a new HOB to the HOB List.
823 PeiServices - The PEI core services table.
824 Type - Type of the new HOB.
825 Length - Length of the new HOB to allocate.
826 Hob - Pointer to the new HOB.
831 - EFI_INVALID_PARAMETER if Hob is NULL
832 - EFI_NOT_AVAILABLE_YET if HobList is still not available.
833 - EFI_OUT_OF_RESOURCES if there is no more memory to grow the Hoblist.
839 PeiCoreBuildHobHandoffInfoTable (
840 IN EFI_BOOT_MODE BootMode
,
841 IN EFI_PHYSICAL_ADDRESS MemoryBegin
,
842 IN UINT64 MemoryLength
848 Builds a Handoff Information Table HOB
852 BootMode - Current Bootmode
853 MemoryBegin - Start Memory Address.
854 MemoryLength - Length of Memory.
865 // FFS Fw Volume support functions
870 IN CONST EFI_PEI_SERVICES
**PeiServices
,
872 IN EFI_PEI_FV_HANDLE FwVolHeader
,
873 IN OUT EFI_PEI_FILE_HANDLE
*FileHeader
878 Given the input file pointer, search for the next matching file in the
879 FFS volume as defined by SearchType. The search starts from FileHeader inside
880 the Firmware Volume defined by FwVolHeader.
883 PeiServices - Pointer to the PEI Core Services Table.
885 SearchType - Filter to find only files of this type.
886 Type EFI_FV_FILETYPE_ALL causes no filtering to be done.
888 FwVolHeader - Pointer to the FV header of the volume to search.
889 This parameter must point to a valid FFS volume.
891 FileHeader - Pointer to the current file from which to begin searching.
892 This pointer will be updated upon return to reflect the file found.
895 EFI_NOT_FOUND - No files matching the search criteria were found
903 PeiFfsFindSectionData (
904 IN CONST EFI_PEI_SERVICES
**PeiServices
,
905 IN EFI_SECTION_TYPE SectionType
,
906 IN EFI_PEI_FILE_HANDLE FfsFileHeader
,
907 IN OUT VOID
**SectionData
912 Given the input file pointer, search for the next matching section in the
916 PeiServices - Pointer to the PEI Core Services Table.
917 SearchType - Filter to find only sections of this type.
918 FfsFileHeader - Pointer to the current file to search.
919 SectionData - Pointer to the Section matching SectionType in FfsFileHeader.
920 - NULL if section not found
923 EFI_NOT_FOUND - No files matching the search criteria were found
931 PeiFvFindNextVolume (
932 IN CONST EFI_PEI_SERVICES
**PeiServices
,
934 IN OUT EFI_PEI_FV_HANDLE
*FwVolHeader
940 Return the BFV location
942 BugBug -- Move this to the location of this code to where the
943 other FV and FFS support code lives.
944 Also, update to use FindFV for instances #'s >= 1.
948 PeiServices - The PEI core services table.
949 Instance - Instance of FV to find
950 FwVolHeader - Pointer to contain the data to return
953 Pointer to the Firmware Volume instance requested
955 EFI_INVALID_PARAMETER - FwVolHeader is NULL
957 EFI_SUCCESS - Firmware volume instance successfully found.
963 // Memory support functions
966 InitializeMemoryServices (
967 IN EFI_PEI_SERVICES
**PeiServices
,
968 IN CONST EFI_SEC_PEI_HAND_OFF
*SecCoreData
,
969 IN PEI_CORE_INSTANCE
*OldCoreData
975 Initialize the memory services.
979 PeiServices - The PEI core services table.
980 PeiStartupDescriptor - Information and services provided by SEC phase.
981 OldCoreData - Pointer to the PEI Core data.
982 NULL if being run in non-permament memory mode.
993 PeiInstallPeiMemory (
994 IN CONST EFI_PEI_SERVICES
**PeiServices
,
995 IN EFI_PHYSICAL_ADDRESS MemoryBegin
,
996 IN UINT64 MemoryLength
1000 Routine Description:
1002 Install the permanent memory is now available.
1003 Creates HOB (PHIT and Stack).
1007 PeiServices - The PEI core services table.
1008 MemoryBegin - Start of memory address.
1009 MemoryLength - Length of memory.
1013 Status - EFI_SUCCESS
1021 IN CONST EFI_PEI_SERVICES
**PeiServices
,
1022 IN EFI_MEMORY_TYPE MemoryType
,
1024 OUT EFI_PHYSICAL_ADDRESS
*Memory
1028 Routine Description:
1030 Memory allocation service on permanent memory,
1031 not usable prior to the memory installation.
1035 PeiServices - The PEI core services table.
1036 Type - Type of allocation.
1037 MemoryType - Type of memory to allocate.
1038 Pages - Number of pages to allocate.
1039 Memory - Pointer of memory allocated.
1043 Status - EFI_SUCCESS The allocation was successful
1044 EFI_INVALID_PARAMETER Only AllocateAnyAddress is supported.
1045 EFI_NOT_AVAILABLE_YET Called with permanent memory not available
1046 EFI_OUT_OF_RESOURCES There is not enough HOB heap to satisfy the requirement
1047 to allocate the number of pages.
1055 IN CONST EFI_PEI_SERVICES
**PeiServices
,
1061 Routine Description:
1063 Memory allocation service on the CAR.
1067 PeiServices - The PEI core services table.
1069 Size - Amount of memory required
1071 Buffer - Address of pointer to the buffer
1075 Status - EFI_SUCCESS The allocation was successful
1076 EFI_OUT_OF_RESOURCES There is not enough heap to satisfy the requirement
1077 to allocate the requested size.
1084 IN EFI_PEI_SERVICES
**PeiServices
,
1085 IN EFI_FFS_FILE_HEADER
*PeimFileHeader
,
1086 OUT VOID
**EntryPoint
1090 Routine Description:
1092 Get entry point of a Peim file.
1096 PeiServices - Calling context.
1098 PeimFileHeader - Peim file's header.
1100 EntryPoint - Entry point of that Peim file.
1112 PeiReportStatusCode (
1113 IN CONST EFI_PEI_SERVICES
**PeiServices
,
1114 IN EFI_STATUS_CODE_TYPE CodeType
,
1115 IN EFI_STATUS_CODE_VALUE Value
,
1117 IN CONST EFI_GUID
*CallerId
,
1118 IN CONST EFI_STATUS_CODE_DATA
*Data OPTIONAL
1122 Routine Description:
1124 Core version of the Status Code reporter
1128 PeiServices - The PEI core services table.
1130 CodeType - Type of Status Code.
1132 Value - Value to output for Status Code.
1134 Instance - Instance Number of this status code.
1136 CallerId - ID of the caller of this status code.
1138 Data - Optional data associated with this status code.
1142 Status - EFI_SUCCESS if status code is successfully reported
1143 - EFI_NOT_AVAILABLE_YET if StatusCodePpi has not been installed
1152 IN EFI_PEI_SERVICES
**PeiServices
1156 Routine Description:
1158 Core version of the Reset System
1162 PeiServices - The PEI core services table.
1166 Status - EFI_NOT_AVAILABLE_YET. PPI not available yet.
1167 - EFI_DEVICE_ERROR. Did not reset system.
1169 Otherwise, resets the system.
1175 This routine enable a PEIM to register itself to shadow when PEI Foundation
1176 discovery permanent memory.
1178 @param FileHandle File handle of a PEIM.
1180 @retval EFI_NOT_FOUND The file handle doesn't point to PEIM itself.
1181 @retval EFI_ALREADY_STARTED Indicate that the PEIM has been registered itself.
1182 @retval EFI_SUCCESS Successfully to register itself.
1187 PeiRegisterForShadow (
1188 IN EFI_PEI_FILE_HANDLE FileHandle
1193 Transfers control to a function starting with a new stack.
1195 Transfers control to the function specified by EntryPoint using the new stack
1196 specified by NewStack and passing in the parameters specified by Context1 and
1197 Context2. Context1 and Context2 are optional and may be NULL. The function
1198 EntryPoint must never return.
1200 If EntryPoint is NULL, then ASSERT().
1201 If NewStack is NULL, then ASSERT().
1203 @param EntryPoint A pointer to function to call with the new stack.
1204 @param Context1 A pointer to the context to pass into the EntryPoint
1206 @param Context2 A pointer to the context to pass into the EntryPoint
1208 @param NewStack A pointer to the new stack to use for the EntryPoint
1210 @param NewBsp A pointer to the new BSP for the EntryPoint on IPF. It's
1211 Reserved on other architectures.
1217 IN SWITCH_STACK_ENTRY_POINT EntryPoint
,
1218 IN VOID
*Context1
, OPTIONAL
1219 IN VOID
*Context2
, OPTIONAL