]> git.proxmox.com Git - mirror_edk2.git/commitdiff
InOsEmuPkg: Make XIP work properly
authorandrewfish <andrewfish@6f19259b-4bc3-4df7-8a09-765794883524>
Wed, 8 Jun 2011 21:52:21 +0000 (21:52 +0000)
committerandrewfish <andrewfish@6f19259b-4bc3-4df7-8a09-765794883524>
Wed, 8 Jun 2011 21:52:21 +0000 (21:52 +0000)
Update the InOsEmuPkg to properly function with XIP. Make the Recovery FV read only. Remove the use of global variable writes from XIP code. Add a new global page that can be used in place of writting to the FD by XIP code. Think of this global page as a system SRAM.

igned-off-by: andrewfish

git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@11771 6f19259b-4bc3-4df7-8a09-765794883524

15 files changed:
InOsEmuPkg/InOsEmuPkg.dec
InOsEmuPkg/Include/Library/EmuMagicPageLib.h [new file with mode: 0644]
InOsEmuPkg/Library/PeiEmuPeCoffExtraActionLib/PeiEmuPeCoffExtraActionLib.c
InOsEmuPkg/Library/PeiEmuPeCoffExtraActionLib/PeiEmuPeCoffExtraActionLib.inf
InOsEmuPkg/Library/PeiServicesTablePointerLibMagicPage/PeiServicesTablePointer.c [new file with mode: 0644]
InOsEmuPkg/Library/PeiServicesTablePointerLibMagicPage/PeiServicesTablePointerLibMagicPage.inf [new file with mode: 0644]
InOsEmuPkg/Library/SecPeiServicesLib/PeiServicesLib.c
InOsEmuPkg/Library/SecPeiServicesLib/SecPeiServicesLib.inf
InOsEmuPkg/Sec/Sec.c
InOsEmuPkg/Sec/Sec.h
InOsEmuPkg/Sec/Sec.inf
InOsEmuPkg/Unix/Sec/SecMain.c
InOsEmuPkg/Unix/Sec/SecMain.h
InOsEmuPkg/Unix/Sec/SecMain.inf
InOsEmuPkg/Unix/UnixX64.dsc

index e476dd20f00fc2dc70f698d508c2f13445cfc511..14983ecbdac03990e7d7c0ad9586730fd124fc31 100644 (file)
   gInOsEmuPkgTokenSpaceGuid.PcdEmuFirmwareFdSize|0x0|UINT32|0x00001012\r
   gInOsEmuPkgTokenSpaceGuid.PcdEmuFirmwareBlockSize|0|UINT32|0x00001013\r
  \r
+  ## Number of Application Processors (APs) in the system 0 means Uniprocessor mode\r
   gInOsEmuPkgTokenSpaceGuid.PcdEmuApCount|L"0"|VOID*|0x00001019\r
 \r
+  ## Magic page to implement PEI Services Table Pointer Lib\r
+  gInOsEmuPkgTokenSpaceGuid.PcdPeiServicesTablePage|0x1000000000|UINT64|0x0000101b\r
+\r
 [PcdsFixedAtBuild, PcdsPatchableInModule] \r
   gInOsEmuPkgTokenSpaceGuid.PcdEmuBootMode|1|UINT32|0x00001006\r
   gInOsEmuPkgTokenSpaceGuid.PcdEmuFirmwareVolume|L"..\\Fv\\Fv_Recovery.fd"|VOID*|0x00001009\r
