For Itanium platform, the switch CAR action has been moved to SecCore according to PI specification, so I clean up the PeiCore to remove stack related code.

git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@4803 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
klu2 2008-03-07 05:42:04 +00:00
parent 1fbc8fcbd2
commit 94578ce61a
7 changed files with 0 additions and 361 deletions

View File

@ -1,55 +0,0 @@
/** @file
PeiSwitchStacks() function for PEI dispatcher.
Copyright (c) 2006, Intel Corporation<BR>
All rights reserved. This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD License
which accompanies this distribution. The full text of the license may be found at
http://opensource.org/licenses/bsd-license.php
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
Module Name: String.c
**/
//
// Include common header file for this module.
//
#include <PeiMain.h>
/**
Transfers control to a function starting with a new stack.
Transfers control to the function specified by EntryPoint using the new stack
specified by NewStack and passing in the parameters specified by Context1 and
Context2. Context1 and Context2 are optional and may be NULL. The function
EntryPoint must never return.
If EntryPoint is NULL, then ASSERT().
If NewStack is NULL, then ASSERT().
@param EntryPoint A pointer to function to call with the new stack.
@param Context1 A pointer to the context to pass into the EntryPoint
function.
@param Context2 A pointer to the context to pass into the EntryPoint
function.
@param NewStack A pointer to the new stack to use for the EntryPoint
function.
@param NewBsp A pointer to the new BSP for the EntryPoint on IPF. It's
Reserved on other architectures.
**/
VOID
EFIAPI
PeiSwitchStacks (
IN SWITCH_STACK_ENTRY_POINT EntryPoint,
IN VOID *Context1, OPTIONAL
IN VOID *Context2, OPTIONAL
IN VOID *NewStack,
IN VOID *NewBsp
)
{
SwitchStack (EntryPoint, Context1, Context2, NewStack);
}

View File

@ -1,52 +0,0 @@
//++
// Copyright (c) 2006, Intel Corporation
// All rights reserved. This program and the accompanying materials
// are licensed and made available under the terms and conditions of the BSD License
// which accompanies this distribution. The full text of the license may be found at
// http://opensource.org/licenses/bsd-license.php
//
// THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
// WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
//
// Module Name:
//
// IpfCpuCore.s
//
// Abstract:
// IPF Specific assembly routines
//
//--
.file "IpfCpuCore.s"
#include "IpfMacro.i"
//---------------------------------------------------------------------------------
//++
// GetHandOffStatus
//
// This routine is called by all processors simultaneously, to get some hand-off
// status that has been captured by IPF dispatcher and recorded in kernel registers.
//
// Arguments :
//
// On Entry : None.
//
// Return Value: Lid, R20Status.
//
//--
//----------------------------------------------------------------------------------
PROCEDURE_ENTRY (GetHandOffStatus)
NESTED_SETUP (0,2+0,0,0)
mov r8 = ar.k6 // Health Status (Self test params)
mov r9 = ar.k4 // LID bits
mov r10 = ar.k3;; // SAL_E entry state
mov r11 = ar.k1 // Return address to PAL
NESTED_RETURN
PROCEDURE_EXIT (GetHandOffStatus)
//----------------------------------------------------------------------------------

View File

@ -1,53 +0,0 @@
/*++
Copyright (c) 2006, Intel Corporation
All rights reserved. This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD License
which accompanies this distribution. The full text of the license may be found at
http://opensource.org/licenses/bsd-license.php
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
Module Name:
IpfPeiMain.h
Abstract:
Definition of IPF specific function
Revision History
--*/
#ifndef _IPF_PEI_MAIN_H_
#define _IPF_PEI_MAIN_H_
#include <PeiMain.h>
#include <IndustryStandard/Sal.h>
SAL_RETURN_REGS
GetHandOffStatus (
VOID
)
/*++
Routine Description:
This routine is called by all processors simultaneously, to get some hand-off
status that has been captured by IPF dispatcher and recorded in kernel registers.
Arguments :
On Entry : None.
Returns:
Lid, R20Status.
--*/
;
#endif

View File

@ -1,58 +0,0 @@
/** @file
PeiSwitchStacks() function for PEI dispatcher.
Copyright (c) 2006 - 2007, Intel Corporation<BR>
All rights reserved. This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD License
which accompanies this distribution. The full text of the license may be found at
http://opensource.org/licenses/bsd-license.php
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
Module Name: String.c
**/
#include <PeiMain.h>
/**
Transfers control to a function starting with a new stack.
Transfers control to the function specified by EntryPoint using the new stack
specified by NewStack and passing in the parameters specified by Context1 and
Context2. Context1 and Context2 are optional and may be NULL. The function
EntryPoint must never return.
If EntryPoint is NULL, then ASSERT().
If NewStack is NULL, then ASSERT().
@param EntryPoint A pointer to function to call with the new stack.
@param Context1 A pointer to the context to pass into the EntryPoint
function.
@param Context2 A pointer to the context to pass into the EntryPoint
function.
@param NewStack A pointer to the new stack to use for the EntryPoint
function.
@param NewBsp A pointer to the new BSP for the EntryPoint on IPF. It's
Reserved on other architectures.
**/
VOID
EFIAPI
PeiSwitchStacks (
IN SWITCH_STACK_ENTRY_POINT EntryPoint,
IN VOID *Context1, OPTIONAL
IN VOID *Context2, OPTIONAL
IN VOID *NewStack,
IN VOID *NewBsp
)
{
SwitchStack (
EntryPoint,
Context1,
Context2,
NewStack,
NewBsp
);
}

