/*++\r
\r
-Copyright (c) 2006, Intel Corporation \r
-All rights reserved. This program and the accompanying materials \r
-are licensed and made available under the terms and conditions of the BSD License \r
-which accompanies this distribution. The full text of the license may be found at \r
-http://opensource.org/licenses/bsd-license.php \r
- \r
-THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, \r
-WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. \r
+Copyright (c) 2006, Intel Corporation\r
+All rights reserved. This program and the accompanying materials\r
+are licensed and made available under the terms and conditions of the BSD License\r
+which accompanies this distribution. The full text of the license may be found at\r
+http://opensource.org/licenses/bsd-license.php\r
+\r
+THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
\r
Module Name:\r
\r
//\r
// Main PEI entry\r
//\r
-EFI_STATUS\r
-EFIAPI\r
-PeiMain (\r
- IN EFI_PEI_STARTUP_DESCRIPTOR *PeiStartupDescriptor\r
- )\r
-/*++\r
-\r
-Routine Description:\r
-\r
- Main entry point to Pei Core.\r
-\r
-Arguments:\r
-\r
- PeiStartupDescriptor - Information and services provided by SEC phase.\r
-\r
-Returns:\r
-\r
- This function never returns\r
-\r
---*/\r
-;\r
-\r
\r
EFI_STATUS\r
EFIAPI\r
\r
Routine Description:\r
\r
- The entry routine to Pei Core, invoked by PeiMain during transition\r
- from SEC to PEI. After switching stack in the PEI core, it will restart\r
- with the old core data.\r
+ Main entry point to Pei Core. After switching stack in the PEI core,\r
+ it will restart with the old core data.\r
\r
Arguments:\r
\r
\r
PeiServices - Calling context.\r
\r
- DependencyExpression - Pointer to a dependency expression. The Grammar adheres to \r
+ DependencyExpression - Pointer to a dependency expression. The Grammar adheres to\r
the BNF described above and is stored in postfix notation.\r
- Runnable - is True if the driver can be scheduled and False if the driver \r
- cannot be scheduled. This is the value that the schedulers \r
+ Runnable - is True if the driver can be scheduled and False if the driver\r
+ cannot be scheduled. This is the value that the schedulers\r
should use for deciding the state of the driver.\r
\r
Returns:\r
\r
EFI_SUCCESS - Successfully dispatched PEIM.\r
EFI_NOT_FOUND - The dispatch failed.\r
- \r
+\r
--*/\r
;\r
\r
\r
FwVolHeader - Pointer to the FV header of the volume to search.\r
This parameter must point to a valid FFS volume.\r
- \r
+\r
PeimFileHeader - Pointer to the current file from which to begin searching.\r
This pointer will be updated upon return to reflect the file found.\r
\r
Arguments:\r
\r
CoreData - The PEI core Private Data\r
- \r
+\r
Returns:\r
- \r
+\r
--*/\r
;\r
\r
NewHandOffHob - The new handoff HOB list.\r
\r
Returns:\r
- \r
+\r
--*/\r
;\r
\r
\r
Returns:\r
\r
- Status - EFI_SUCCESS if the PPI is in the database \r
+ Status - EFI_SUCCESS if the PPI is in the database\r
EFI_NOT_FOUND if the PPI is not in the database\r
--*/\r
;\r
\r
Routine Description:\r
\r
- This service enables PEIMs to ascertain the present value of the boot mode. \r
+ This service enables PEIMs to ascertain the present value of the boot mode.\r
\r
Arguments:\r
\r
PeiServices - The PEI core services table.\r
- BootMode - A pointer to contain the value of the boot mode. \r
+ BootMode - A pointer to contain the value of the boot mode.\r
\r
Returns:\r
\r
\r
Routine Description:\r
\r
- This service enables PEIMs to update the boot mode variable. \r
+ This service enables PEIMs to update the boot mode variable.\r
\r
Arguments:\r
\r
EFI_SUCCESS - Get the pointer of HOB List\r
EFI_NOT_AVAILABLE_YET - the HOB List is not yet published\r
EFI_INVALID_PARAMETER - HobList is NULL (in debug mode)\r
- \r
+\r
--*/\r
;\r
\r
- EFI_INVALID_PARAMETER if Hob is NULL\r
- EFI_NOT_AVAILABLE_YET if HobList is still not available.\r
- EFI_OUT_OF_RESOURCES if there is no more memory to grow the Hoblist.\r
- \r
+\r
--*/\r
;\r
\r
\r
Arguments:\r
PeiServices - Pointer to the PEI Core Services Table.\r
- \r
+\r
SearchType - Filter to find only files of this type.\r
Type EFI_FV_FILETYPE_ALL causes no filtering to be done.\r
- \r
+\r
FwVolHeader - Pointer to the FV header of the volume to search.\r
This parameter must point to a valid FFS volume.\r
- \r
+\r
FileHeader - Pointer to the current file from which to begin searching.\r
This pointer will be updated upon return to reflect the file found.\r
- \r
+\r
Returns:\r
EFI_NOT_FOUND - No files matching the search criteria were found\r
EFI_SUCCESS\r
\r
Returns:\r
Pointer to the Firmware Volume instance requested\r
- \r
+\r
EFI_INVALID_PARAMETER - FwVolHeader is NULL\r
- \r
+\r
EFI_SUCCESS - Firmware volume instance successfully found.\r
\r
--*/\r
Returns:\r
\r
Status - EFI_SUCCESS\r
- \r
+\r
--*/\r
;\r
\r
\r
Routine Description:\r
\r
- Memory allocation service on permanent memory, \r
+ Memory allocation service on permanent memory,\r
not usable prior to the memory installation.\r
\r
Arguments:\r
\r
Routine Description:\r
\r
- Memory allocation service on the CAR. \r
+ Memory allocation service on the CAR.\r
\r
Arguments:\r
\r
Status - EFI_SUCCESS The allocation was successful\r
EFI_OUT_OF_RESOURCES There is not enough heap to satisfy the requirement\r
to allocate the requested size.\r
- \r
+\r
--*/\r
;\r
\r
Arguments:\r
\r
PeiServices - Calling context.\r
- \r
+\r
PeimFileHeader - Peim file's header.\r
- \r
+\r
EntryPoint - Entry point of that Peim file.\r
\r
Returns:\r
\r
Status code.\r
- \r
+\r
--*/\r
;\r
\r
Arguments:\r
\r
PeiServices - The PEI core services table.\r
- \r
+\r
CodeType - Type of Status Code.\r
- \r
+\r
Value - Value to output for Status Code.\r
- \r
+\r
Instance - Instance Number of this status code.\r
- \r
+\r
CallerId - ID of the caller of this status code.\r
- \r
+\r
Data - Optional data associated with this status code.\r
\r
Returns:\r
\r
Status - EFI_NOT_AVAILABLE_YET. PPI not available yet.\r
- EFI_DEVICE_ERROR. Did not reset system.\r
- \r
- Otherwise, resets the system. \r
+\r
+ Otherwise, resets the system.\r
\r
--*/\r
;\r
\r
+/**\r
+ Transfers control to a function starting with a new stack.\r
+\r
+ Transfers control to the function specified by EntryPoint using the new stack\r
+ specified by NewStack and passing in the parameters specified by Context1 and\r
+ Context2. Context1 and Context2 are optional and may be NULL. The function\r
+ EntryPoint must never return.\r
+\r
+ If EntryPoint is NULL, then ASSERT().\r
+ If NewStack is NULL, then ASSERT().\r
+\r
+ @param EntryPoint A pointer to function to call with the new stack.\r
+ @param Context1 A pointer to the context to pass into the EntryPoint\r
+ function.\r
+ @param Context2 A pointer to the context to pass into the EntryPoint\r
+ function.\r
+ @param NewStack A pointer to the new stack to use for the EntryPoint\r
+ function.\r
+ @param NewBsp A pointer to the new BSP for the EntryPoint on IPF. It's\r
+ Reserved on other architectures.\r
+\r
+**/\r
+VOID\r
+EFIAPI\r
+PeiSwitchStacks (\r
+ IN SWITCH_STACK_ENTRY_POINT EntryPoint,\r
+ IN VOID *Context1, OPTIONAL\r
+ IN VOID *Context2, OPTIONAL\r
+ IN VOID *NewStack,\r
+ IN VOID *NewBsp\r
+ );\r
+\r
#endif\r