In original DxeIpl64 PEIM, Creating page table is performed before sending End Of PEI Phase signal in order to improve performance. But after merging DxeIpl and DxeIpl64, Creating page table is performed after sending End Of PEI Phase signal, which has great negative impact on Woodcrest based platforms, which rely on turning on PEI FV cache to compensate Woodcrest's bad flash access performance.

This fix revert to the way of original DxeIpl64.

git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@2129 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
rsun3 2006-12-22 03:13:56 +00:00
parent ed09422e6b
commit 3d109491d6
5 changed files with 40 additions and 14 deletions

View File

@ -89,7 +89,8 @@ DxeLoadCore (
VOID
HandOffToDxeCore (
IN EFI_PHYSICAL_ADDRESS DxeCoreEntryPoint,
IN EFI_PEI_HOB_POINTERS HobList
IN EFI_PEI_HOB_POINTERS HobList,
IN EFI_PEI_PPI_DESCRIPTOR *EndOfPeiSignal
);
EFI_STATUS

View File

@ -241,14 +241,6 @@ Returns:
);
ASSERT_EFI_ERROR (Status);
//
// Transfer control to the DXE Core
// The handoff state is simply a pointer to the HOB list
//
Status = PeiServicesInstallPpi (&mPpiSignal);
ASSERT_EFI_ERROR (Status);
//
// Add HOB for the DXE Core
//
@ -309,8 +301,13 @@ Returns:
);
}
//
// Transfer control to the DXE Core
// The handoff state is simply a pointer to the HOB list
//
DEBUG ((EFI_D_INFO, "DXE Core Entry Point 0x%08x\n", (UINTN) DxeCoreEntryPoint));
HandOffToDxeCore (DxeCoreEntryPoint, HobList);
HandOffToDxeCore (DxeCoreEntryPoint, HobList, &mPpiSignal);
//
// If we get here, then the DXE Core returned. This is an error
// Dxe Core should not return.

View File

@ -22,7 +22,7 @@ Abstract:
#include "DxeIpl.h"
#include "VirtualMemory.h"
//
//
// Global Descriptor Table (GDT)
//
GLOBAL_REMOVE_IF_UNREFERENCED IA32_GDT gGdtEntries [] = {
@ -49,7 +49,8 @@ GLOBAL_REMOVE_IF_UNREFERENCED CONST IA32_DESCRIPTOR gGdt = {
VOID
HandOffToDxeCore (
IN EFI_PHYSICAL_ADDRESS DxeCoreEntryPoint,
IN EFI_PEI_HOB_POINTERS HobList
IN EFI_PEI_HOB_POINTERS HobList,
IN EFI_PEI_PPI_DESCRIPTOR *EndOfPeiSignal
)
{
EFI_STATUS Status;
@ -86,6 +87,13 @@ HandOffToDxeCore (
// Create page table and save PageMapLevel4 to CR3
//
PageTables = CreateIdentityMappingPageTables ();
//
// End of PEI phase singal
//
Status = PeiServicesInstallPpi (EndOfPeiSignal);
ASSERT_EFI_ERROR (Status);
AsmWriteCr3 (PageTables);
//
// Go to Long Mode. Interrupts will not get turned on until the CPU AP is loaded.
@ -106,6 +114,12 @@ HandOffToDxeCore (
TopOfStack = BaseOfStack + EFI_SIZE_TO_PAGES (STACK_SIZE) * EFI_PAGE_SIZE - CPU_STACK_ALIGNMENT;
TopOfStack = (EFI_PHYSICAL_ADDRESS) (UINTN) ALIGN_POINTER (TopOfStack, CPU_STACK_ALIGNMENT);
//
// End of PEI phase singal
//
Status = PeiServicesInstallPpi (EndOfPeiSignal);
ASSERT_EFI_ERROR (Status);
SwitchStack (
(SWITCH_STACK_ENTRY_POINT)(UINTN)DxeCoreEntryPoint,
HobList.Raw,

View File

@ -24,7 +24,8 @@ Abstract:
VOID
HandOffToDxeCore (
IN EFI_PHYSICAL_ADDRESS DxeCoreEntryPoint,
IN EFI_PEI_HOB_POINTERS HobList
IN EFI_PEI_HOB_POINTERS HobList,
IN EFI_PEI_PPI_DESCRIPTOR *EndOfPeiSignal
)
{
VOID *BaseOfStack;
@ -54,6 +55,12 @@ HandOffToDxeCore (
TopOfStack = (VOID *) ((UINTN) BaseOfStack + EFI_SIZE_TO_PAGES (STACK_SIZE) * EFI_PAGE_SIZE - CPU_STACK_ALIGNMENT);
TopOfStack = ALIGN_POINTER (TopOfStack, CPU_STACK_ALIGNMENT);
//
// End of PEI phase singal
//
Status = PeiServicesInstallPpi (EndOfPeiSignal);
ASSERT_EFI_ERROR (Status);
AsmSwitchStackAndBackingStore (
(SWITCH_STACK_ENTRY_POINT)(UINTN)DxeCoreEntryPoint,
HobList.Raw,

View File

@ -24,7 +24,8 @@ Abstract:
VOID
HandOffToDxeCore (
IN EFI_PHYSICAL_ADDRESS DxeCoreEntryPoint,
IN EFI_PEI_HOB_POINTERS HobList
IN EFI_PEI_HOB_POINTERS HobList,
IN EFI_PEI_PPI_DESCRIPTOR *EndOfPeiSignal
)
{
VOID *BaseOfStack;
@ -43,6 +44,12 @@ HandOffToDxeCore (
TopOfStack = (VOID *) ((UINTN) BaseOfStack + EFI_SIZE_TO_PAGES (STACK_SIZE) * EFI_PAGE_SIZE - CPU_STACK_ALIGNMENT);
TopOfStack = ALIGN_POINTER (TopOfStack, CPU_STACK_ALIGNMENT);
//
// End of PEI phase singal
//
Status = PeiServicesInstallPpi (EndOfPeiSignal);
ASSERT_EFI_ERROR (Status);
SwitchStack (
(SWITCH_STACK_ENTRY_POINT)(UINTN)DxeCoreEntryPoint,
HobList.Raw,