View File

@ -1,64 +0,0 @@
/*++
Copyright (c) 2006, Intel Corporation
All rights reserved. This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD License
which accompanies this distribution. The full text of the license may be found at
http://opensource.org/licenses/bsd-license.php
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
Module Name:
SwitchToCacheMode.c
Abstract:
Ipf CAR specific function used to switch to cache mode for the later memory access
Revision History
--*/
#include "IpfPeiMain.h"
#define RecoveryFn 0x03
VOID
SwitchToCacheMode (
IN PEI_CORE_INSTANCE *CoreData
)
/*++
Routine Description:
Switch the PHIT pointers to cache mode after InstallPeiMemory in CAR.
Arguments:
CoreData - The PEI core Private Data
Returns:
--*/
{
EFI_HOB_HANDOFF_INFO_TABLE *Phit;
if ((GetHandOffStatus().r10 & 0xFF) == RecoveryFn) {
CoreData->StackBase = CoreData->StackBase & CACHE_MODE_ADDRESS_MASK;
CoreData->HobList.Raw = (UINT8 *)((UINTN)CoreData->HobList.Raw & CACHE_MODE_ADDRESS_MASK);
//
// Change the PHIT pointer value to cache mode
//
Phit = CoreData->HobList.HandoffInformationTable;
Phit->EfiMemoryTop = Phit->EfiMemoryTop & CACHE_MODE_ADDRESS_MASK;
Phit->EfiFreeMemoryTop = Phit->EfiFreeMemoryTop & CACHE_MODE_ADDRESS_MASK;
Phit->EfiMemoryBottom = Phit->EfiMemoryBottom & CACHE_MODE_ADDRESS_MASK;
Phit->EfiFreeMemoryBottom = Phit->EfiFreeMemoryBottom & CACHE_MODE_ADDRESS_MASK;
Phit->EfiEndOfHobList = Phit->EfiEndOfHobList & CACHE_MODE_ADDRESS_MASK;
}
return;
}

View File

@ -412,38 +412,6 @@ Returns:
--*/ --*/
; ;
#if defined (MDE_CPU_IPF)
//
// In Ipf we should make special changes for the PHIT pointers to support
// recovery boot in cache mode.
//
#define SWITCH_TO_CACHE_MODE(CoreData) SwitchToCacheMode(CoreData)
#define CACHE_MODE_ADDRESS_MASK 0x7FFFFFFFFFFFFFFFULL
VOID
SwitchToCacheMode (
IN PEI_CORE_INSTANCE *CoreData
)
/*++
Routine Description:
Switch the PHIT pointers to cache mode after InstallPeiMemory in CAR.
Arguments:
CoreData - The PEI core Private Data
Returns:
--*/
;
#else
#define SWITCH_TO_CACHE_MODE(CoreData)
#endif
// //
// PPI support functions // PPI support functions
// //
@ -1336,38 +1304,6 @@ PeiRegisterForShadow (
) )
; ;
/**
Transfers control to a function starting with a new stack.
Transfers control to the function specified by EntryPoint using the new stack
specified by NewStack and passing in the parameters specified by Context1 and
Context2. Context1 and Context2 are optional and may be NULL. The function
EntryPoint must never return.
If EntryPoint is NULL, then ASSERT().
If NewStack is NULL, then ASSERT().
@param EntryPoint A pointer to function to call with the new stack.
@param Context1 A pointer to the context to pass into the EntryPoint
function.
@param Context2 A pointer to the context to pass into the EntryPoint
function.
@param NewStack A pointer to the new stack to use for the EntryPoint
function.
@param NewBsp A pointer to the new BSP for the EntryPoint on IPF. It's
Reserved on other architectures.
**/
VOID
EFIAPI
PeiSwitchStacks (
IN SWITCH_STACK_ENTRY_POINT EntryPoint,
IN VOID *Context1, OPTIONAL
IN VOID *Context2, OPTIONAL
IN VOID *NewStack,
IN VOID *NewBsp
);
EFI_STATUS EFI_STATUS
PeiFindFileEx ( PeiFindFileEx (
IN CONST EFI_PEI_FV_HANDLE FvHandle, IN CONST EFI_PEI_FV_HANDLE FvHandle,

View File

@ -47,21 +47,6 @@
BootMode/BootMode.c BootMode/BootMode.c
PeiMain.h PeiMain.h
[Sources.Ia32]
Dispatcher/Stack.c
[Sources.X64]
Dispatcher/Stack.c
[Sources.IPF]
Ipf/Stack.c
Ipf/IpfPeiMain.h
Ipf/IpfCpuCore.s
Ipf/SwitchToCacheMode.c
[Sources.EBC]
Dispatcher/Stack.c
[Packages] [Packages]
MdeModulePkg/MdeModulePkg.dec MdeModulePkg/MdeModulePkg.dec
MdePkg/MdePkg.dec MdePkg/MdePkg.dec