diff --git a/InOsEmuPkg/Include/Library/EmuMagicPageLib.h b/InOsEmuPkg/Include/Library/EmuMagicPageLib.h
new file mode 100644 (file)
index 0000000..03dfcac
--- /dev/null
@@ -0,0 +1,38 @@
+/*++ @file
+The PCD, gInOsEmuPkgTokenSpaceGuid.PcdPeiServicesTablePage, points to a magic page
+of memory that is like SRAM on an embedded system. This file defines what goes 
+where in the magic page.
+
+Copyright (c) 2011, Apple Inc. 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        
+http://opensource.org/licenses/bsd-license.php                                            
+                                                                                          
+THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,                     
+WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.             
+
+**/
+
+#ifndef __EMU_MAGIC_PAGE_LIB_H__
+#define __EMU_MAGIC_PAGE_LIB_H__
+
+#include <PiPei.h>
+#include <Library/PcdLib.h>
+#include <Protocol/EmuThunk.h>
+
+typedef struct {
+  // Used by PEI Core and PEIMs to store the PEI Services pointer.
+  // Privilege issues prevent using the PI mechanism in the emulator. 
+  CONST EFI_PEI_SERVICES **PeiServicesTablePointer;
+  
+  // Used by SecPeiServicesLib
+  EFI_PEI_PPI_DESCRIPTOR  *PpiList;
+  
+  // Needed by PEI PEI PeCoffLoaderExtraActionLib
+  EMU_THUNK_PROTOCOL   *Thunk;
+} EMU_MAGIC_PAGE_LAYOUT;
+
+#define EMU_MAGIC_PAGE() ((EMU_MAGIC_PAGE_LAYOUT *)((UINTN)PcdGet64 (PcdPeiServicesTablePage)))
+
+#endif
index b88bd009fe63acf62a65df1b7a6debe7f35a051c..b398b53e512f8cdb4929dd98916a4339402930ba 100644 (file)
@@ -23,6 +23,7 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
 #include <Library/DebugLib.h>\r
 #include <Library/BaseLib.h>\r
 #include <Library/PeCoffExtraActionLib.h>\r
+#include <Library/EmuMagicPageLib.h>\r
 \r
 //\r
 // Cache of UnixThunk protocol \r
@@ -56,7 +57,7 @@ EmuPeCoffGetThunkStucture (
               );\r
   ASSERT_EFI_ERROR (Status);\r
 \r
-  mThunk  = (EMU_THUNK_PROTOCOL *) ThunkPpi->Thunk ();\r
+  EMU_MAGIC_PAGE()->Thunk = (EMU_THUNK_PROTOCOL *) ThunkPpi->Thunk ();\r
 \r
   return EFI_SUCCESS;\r
 }\r
