/* Migrate Pointer from the temporary memory to PEI installed memory. */
VOID ConvertPointer(IN OUT VOID **Pointer, IN UINTN TempBottom, IN UINTN TempTop, IN UINTN Offset, IN BOOLEAN OffsetPositive)
/* Migrate Pointer from the temporary memory to PEI installed memory. */
VOID ConvertPointer(IN OUT VOID **Pointer, IN UINTN TempBottom, IN UINTN TempTop, IN UINTN Offset, IN BOOLEAN OffsetPositive)
{
  if (((UINTN)*Pointer < TempTop) &&
      ((UINTN)*Pointer >= TempBottom))
  {
    if (OffsetPositive) {
      *Pointer = (VOID *)((UINTN)*Pointer + Offset);
    } else {
      *Pointer = (VOID *)((UINTN)*Pointer - Offset);
    }
  }
}