1) Fix IPF ICC 11.1 issue when /Ox is used related to the use of local variables and parameter across the transition when TEMP RAM is disabled.
2) Update the logic that computes the offset of the heap and stack from TEMP RAM to Permanent RAM to handle all possible offsets values. 3) Minor cleanups to the PEI_CORE_INSTANCE structure 4) Simplify the logic that manages the TEMP RAM to PERM RAM transition and clean up the related DEBUG() messages. git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@10481 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
@@ -47,6 +47,8 @@ InitializePpiServices (
|
||||
will be fixup for PpiData and PpiDescriptor.
|
||||
@param Fixup The address difference between
|
||||
the new Hob list and old Hob list.
|
||||
@param FixupPositive TRUE if new Hob list is above the old Hob list.
|
||||
Otherwise FALSE.
|
||||
|
||||
**/
|
||||
VOID
|
||||
@@ -54,7 +56,8 @@ ConvertPpiPointers (
|
||||
IN PEI_CORE_INSTANCE *PrivateData,
|
||||
IN UINTN OldCheckingBottom,
|
||||
IN UINTN OldCheckingTop,
|
||||
IN INTN Fixup
|
||||
IN UINTN Fixup,
|
||||
IN BOOLEAN FixupPositive
|
||||
)
|
||||
{
|
||||
UINT8 Index;
|
||||
@@ -71,7 +74,11 @@ ConvertPpiPointers (
|
||||
// Convert the pointer to the PEIM descriptor from the old HOB heap
|
||||
// to the relocated HOB heap.
|
||||
//
|
||||
PpiPointer->Raw = (VOID *) ((UINTN)PpiPointer->Raw + Fixup);
|
||||
if (FixupPositive) {
|
||||
PpiPointer->Raw = (VOID *) ((UINTN)PpiPointer->Raw + Fixup);
|
||||
} else {
|
||||
PpiPointer->Raw = (VOID *) ((UINTN)PpiPointer->Raw - Fixup);
|
||||
}
|
||||
|
||||
//
|
||||
// Only when the PEIM descriptor is in the old HOB should it be necessary
|
||||
@@ -84,7 +91,11 @@ ConvertPpiPointers (
|
||||
// Convert the pointer to the GUID in the PPI or NOTIFY descriptor
|
||||
// from the old HOB heap to the relocated HOB heap.
|
||||
//
|
||||
PpiPointer->Ppi->Guid = (VOID *) ((UINTN)PpiPointer->Ppi->Guid + Fixup);
|
||||
if (FixupPositive) {
|
||||
PpiPointer->Ppi->Guid = (VOID *) ((UINTN)PpiPointer->Ppi->Guid + Fixup);
|
||||
} else {
|
||||
PpiPointer->Ppi->Guid = (VOID *) ((UINTN)PpiPointer->Ppi->Guid - Fixup);
|
||||
}
|
||||
}
|
||||
|
||||
//
|
||||
@@ -98,7 +109,11 @@ ConvertPpiPointers (
|
||||
// Convert the pointer to the PPI interface structure in the PPI descriptor
|
||||
// from the old HOB heap to the relocated HOB heap.
|
||||
//
|
||||
PpiPointer->Ppi->Ppi = (VOID *) ((UINTN)PpiPointer->Ppi->Ppi+ Fixup);
|
||||
if (FixupPositive) {
|
||||
PpiPointer->Ppi->Ppi = (VOID *) ((UINTN)PpiPointer->Ppi->Ppi + Fixup);
|
||||
} else {
|
||||
PpiPointer->Ppi->Ppi = (VOID *) ((UINTN)PpiPointer->Ppi->Ppi - Fixup);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user