Index: Include/Library/PeiServicesTablePointerLib.h
===================================================================
--- Include/Library/PeiServicesTablePointerLib.h	(revision 14952)
+++ Include/Library/PeiServicesTablePointerLib.h	(working copy)
@@ -1,7 +1,7 @@
 /** @file
   Provides a service to retrieve a pointer to the PEI Services Table.
 
-Copyright (c) 2006 - 2008, Intel Corporation. All rights reserved.<BR>
+Copyright (c) 2006 - 2014, Intel Corporation. All rights reserved.<BR>
 This program and the accompanying materials
 are licensed and made available under the terms and conditions of the BSD License
 which accompanies this distribution.  The full text of the license may be found at
@@ -50,5 +50,19 @@
   IN CONST EFI_PEI_SERVICES ** PeiServicesTablePointer
   );
 
+/**
+  Migrate the space that stores the PEI Services Table pointer.
+
+  For X86 and x64 processors, Interrupt Descriptor Table (IDT) preceding space is used 
+  to store EFI_PEI_SERVICES**. Migrate IDT table and the preceding space to the permanent memory. 
+  For Itanium and ARM Processor, the specific register is used to store EFI_PEI_SERVICES**.
+  No migration is requird. 
+
+**/
+VOID
+EFIAPI
+MigratePeiServicesTablePointer (
+  );
+
 #endif
 
Index: Library/PeiServicesTablePointerLib/PeiServicesTablePointer.c
===================================================================
--- Library/PeiServicesTablePointerLib/PeiServicesTablePointer.c	(revision 14952)
+++ Library/PeiServicesTablePointerLib/PeiServicesTablePointer.c	(working copy)
@@ -4,7 +4,7 @@
   This library is used for PEIM which does executed from flash device directly but
   executed in memory.
 
-  Copyright (c) 2006 - 2010, Intel Corporation. All rights reserved.<BR>
+  Copyright (c) 2006 - 2014, Intel Corporation. All rights reserved.<BR>
   This program and the accompanying materials
   are licensed and made available under the terms and conditions of the BSD License
   which accompanies this distribution.  The full text of the license may be found at
@@ -88,4 +88,19 @@
   return EFI_SUCCESS;
 }
 
+/**
+  Migrate the space that stores the PEI Services Table pointer.
 
+  For X86 and x64 processors, Interrupt Descriptor Table (IDT) preceding space is used 
+  to store EFI_PEI_SERVICES**. Migrate IDT table and the preceding space to the permanent memory. 
+  For Itanium and ARM Processor, the specific register is used to store EFI_PEI_SERVICES**.
+  No migration is requird. 
+
+**/
+VOID
+EFIAPI
+MigratePeiServicesTablePointer (
+  )
+{
+  return;
+}
Index: Library/PeiServicesTablePointerLibIdt/PeiServicesTablePointer.c
===================================================================
--- Library/PeiServicesTablePointerLibIdt/PeiServicesTablePointer.c	(revision 14952)
+++ Library/PeiServicesTablePointerLibIdt/PeiServicesTablePointer.c	(working copy)
@@ -4,7 +4,7 @@
   According to PI specification, the peiservice pointer is stored prior at IDT
   table in IA32 and x64 architecture.
   
-  Copyright (c) 2006 - 2013, Intel Corporation. All rights reserved.<BR>
+  Copyright (c) 2006 - 2014, Intel Corporation. All rights reserved.<BR>
   This program and the accompanying materials                          
   are licensed and made available under the terms and conditions of the BSD License         
   which accompanies this distribution.  The full text of the license may be found at        
@@ -21,7 +21,6 @@
 #include <Library/PeiServicesTablePointerLib.h>
 #include <Library/DebugLib.h>
 #include <Library/BaseMemoryLib.h>
