summaryrefslogtreecommitdiff
path: root/EdkModulePkg/Core
diff options
context:
space:
mode:
authorrsun3 <rsun3@6f19259b-4bc3-4df7-8a09-765794883524>2006-12-22 03:13:56 +0000
committerrsun3 <rsun3@6f19259b-4bc3-4df7-8a09-765794883524>2006-12-22 03:13:56 +0000
commit3d109491d637eeb71df8278700b0e1b1863444d3 (patch)
tree69a79f787a4d72529189c9f6ecf1d2a64608e5b8 /EdkModulePkg/Core
parented09422e6b32d60f0591c1dcd41146472585378d (diff)
downloadedk2-platforms-3d109491d637eeb71df8278700b0e1b1863444d3.tar.xz
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
Diffstat (limited to 'EdkModulePkg/Core')
-rw-r--r--EdkModulePkg/Core/DxeIplPeim/DxeIpl.h3
-rw-r--r--EdkModulePkg/Core/DxeIplPeim/DxeLoad.c15
-rw-r--r--EdkModulePkg/Core/DxeIplPeim/Ia32/DxeLoadFunc.c18
-rw-r--r--EdkModulePkg/Core/DxeIplPeim/Ipf/DxeLoadFunc.c9
-rw-r--r--EdkModulePkg/Core/DxeIplPeim/X64/DxeLoadFunc.c9
5 files changed, 40 insertions, 14 deletions
diff --git a/EdkModulePkg/Core/DxeIplPeim/DxeIpl.h b/EdkModulePkg/Core/DxeIplPeim/DxeIpl.h
index eadcffa3d9..2c711ed97b 100644
--- a/EdkModulePkg/Core/DxeIplPeim/DxeIpl.h
+++ b/EdkModulePkg/Core/DxeIplPeim/DxeIpl.h
@@ -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
diff --git a/EdkModulePkg/Core/DxeIplPeim/DxeLoad.c b/EdkModulePkg/Core/DxeIplPeim/DxeLoad.c
index 6a4c53b922..53be7d932e 100644
--- a/EdkModulePkg/Core/DxeIplPeim/DxeLoad.c
+++ b/EdkModulePkg/Core/DxeIplPeim/DxeLoad.c
@@ -242,14 +242,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
//
BuildModuleHob (
@@ -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.
diff --git a/EdkModulePkg/Core/DxeIplPeim/Ia32/DxeLoadFunc.c b/EdkModulePkg/Core/DxeIplPeim/Ia32/DxeLoadFunc.c
index f66798ed56..7c9beff5f6 100644
--- a/EdkModulePkg/Core/DxeIplPeim/Ia32/DxeLoadFunc.c
+++ b/EdkModulePkg/Core/DxeIplPeim/Ia32/DxeLoadFunc.c
@@ -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,
diff --git a/EdkModulePkg/Core/DxeIplPeim/Ipf/DxeLoadFunc.c b/EdkModulePkg/Core/DxeIplPeim/Ipf/DxeLoadFunc.c
index e53f708fd4..ea88b774f8 100644
--- a/EdkModulePkg/Core/DxeIplPeim/Ipf/DxeLoadFunc.c
+++ b/EdkModulePkg/Core/DxeIplPeim/Ipf/DxeLoadFunc.c
@@ -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,
diff --git a/EdkModulePkg/Core/DxeIplPeim/X64/DxeLoadFunc.c b/EdkModulePkg/Core/DxeIplPeim/X64/DxeLoadFunc.c
index 02de14987f..83b00bb486 100644
--- a/EdkModulePkg/Core/DxeIplPeim/X64/DxeLoadFunc.c
+++ b/EdkModulePkg/Core/DxeIplPeim/X64/DxeLoadFunc.c
@@ -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,