]> git.proxmox.com Git - mirror_edk2.git/blobdiff - EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/PeiServicesTablePointerLibMm7/PeiServicesTablePointer.c
Update the copyright notice format
[mirror_edk2.git] / EdkCompatibilityPkg / Foundation / Library / EdkIIGlueLib / Library / PeiServicesTablePointerLibMm7 / PeiServicesTablePointer.c
index ca75a9493d10bf0707ba751fb1a2a41ea5df0d92..622f8b9c69f9845dd73ce235bb194376c814bf3c 100644 (file)
@@ -1,7 +1,7 @@
 /*++\r
 \r
-Copyright (c) 2004 - 2006, Intel Corporation                                                         \r
-All rights reserved. This program and the accompanying materials                          \r
+Copyright (c) 2004 - 2006, Intel Corporation. All rights reserved.<BR>\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
@@ -37,19 +37,19 @@ GetPeiServicesTablePointer (
   VOID\r
   )\r
 {\r
-  EFI_PEI_SERVICES  **PeiServices;\r
-#if (PI_SPECIFICATION_VERSION >= 0x00010000)\r
   IA32_DESCRIPTOR   Idtr;\r
-#endif\r
+  EFI_PEI_SERVICES  **PeiServices;\r
 \r
-#if (PI_SPECIFICATION_VERSION < 0x00010000)\r
-  PeiServices = (EFI_PEI_SERVICES **)(UINTN)AsmReadMm7 ();\r
-#else\r
   AsmReadIdtr (&Idtr);\r
   PeiServices = (EFI_PEI_SERVICES **)(UINTN)(*(UINTN*)(Idtr.Base - sizeof (UINTN)));\r
-#endif\r
-  ASSERT (PeiServices != NULL);\r
-  return PeiServices;\r
+  \r
+  if ((*PeiServices)->Hdr.Signature == PEI_SERVICES_SIGNATURE) {\r
+    return PeiServices;\r
+  } else {\r
+    PeiServices = (EFI_PEI_SERVICES **)(UINTN)AsmReadMm7 ();\r
+    ASSERT (PeiServices != NULL);\r
+    return PeiServices;\r
+  }\r
 }\r
 \r
 /**\r