-#include <Ppi/TemporaryRamSupport.h>
 
 /**
   Retrieves the cached value of the PEI Services Table pointer.
@@ -70,42 +69,55 @@
   )
 {
   IA32_DESCRIPTOR        Idtr;
-  EFI_PHYSICAL_ADDRESS   IdtBase;
-  EFI_STATUS             Status;
-  EFI_PEI_TEMPORARY_RAM_SUPPORT_PPI   *TemporaryRamSupportPpi;
   
   ASSERT (PeiServicesTablePointer != NULL);
   AsmReadIdtr (&Idtr);
-  if ((*(UINTN*)(Idtr.Base - sizeof (UINTN))) != (UINTN)PeiServicesTablePointer) {
-    (*(UINTN*)(Idtr.Base - sizeof (UINTN))) = (UINTN)PeiServicesTablePointer;
-    Status = (*PeiServicesTablePointer)->LocatePpi (
-                                          PeiServicesTablePointer, 
-                                          &gEfiTemporaryRamSupportPpiGuid, 
-                                          0, 
-                                          NULL, 
-                                          (VOID**)&TemporaryRamSupportPpi
-                                         );
-                                      
-    if (EFI_ERROR (Status)) {
-      //
-      // If TemporaryRamSupportPpi is not found, Idt table needs to be migrated into memory.
-      //
-      Status = (*PeiServicesTablePointer)->AllocatePages (
-                                            PeiServicesTablePointer, 
-                                            EfiBootServicesCode,
-                                            EFI_SIZE_TO_PAGES(Idtr.Limit + 1 + sizeof (UINTN)),
-                                            &IdtBase
-                                            );
-      if (!EFI_ERROR (Status)) {
-        //
-        // Migrate Idt table
-        //
-        CopyMem ((VOID *) (UINTN) IdtBase, (VOID *) (Idtr.Base - sizeof (UINTN)), Idtr.Limit + 1 + sizeof (UINTN));
-        Idtr.Base = (UINTN) IdtBase + sizeof (UINTN);
-        AsmWriteIdtr (&Idtr);
-      }
-    }
-  }
+  (*(UINTN*)(Idtr.Base - sizeof (UINTN))) = (UINTN)PeiServicesTablePointer;
 }
 
+/**
+  Migrate the space that stores the PEI Services Table pointer.
 
+  For X86 and x64 processors, Interrupt Descriptor Table (IDT) preceding space is used 
+  to store EFI_PEI_SERVICES**. Migrate IDT table and the preceding space to the permanent memory. 
+
+  If The cached PEI Services Table pointer is NULL, then ASSERT().
+  If the permanent memory is allocated failed, then ASSERT().
+**/
+VOID
+EFIAPI
+MigratePeiServicesTablePointer (
+  )
+{
+  EFI_STATUS             Status;
+  IA32_DESCRIPTOR        Idtr;
+  EFI_PHYSICAL_ADDRESS   IdtBase;
+  CONST EFI_PEI_SERVICES  **PeiServices;
+
+  //
+  // Get PEI Services Table pointer
+  //
+  AsmReadIdtr (&Idtr);
+  PeiServices = (CONST EFI_PEI_SERVICES **) (*(UINTN*)(Idtr.Base - sizeof (UINTN)));
+  ASSERT (PeiServices != NULL);
+  //
+  // Allocate the permanent memory.
+  //
+  Status = (*PeiServices)->AllocatePages (
+                            PeiServices, 
+                            EfiBootServicesCode,
+                            EFI_SIZE_TO_PAGES(Idtr.Limit + 1 + sizeof (UINTN)),
+                            &IdtBase
+                            );
+  ASSERT_EFI_ERROR (Status);
+  //
+  // Idt table needs to be migrated into memory.
+  //
+  CopyMem ((VOID *) (UINTN) IdtBase, (VOID *) (Idtr.Base - sizeof (UINTN)), Idtr.Limit + 1 + sizeof (UINTN));
+  Idtr.Base = (UINTN) IdtBase + sizeof (UINTN);
+  AsmWriteIdtr (&Idtr);
+  
+  return;
+}
+
+
Index: Library/PeiServicesTablePointerLibIdt/PeiServicesTablePointerLibIdt.inf
===================================================================
--- Library/PeiServicesTablePointerLibIdt/PeiServicesTablePointerLibIdt.inf	(revision 14952)
+++ Library/PeiServicesTablePointerLibIdt/PeiServicesTablePointerLibIdt.inf	(working copy)
@@ -4,7 +4,7 @@
 # PEI Services Table Pointer Library implementation that retrieves a pointer to the PEI
 # Services Table from the IDT on IA-32 and x64.
 #
-# Copyright (c) 2006 - 2013, Intel Corporation. All rights reserved.<BR>
+# Copyright (c) 2006 - 2014, Intel Corporation. All rights reserved.<BR>
 #
 #  This program and the accompanying materials
 #  are licensed and made available under the terms and conditions of the BSD License
@@ -40,6 +40,3 @@
   DebugLib
   BaseLib
   BaseMemoryLib
-
-[Ppis]
-  gEfiTemporaryRamSupportPpiGuid                ## SOMETIMES_CONSUMES
Index: Library/PeiServicesTablePointerLibKr7/PeiServicesTablePointer.c
===================================================================
--- Library/PeiServicesTablePointerLibKr7/PeiServicesTablePointer.c	(revision 14952)
+++ Library/PeiServicesTablePointerLibKr7/PeiServicesTablePointer.c	(working copy)
@@ -2,7 +2,7 @@
   PEI Services Table Pointer Library implementation for IPF that uses Kernel
   Register 7 to store the pointer.
 
-  Copyright (c) 2006 - 2008, Intel Corporation. All rights reserved.<BR>
+  Copyright (c) 2006 - 2014, Intel Corporation. All rights reserved.<BR>
   This program and the accompanying materials
   are licensed and made available under the terms and conditions of the BSD License
   which accompanies this distribution.  The full text of the license may be found at
@@ -66,6 +66,20 @@
   AsmWriteKr7 ((UINT64)(UINTN)PeiServicesTablePointer);
 }
   
+/**
+  Migrate the space that stores the PEI Services Table pointer.
 
+  For X86 and x64 processors, Interrupt Descriptor Table (IDT) preceding space is used 
+  to store EFI_PEI_SERVICES**. Migrate IDT table and the preceding space to the permanent memory. 
+  For Itanium and ARM Processor, the specific register is used to store EFI_PEI_SERVICES**.
+  No migration is requird. 
 
+**/
+VOID
+EFIAPI
+MigratePeiServicesTablePointer (
+  )
+{
+  return;
+}
 