@@ -76,10 +77,10 @@ PeCoffLoaderRelocateImageExtraAction (
   IN OUT PE_COFF_LOADER_IMAGE_CONTEXT  *ImageContext\r
   )\r
 {\r
-  if (mThunk == NULL) {\r
+  if (EMU_MAGIC_PAGE()->Thunk == NULL) {\r
     EmuPeCoffGetThunkStucture ();\r
   }\r
-    mThunk->PeCoffRelocateImageExtraAction (ImageContext);\r
+    EMU_MAGIC_PAGE()->Thunk->PeCoffRelocateImageExtraAction (ImageContext);\r
   }\r
 \r
 \r
@@ -99,8 +100,8 @@ PeCoffLoaderUnloadImageExtraAction (
   IN OUT PE_COFF_LOADER_IMAGE_CONTEXT  *ImageContext\r
   )\r
 {\r
-  if (mThunk == NULL) {\r
+  if (EMU_MAGIC_PAGE()->Thunk == NULL) {\r
     EmuPeCoffGetThunkStucture ();\r
   }\r
-  mThunk->PeCoffUnloadImageExtraAction (ImageContext);\r
+  EMU_MAGIC_PAGE()->Thunk->PeCoffUnloadImageExtraAction (ImageContext);\r
 }\r
index 3fd4a8aefe6dbd636f7665b4e4b53c6fedb41c81..e4a3fa7df66eb349f0de44bfe087fe08f4a5259a 100644 (file)
@@ -44,3 +44,6 @@
 
 [Ppis]
   gEmuThunkPpiGuid                          # PPI ALWAYS_CONSUMED
+
+[Pcd]
+  gInOsEmuPkgTokenSpaceGuid.PcdPeiServicesTablePage
diff --git a/InOsEmuPkg/Library/PeiServicesTablePointerLibMagicPage/PeiServicesTablePointer.c b/InOsEmuPkg/Library/PeiServicesTablePointerLibMagicPage/PeiServicesTablePointer.c
new file mode 100644 (file)
index 0000000..3f15403
--- /dev/null
@@ -0,0 +1,75 @@
+/** @file\r
+  PEI Services Table Pointer Library.\r
+  \r
+  Store PEI Services Table pointer via gInOsEmuPkgTokenSpaceGuid.PcdPeiServicesTablePage.\r
+  This emulates a platform SRAM. The PI mechaism does not work in the emulator due to\r
+  lack of privledge.\r
+\r
+  Copyright (c) 2006 - 2010, Intel Corporation. All rights reserved.<BR>\r
+  Portiions copyrigth (c) 2011, Apple Inc. All rights reserved. \r
+  This program and the accompanying materials\r
+  are licensed and made available under the terms and conditions of the BSD License\r
+  which accompanies this distribution.  The full text of the license may be found at\r
+  http://opensource.org/licenses/bsd-license.php.\r
+\r
+  THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
+  WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
+\r
+**/\r
+\r
+#include <PiPei.h>\r
+#include <Library/PeiServicesTablePointerLib.h>\r
+#include <Library/DebugLib.h>\r
+#include <Library/EmuMagicPageLib.h>\r
+\r
+\r
+/**\r
+  Caches a pointer PEI Services Table. \r
\r
+  Caches the pointer to the PEI Services Table specified by PeiServicesTablePointer \r
+  in a CPU specific manner as specified in the CPU binding section of the Platform Initialization \r
+  Pre-EFI Initialization Core Interface Specification. \r
+  \r
+  If PeiServicesTablePointer is NULL, then ASSERT().\r
+  \r
+  @param    PeiServicesTablePointer   The address of PeiServices pointer.\r
+**/\r
+VOID\r
+EFIAPI\r
+SetPeiServicesTablePointer (\r
+  IN CONST EFI_PEI_SERVICES ** PeiServicesTablePointer\r
+  )\r
+{\r
+  ASSERT (PeiServicesTablePointer != NULL);\r
+  ASSERT (*PeiServicesTablePointer != NULL);\r
+  EMU_MAGIC_PAGE()->PeiServicesTablePointer = PeiServicesTablePointer;\r
+}\r
+\r
+/**\r
+  Retrieves the cached value of the PEI Services Table pointer.\r
+\r
+  Returns the cached value of the PEI Services Table pointer in a CPU specific manner \r
+  as specified in the CPU binding section of the Platform Initialization Pre-EFI \r
+  Initialization Core Interface Specification.\r
+  \r
+  If the cached PEI Services Table pointer is NULL, then ASSERT().\r
+\r
+  @return  The pointer to PeiServices.\r
+\r
+**/\r
+CONST EFI_PEI_SERVICES **\r
+EFIAPI\r
+GetPeiServicesTablePointer (\r
+  VOID\r
+  )\r
+{\r
+  CONST EFI_PEI_SERVICES **PeiServicesTablePointer;\r
+  \r
+  PeiServicesTablePointer = EMU_MAGIC_PAGE()->PeiServicesTablePointer;\r
+  ASSERT (PeiServicesTablePointer != NULL);\r
+  ASSERT (*PeiServicesTablePointer != NULL);\r
+  return PeiServicesTablePointer;\r
+}\r
+\r
+\r
+\r
diff --git a/InOsEmuPkg/Library/PeiServicesTablePointerLibMagicPage/PeiServicesTablePointerLibMagicPage.inf b/InOsEmuPkg/Library/PeiServicesTablePointerLibMagicPage/PeiServicesTablePointerLibMagicPage.inf
new file mode 100644 (file)
index 0000000..d16b845
--- /dev/null
@@ -0,0 +1,44 @@
+## @file\r
+#  PEI Services Table Pointer Library.\r
+#  \r
+#  Store PEI Services Table pointer via gInOsEmuPkgTokenSpaceGuid.PcdPeiServicesTablePage.\r
+#  This emulates a platform SRAM. The PI mechaism does not work in the emulator due to\r
+#  lack of privledge.\r
+#\r
+# Copyright (c) 2007 - 2010, Intel Corporation. All rights reserved.<BR>\r
+# Portions copyright (c) 2011, Apple Inc. All rights reserved. \r
+#\r
+#  This program and the accompanying materials\r
+#  are licensed and made available under the terms and conditions of the BSD License\r
+#  which accompanies this distribution. The full text of the license may be found at\r
+#  http://opensource.org/licenses/bsd-license.php.\r
+#  THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
+#  WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
+#\r
+#\r
+##\r
+\r
+[Defines]\r
+  INF_VERSION                    = 0x00010005\r
+  BASE_NAME                      = InOsEmuPkgPeiServicesTablePointerLib\r
+  FILE_GUID                      = 7488FC06-370A-1C41-B05C-7395559A535A\r
+  MODULE_TYPE                    = PEIM\r
+  VERSION_STRING                 = 1.0\r
+  LIBRARY_CLASS                  = PeiServicesTablePointerLib|PEIM PEI_CORE SEC\r
+\r
+#\r
+#  VALID_ARCHITECTURES           = IA32 X64 IPF EBC (EBC is for build only)\r
+#\r
+\r
+[Sources]\r
+  PeiServicesTablePointer.c\r
+\r
+[Packages]\r
+  MdePkg/MdePkg.dec\r
+  InOsEmuPkg/InOsEmuPkg.dec\r
+\r
+[LibraryClasses]\r
+  DebugLib\r
+\r
+[Pcd]\r
+  gInOsEmuPkgTokenSpaceGuid.PcdPeiServicesTablePage\r
index cee715d8765d555c8a21be0d3a3f7a4bbcf3a656..bdbf6875c9e23c7b5e8574953650be1d6c4168e8 100644 (file)
 \r
 \r
 #include <PiPei.h>\r
-\r
+#include <Library/EmuMagicPageLib.h>\r
 #include <Library/PeiServicesLib.h>\r
 #include <Library/DebugLib.h>\r
 #include <Library/BaseMemoryLib.h>\r
-#include <Library/PpiListLib.h>\r
 \r
 \r
 \r
@@ -116,8 +115,7 @@ PeiServicesLocatePpi (
     return EFI_NOT_FOUND;\r
   }\r
   \r
-  \r
-  for (PpiList = (EFI_PEI_PPI_DESCRIPTOR *)gPpiList; ; PpiList++) {\r
+  for (PpiList = EMU_MAGIC_PAGE()->PpiList; ; PpiList++) {\r
     if (CompareGuid (PpiList->Guid, Guid)) {\r
       if (PpiDescriptor != NULL) {\r
         *PpiDescriptor = PpiList;\r
index 6e9cf3a22676770fb055f64ec498302c881d304a..3fc6271b0801a37297ef45dbd57905fc49c86326 100644 (file)
   BaseMemoryLib\r
   PpiListLib\r
 \r
+[Pcd]\r
+  gInOsEmuPkgTokenSpaceGuid.PcdPeiServicesTablePage\r
+\r
+\r
 \r
 \r
 \r
index 4e350f1706ead4f3d2ad5f6b3fdb9a03bb9340cf..4468d6f07b2c94b302aa24b56b0574427e4477bc 100644 (file)
@@ -82,7 +82,7 @@ _ModuleEntryPoint (
   UINTN                     SecReseveredMemorySize;
   UINTN                     Index;
   
-  gPpiList = PpiList;
+  EMU_MAGIC_PAGE()->PpiList = PpiList;
   ProcessLibraryConstructorList ();
   
   DEBUG ((EFI_D_ERROR, "SEC Has Started\n"));
index d0bc9e176e237fca4232f7133e64ff418283dbad..00760121b25ea98108ae6d1c274ff2328e156ae8 100644 (file)
@@ -19,11 +19,11 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
 
 
 #include <PiPei.h>
+#include <Library/EmuMagicPageLib.h>
 #include <Library/DebugLib.h>
 #include <Library/PeiServicesLib.h>
 #include <Library/PeCoffGetEntryPointLib.h>
 #include <Library/BaseMemoryLib.h>
-#include <Library/PpiListLib.h>
 
 #include <Ppi/TemporaryRamSupport.h>
 
index b09785af40bced7808cde3811418d147d01536b5..c263f9db2bce5504d0d43ee4bcd6239486a0d4b7 100644 (file)
@@ -41,4 +41,6 @@
 \r
 [Ppis]\r
   gEfiTemporaryRamSupportPpiGuid\r
-  
\ No newline at end of file
+  \r
+[Pcd]\r
+  gInOsEmuPkgTokenSpaceGuid.PcdPeiServicesTablePage\r
index 1771f361328ffdfd28fbbd8598f70d799fc5d4c5..5dcb44523e32359cc1c7c3965205e8921931deb1 100644 (file)
@@ -57,7 +57,7 @@ EMU_SYSTEM_MEMORY  *gSystemMemory;
 UINTN                        mImageContextModHandleArraySize = 0;
 IMAGE_CONTEXT_TO_MOD_HANDLE  *mImageContextModHandleArray = NULL;
 
-
+EFI_PEI_PPI_DESCRIPTOR  *gPpiList;
 
 /*++
 
@@ -127,7 +127,6 @@ main (
 
   // EmuSecLibConstructor ();
   
-  
   gPpiList = GetThunkPpiList (); 
 
 
@@ -371,7 +370,7 @@ MapFile (
   FileSize = lseek (fd, 0, SEEK_END);
 
 
-  res = MapMemory (fd, FileSize, PROT_READ | PROT_WRITE | PROT_EXEC, MAP_PRIVATE);
+  res = MapMemory (fd, FileSize, PROT_READ | PROT_EXEC, MAP_PRIVATE);
 
   close (fd);
 
@@ -394,9 +393,10 @@ MapFd0 (
   )
 {
   int     fd;
-  VOID    *res, *res2;
+  void    *res, *res2, *res3;
   UINTN   FileSize;
   UINTN   FvSize;
+  void    *EmuMagicPage;
 
   fd = open (FileName, O_RDWR);
   if (fd < 0) {
@@ -410,15 +410,31 @@ MapFd0 (
   res = mmap (
           (void *)(UINTN)FixedPcdGet64 (PcdEmuFlashFvRecoveryBase), 
           FvSize, 
-          PROT_READ | PROT_WRITE | PROT_EXEC, 
+          PROT_READ | PROT_EXEC, 
           MAP_PRIVATE, 
           fd, 
           0
           );
   if (res == MAP_FAILED) {
-    perror ("MapFile() Failed res =");
+    perror ("MapFd0() Failed res =");
     close (fd);
     return EFI_DEVICE_ERROR;
+  } else if (res != (void *)(UINTN)FixedPcdGet64 (PcdEmuFlashFvRecoveryBase)) {
+    // We could not load at the build address, so we need to allow writes
+    munmap (res, FvSize);
+    res = mmap (
+            (void *)(UINTN)FixedPcdGet64 (PcdEmuFlashFvRecoveryBase), 
+            FvSize, 
+            PROT_READ | PROT_WRITE | PROT_EXEC, 
+            MAP_PRIVATE, 
+            fd, 
+            0
+            );
+    if (res == MAP_FAILED) {
+      perror ("MapFd0() Failed res =");
+      close (fd);
+      return EFI_DEVICE_ERROR;
+    }
   }
   
   // Map the rest of the FD as read/write
@@ -432,10 +448,32 @@ MapFd0 (
           );
   close (fd);
   if (res2 == MAP_FAILED) {
-    perror ("MapFile() Failed res2 =");
+    perror ("MapFd0() Failed res2 =");
     return EFI_DEVICE_ERROR;
   }
 
+  //
+  // If enabled use the magic page to communicate between modules 
+  // This replaces the PI PeiServicesTable pointer mechanism that
+  // deos not work in the emulator. It also allows the removal of
+  // writable globals from SEC, PEI_CORE (libraries), PEIMs
+  //
+  EmuMagicPage = (void *)(UINTN)FixedPcdGet64 (PcdPeiServicesTablePage);
+  if (EmuMagicPage != NULL) {
+    res3 =  mmap (
+              (void *)EmuMagicPage, 
+              4096, 
+              PROT_READ | PROT_WRITE, 
+              MAP_PRIVATE | MAP_ANONYMOUS,
+              0, 
+              0
+              );
+    if (res3 != EmuMagicPage) {
+      printf ("MapFd0(): Could not allocate PeiServicesTablePage @ %lx\n", (long unsigned int)EmuMagicPage);
+      return EFI_DEVICE_ERROR;
+    }
+  }
+  
   *Length = (UINT64) FileSize;
   *BaseAddress = (EFI_PHYSICAL_ADDRESS) (UINTN) res;
 
@@ -631,6 +669,7 @@ SecPeCoffGetEntryPoint (
     return Status;
   }
 
+  if (ImageContext.ImageAddress != (UINTN)Pe32Data) {
   //
   // Relocate image to match the address where it resides
   //
@@ -644,6 +683,17 @@ SecPeCoffGetEntryPoint (
   if (EFI_ERROR (Status)) {
     return Status;
   }
+  } else {
+    //
+    // Or just return image entry point
+    //
+    ImageContext.PdbPointer = PeCoffLoaderGetPdbPointer (Pe32Data);
+    Status = PeCoffLoaderGetEntryPoint (Pe32Data, EntryPoint);
+    if (EFI_ERROR (Status)) {
+      return Status;
+    }
+    ImageContext.EntryPoint = (UINTN)*EntryPoint;
+  }
 
   // On Unix a dlopen is done that will change the entry point
   SecPeCoffRelocateImageExtraAction (&ImageContext);
index af88d06837021b08b902865cdefac45cb1d77ec5..cbe98de648d58c826bf380d8a432332953e29eba 100644 (file)
@@ -29,9 +29,9 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
 \r
 #include <Library/ThunkPpiList.h>\r
 #include <Library/ThunkProtocolList.h>\r
-#include <Library/PpiListLib.h>\r
 #include <Library/PeiServicesLib.h>\r
 #include <Library/PeCoffGetEntryPointLib.h>\r
+#include <Library/EmuMagicPageLib.h>\r
 \r
 #include <Ppi/EmuThunk.h>\r
 #include <Ppi/StatusCode.h>\r
index 0e494e76bb82b0b70279ffbca3b8d8ebe2198cf4..da4714e2a6179fd02d12fac5c929b40d41087f76 100644 (file)
   gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageFtwWorkingSize\r
   gInOsEmuPkgTokenSpaceGuid.PcdEmuFlashNvStorageFtwSpareBase\r
   gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageFtwSpareSize\r
-\r
+  gInOsEmuPkgTokenSpaceGuid.PcdPeiServicesTablePage\r
 \r
 \r
 [BuildOptions]\r
index 8bb1391af9c8b60751d325a497ede5080d93f841..ce9b088f2aff50676e965356a9c3e9480724b52e 100644 (file)
   DebugAgentLib|MdeModulePkg/Library/DebugAgentLibNull/DebugAgentLibNull.inf\r
   DebugLib|MdePkg/Library/BaseDebugLibSerialPort/BaseDebugLibSerialPort.inf\r
 \r
-#####  DevicePathTextLib|InOsEmuPkg/Library/DevicePathTextLib/DevicePathTextLib.inf\r
+####  DevicePathTextLib|InOsEmuPkg/Library/DevicePathTextLib/DevicePathTextLib.inf\r
+  PeiServicesTablePointerLib|InOsEmuPkg/Library/PeiServicesTablePointerLibMagicPage/PeiServicesTablePointerLibMagicPage.inf\r
 \r
 [LibraryClasses.common.SEC]\r
   PeiServicesLib|InOsEmuPkg/Library/SecPeiServicesLib/SecPeiServicesLib.inf\r
 \r
 [LibraryClasses.common.PEI_CORE]\r
   PcdLib|MdePkg/Library/BasePcdLibNull/BasePcdLibNull.inf\r
-  PeiServicesTablePointerLib|InOsEmuPkg/Library/PeiCoreServicesTablePointerLib/PeiCoreServicesTablePointerLib.inf\r
 \r
 [LibraryClasses.common.PEIM]\r
   PcdLib|MdePkg/Library/PeiPcdLib/PeiPcdLib.inf\r
-  PeiServicesTablePointerLib|InOsEmuPkg/Library/PeiServicesTablePointerLib/PeiServicesTablePointerLib.inf\r
 \r
 [LibraryClasses.common.DXE_CORE]\r
   HobLib|MdePkg/Library/DxeCoreHobLib/DxeCoreHobLib.inf\r