summaryrefslogtreecommitdiff
path: root/MdeModulePkg/Core/Pei
diff options
context:
space:
mode:
authorqhuang8 <qhuang8@6f19259b-4bc3-4df7-8a09-765794883524>2008-07-19 15:56:49 +0000
committerqhuang8 <qhuang8@6f19259b-4bc3-4df7-8a09-765794883524>2008-07-19 15:56:49 +0000
commit5c5a0601e8a9e382e5091442882d2db93dfc44ed (patch)
treedb5e429bd2b686c743f5d0981d27c10c4b23934e /MdeModulePkg/Core/Pei
parentb39ece655b54311096ba7bcd0bed9bab92843e7f (diff)
downloadedk2-5c5a0601e8a9e382e5091442882d2db93dfc44ed.zip
edk2-5c5a0601e8a9e382e5091442882d2db93dfc44ed.tar.gz
edk2-5c5a0601e8a9e382e5091442882d2db93dfc44ed.tar.bz2
Fix a bug that PeiCore might fail to fix up Ppi pointer in CAR.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@5527 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'MdeModulePkg/Core/Pei')
-rw-r--r--MdeModulePkg/Core/Pei/Dispatcher/Dispatcher.c5
-rw-r--r--MdeModulePkg/Core/Pei/PeiMain.h7
-rw-r--r--MdeModulePkg/Core/Pei/Ppi/Ppi.c10
3 files changed, 11 insertions, 11 deletions
diff --git a/MdeModulePkg/Core/Pei/Dispatcher/Dispatcher.c b/MdeModulePkg/Core/Pei/Dispatcher/Dispatcher.c
index 481cf5d..f18e954 100644
--- a/MdeModulePkg/Core/Pei/Dispatcher/Dispatcher.c
+++ b/MdeModulePkg/Core/Pei/Dispatcher/Dispatcher.c
@@ -473,7 +473,7 @@ PeiDispatcher (
// Update HandOffHob for new installed permenent memory
//
OldHandOffTable = Private->HobList.HandoffInformationTable;
- OldCheckingBottom = (UINTN)OldHandOffTable;
+ OldCheckingBottom = (UINTN)(SecCoreData->TemporaryRamBase);
OldCheckingTop = (UINTN)(OldCheckingBottom + SecCoreData->TemporaryRamSize);
//
@@ -552,7 +552,8 @@ PeiDispatcher (
ConvertPpiPointers ((CONST EFI_PEI_SERVICES **)PeiServices,
OldCheckingBottom,
OldCheckingTop,
- NewHandOffTable);
+ HeapOffset
+ );
DEBUG ((EFI_D_INFO, "Stack Hob: BaseAddress=0x%X Length=0x%X\n",
(UINTN)PrivateInMem->StackBase,
diff --git a/MdeModulePkg/Core/Pei/PeiMain.h b/MdeModulePkg/Core/Pei/PeiMain.h
index 8e87aaa..7f7ac19 100644
--- a/MdeModulePkg/Core/Pei/PeiMain.h
+++ b/MdeModulePkg/Core/Pei/PeiMain.h
@@ -325,15 +325,16 @@ InitializePpiServices (
@param PeiServices The PEI core services table.
@param OldCheckingBottom The old checking bottom.
@param OldCheckingTop The old checking top.
- @param NewHandOffHob The new handoff HOB list.
+ @param Fixup The address difference between
+ the new Hob list and old Hob list.
**/
VOID
ConvertPpiPointers (
- IN CONST EFI_PEI_SERVICES **PeiServices,
+ IN CONST EFI_PEI_SERVICES **PeiServices,
IN UINTN OldCheckingBottom,
IN UINTN OldCheckingTop,
- IN EFI_HOB_HANDOFF_INFO_TABLE *NewHandOffHob
+ IN UINTN Fixup
)
;
diff --git a/MdeModulePkg/Core/Pei/Ppi/Ppi.c b/MdeModulePkg/Core/Pei/Ppi/Ppi.c
index fa60d82..b7a9b12 100644
--- a/MdeModulePkg/Core/Pei/Ppi/Ppi.c
+++ b/MdeModulePkg/Core/Pei/Ppi/Ppi.c
@@ -44,26 +44,24 @@ InitializePpiServices (
@param PeiServices The PEI core services table.
@param OldCheckingBottom The old checking bottom.
@param OldCheckingTop The old checking top.
- @param NewHandOffHob The new handoff HOB list.
+ @param Fixup The address difference between
+ the new Hob list and old Hob list.
**/
VOID
ConvertPpiPointers (
- IN CONST EFI_PEI_SERVICES **PeiServices,
+ IN CONST EFI_PEI_SERVICES **PeiServices,
IN UINTN OldCheckingBottom,
IN UINTN OldCheckingTop,
- IN EFI_HOB_HANDOFF_INFO_TABLE *NewHandOffHob
+ IN UINTN Fixup
)
{
PEI_CORE_INSTANCE *PrivateData;
UINT8 Index;
PEI_PPI_LIST_POINTERS *PpiPointer;
- UINTN Fixup;
PrivateData = PEI_CORE_INSTANCE_FROM_PS_THIS(PeiServices);
- Fixup = (UINTN)NewHandOffHob - OldCheckingBottom;
-
for (Index = 0; Index < FixedPcdGet32 (PcdPeiCoreMaxPpiSupported); Index++) {
if (Index < PrivateData->PpiData.PpiListEnd ||
Index > PrivateData->PpiData.NotifyListEnd) {