+++ /dev/null
-/** @file\r
- PeiSwitchStacks() function for PEI dispatcher.\r
-\r
- Copyright (c) 2006, Intel Corporation<BR>\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: String.c\r
-\r
-**/\r
-\r
-//\r
-// Include common header file for this module.\r
-//\r
-#include <PeiMain.h>\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
- SwitchStack (EntryPoint, Context1, Context2, NewStack);\r
-}\r
+++ /dev/null
-//++\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
-// IpfCpuCore.s\r
-//\r
-// Abstract:\r
-// IPF Specific assembly routines\r
-//\r
-//--\r
-\r
-.file "IpfCpuCore.s"\r
-\r
-#include "IpfMacro.i"\r
-\r
-//---------------------------------------------------------------------------------\r
-//++\r
-// GetHandOffStatus\r
-//\r
-// This routine is called by all processors simultaneously, to get some hand-off\r
-// status that has been captured by IPF dispatcher and recorded in kernel registers.\r
-//\r
-// Arguments :\r
-//\r
-// On Entry : None.\r
-//\r
-// Return Value: Lid, R20Status.\r
-//\r
-//--\r
-//----------------------------------------------------------------------------------\r
-PROCEDURE_ENTRY (GetHandOffStatus)\r
-\r
- NESTED_SETUP (0,2+0,0,0)\r
-\r
- mov r8 = ar.k6 // Health Status (Self test params)\r
- mov r9 = ar.k4 // LID bits\r
- mov r10 = ar.k3;; // SAL_E entry state\r
- mov r11 = ar.k1 // Return address to PAL\r
-\r
- NESTED_RETURN\r
-PROCEDURE_EXIT (GetHandOffStatus)\r
-//----------------------------------------------------------------------------------\r
-\r
-\r
+++ /dev/null
-/*++\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
-\r
-Module Name:\r
-\r
- IpfPeiMain.h\r
-\r
-Abstract:\r
-\r
- Definition of IPF specific function\r
-\r
-Revision History\r
-\r
---*/\r
-\r
-#ifndef _IPF_PEI_MAIN_H_\r
-#define _IPF_PEI_MAIN_H_\r
-\r
-#include <PeiMain.h>\r
-#include <IndustryStandard/Sal.h>\r
-\r
-SAL_RETURN_REGS\r
-GetHandOffStatus (\r
- VOID\r
- )\r
-/*++\r
-\r
-Routine Description:\r
-\r
- This routine is called by all processors simultaneously, to get some hand-off\r
- status that has been captured by IPF dispatcher and recorded in kernel registers.\r
- \r
-Arguments :\r
-\r
- On Entry : None.\r
-\r
-Returns:\r
-\r
- Lid, R20Status.\r
-\r
---*/\r
-\r
-;\r
-\r
-#endif\r
+++ /dev/null
-/** @file\r
- PeiSwitchStacks() function for PEI dispatcher.\r
-\r
- Copyright (c) 2006 - 2007, Intel Corporation<BR>\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: String.c\r
-\r
-**/\r
-\r
-#include <PeiMain.h>\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
- SwitchStack (\r
- EntryPoint,\r
- Context1,\r
- Context2,\r
- NewStack,\r
- NewBsp\r
- );\r
-}\r
+++ /dev/null
-/*++\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
-\r
-Module Name:\r
-\r
- SwitchToCacheMode.c\r
-\r
-Abstract:\r
-\r
- Ipf CAR specific function used to switch to cache mode for the later memory access\r
-\r
-Revision History\r
-\r
---*/\r
-\r
-#include "IpfPeiMain.h"\r
-#define RecoveryFn 0x03\r
-\r
-VOID\r
-SwitchToCacheMode (\r
- IN PEI_CORE_INSTANCE *CoreData\r
- )\r
-/*++\r
-\r
-Routine Description:\r
-\r
- Switch the PHIT pointers to cache mode after InstallPeiMemory in CAR.\r
-\r
-Arguments:\r
-\r
- CoreData - The PEI core Private Data\r
-\r
-Returns:\r
-\r
---*/\r
-{\r
- EFI_HOB_HANDOFF_INFO_TABLE *Phit;\r
-\r
- if ((GetHandOffStatus().r10 & 0xFF) == RecoveryFn) {\r
- CoreData->StackBase = CoreData->StackBase & CACHE_MODE_ADDRESS_MASK;\r
- CoreData->HobList.Raw = (UINT8 *)((UINTN)CoreData->HobList.Raw & CACHE_MODE_ADDRESS_MASK);\r
-\r
- //\r
- // Change the PHIT pointer value to cache mode\r
- //\r
- Phit = CoreData->HobList.HandoffInformationTable;\r
-\r
- Phit->EfiMemoryTop = Phit->EfiMemoryTop & CACHE_MODE_ADDRESS_MASK;\r
- Phit->EfiFreeMemoryTop = Phit->EfiFreeMemoryTop & CACHE_MODE_ADDRESS_MASK;\r
- Phit->EfiMemoryBottom = Phit->EfiMemoryBottom & CACHE_MODE_ADDRESS_MASK;\r
- Phit->EfiFreeMemoryBottom = Phit->EfiFreeMemoryBottom & CACHE_MODE_ADDRESS_MASK;\r
- Phit->EfiEndOfHobList = Phit->EfiEndOfHobList & CACHE_MODE_ADDRESS_MASK;\r
- }\r
-\r
- return;\r
-}\r
--*/\r
;\r
\r
-#if defined (MDE_CPU_IPF)\r
- //\r
- // In Ipf we should make special changes for the PHIT pointers to support\r
- // recovery boot in cache mode.\r
- //\r
-#define SWITCH_TO_CACHE_MODE(CoreData) SwitchToCacheMode(CoreData)\r
-#define CACHE_MODE_ADDRESS_MASK 0x7FFFFFFFFFFFFFFFULL\r
-VOID\r
-SwitchToCacheMode (\r
- IN PEI_CORE_INSTANCE *CoreData\r
-)\r
-/*++\r
-\r
-Routine Description:\r
-\r
- Switch the PHIT pointers to cache mode after InstallPeiMemory in CAR.\r
-\r
-Arguments:\r
-\r
- CoreData - The PEI core Private Data\r
-\r
-Returns:\r
-\r
---*/\r
-;\r
-\r
-#else\r
-\r
-#define SWITCH_TO_CACHE_MODE(CoreData)\r
-\r
-#endif\r
-\r
//\r
// PPI support functions\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
EFI_STATUS\r
PeiFindFileEx (\r
IN CONST EFI_PEI_FV_HANDLE FvHandle,\r
BootMode/BootMode.c\r
PeiMain.h\r
\r
-[Sources.Ia32]\r
- Dispatcher/Stack.c\r
-\r
-[Sources.X64]\r
- Dispatcher/Stack.c\r
-\r
-[Sources.IPF]\r
- Ipf/Stack.c\r
- Ipf/IpfPeiMain.h\r
- Ipf/IpfCpuCore.s\r
- Ipf/SwitchToCacheMode.c\r
-\r
-[Sources.EBC]\r
- Dispatcher/Stack.c\r
-\r
[Packages]\r
MdeModulePkg/MdeModulePkg.dec\r
MdePkg/MdePkg.dec\r